cubeNocturnal

Easy HTB Linux box

Reconnaissance

As always, we start off with a basic port enumeration scan on the target with Nmap

We can see Port 80 | HTTP and Port 22 | SSH are open, we can also see it's using virtual hosting so we edit our /etc/hosts file to add nocturnal.htb and check whats inside the webpage!

We can see the use of this website: Uploading and viewing files and this leaves us thinking RCE..?

We register with random credentials and log in and we are redirected into a "Upload File" Dashboard

We try to upload a PHP file but the web warns us with this message:

Invalid file type. pdf, doc, docx, xls, xlsx, odt are allowed.

After uploading some files and intercepting the requests with BurpSuite we see a download interface with the link pointing to a username (in this case mine: delorian)

Exploitation

Let's try and brute-force this using BurpSuite Intruder

Success! We found the user Amanda

We try to enumerate the files of the user amanda and find a file: privacy.odt, which we can open installing LibreOffice

We find a password: arHkG7HAI68X8s1J so we try to login through SSH and the user amanda but the password was incorrect, however we can access an admin panel through login.php

We see that we have access to some interesting files like login.php

But for now we can't do much with it so we try and intercept the "Enter Password to Protect Backup" form using BurpSuite and after testing with for a bit we successfully dumped some hashes!

We put these hashes on crackstationarrow-up-right

Hash
Type of the has
Password found!

55c82b1ccd55ab219b3b109b07d5061d

md5

slowmotionapocalypse

f38cde1654b39fea2bd4f72f1ae4cdda

md5

kavi

Success! we extracted passwords for the users Tobias:slowmotionapocalypse and Kavi:kavi!!

Privilege Escalation

We see TCP port 8080 is open so we apply forwarding through SSH

We access localhost:8080 on our web browser and provide the credentials admin:slowmotionapocalypse

We see an ISPCONFIG admin panel, which we can exploit using the CVE-2023-46818arrow-up-right

And we are root!!

Hope you liked this WriteUp and see you next time!!

Last updated