HackTheBox - Granny

Nmap scan results (Basic and all port)

Let's edit the /etc/hosts file and add granny.htb to it.
So the IIS Web server is very old (2003). You can search for it on google.
Gobuster scan results

Nmap also scanned the webpage with http-webdav-scan script. We can use a tool named davtest.
Performing Davtest scan

The nikto scan says that the clients can UPLOAD or DELETE files on the web server.

Let's try to upload a simple html file.

Generating reverse shell using msfvenom

We can't upload a .aspx file, but we can upload a .html file

We can use HTTP MOVE method to upload a .aspx file. Read more about here.

This thing will move the file shell.html to shell.aspx and using this, we can finally execute the file and probably get a shell.


Running Exploit Suggester from msfconsole
Background the session using background command and search for exploit suggester

This module will search for local exploits and we can use that to escalate our privileges.

Using exploit/windows/local/ms15_051_client_copy_image exploit

Last updated
Was this helpful?