Start with an Nmap Scan:
![](https://static.wixstatic.com/media/eb0517_546503c4910f4aeb8970cf6d3d0f492c~mv2.png/v1/fill/w_816,h_288,al_c,q_85,enc_auto/eb0517_546503c4910f4aeb8970cf6d3d0f492c~mv2.png)
From the output you can see that we have we only have one port open on the machine, Port 80.
The output of the scan also shows us that it is a HttpFileServer, and the version running is 2.3.
Lets first see if we can find any vulnerabilities for this version via a Google search.
Lets have a look at https://www.rapid7.com/db/modules/exploit/windows/http/rejetto_hfs_exec/
This tells us that there is a potential Rejetto exploit that could provide us Remote Command Execution if successful.
The exploit tells us to use the following Metasploit Module:
![](https://static.wixstatic.com/media/eb0517_6f241955e2a8431faf2e1f714c6cccf2~mv2.png/v1/fill/w_516,h_239,al_c,q_85,enc_auto/eb0517_6f241955e2a8431faf2e1f714c6cccf2~mv2.png)
Lets set the following options and run the exploit:
![](https://static.wixstatic.com/media/eb0517_27875fb3684241c39ac95c0065337d00~mv2.png/v1/fill/w_678,h_125,al_c,q_85,enc_auto/eb0517_27875fb3684241c39ac95c0065337d00~mv2.png)
This may take a bit of time, but we eventually get a meterpreter shell on the machine:
![](https://static.wixstatic.com/media/eb0517_d8b43207f7c841e98686ebcba328ddae~mv2.png/v1/fill/w_980,h_265,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/eb0517_d8b43207f7c841e98686ebcba328ddae~mv2.png)
Now we can enter shell and the command whoami to see which user we are:
We are the low-level user of kostas
Now lets attempt to perform Privilege Escalation, by using the local exploit suggester module built in Meterpreter.
![](https://static.wixstatic.com/media/eb0517_7b1ac9cdc0804d37a799fc5c28db7ac3~mv2.png/v1/fill/w_980,h_93,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/eb0517_7b1ac9cdc0804d37a799fc5c28db7ac3~mv2.png)
Lets try the second option, set the following options and run the exploit:
![](https://static.wixstatic.com/media/eb0517_d77e2f53954c45f08dccedb6dcfceff4~mv2.png/v1/fill/w_870,h_265,al_c,q_85,enc_auto/eb0517_d77e2f53954c45f08dccedb6dcfceff4~mv2.png)
BOOM! It was successful (We love easy wins!)
Lets now check with the command shell, then whoami
We get back that we are System, and so the box is pwned
Now grab that root flag!
Congratulations, you have pwned this box!
Comentarios