Sitemap

Environment

3 min readAug 11, 2025

Nmap scan

Press enter or click to view image in full size

Ports discovered: 22 and 80

Add the machines IP to your hosts folder

We start enumerating with gobuster and receive 405 codes on some returns

Press enter or click to view image in full size

Going to one of the 405 webpages we discover the Laravel version that is being utilized but I could not find any helpful exploit paths

I used Burpsuite to see if I can catch anything as I am trying to log in

Press enter or click to view image in full size

I changed the remember statement from False to Test and forwarded the request

By doing so, I am taken to the debug page and we see a ‘prepod’ value

Press enter or click to view image in full size

I modified the following parameters and forwarded the request

Press enter or click to view image in full size

If successful you should receive a new request with ‘GET /management/dashboard’ this allowed me to bypass the login screen

Press enter or click to view image in full size

You gain access to the dashboard

Press enter or click to view image in full size

Began trying new ways to upload a reverse shell and decided to capture the request in Burbsuite

Press enter or click to view image in full size
Press enter or click to view image in full size

After some research i added GIF89a above the <?php within the script

I successfully uploaded my php reverse shell (NOTE: Ensure the shell contains a “.” at the end, if not, the shell wont work. ex “shell.php.”)

Press enter or click to view image in full size

I eventually got the reverse shell after patiently waiting

Press enter or click to view image in full size

User.txt

Within the ‘hish’ directory we discover a backup directory and within it i discovered a file that is encrypted

Press enter or click to view image in full size

To decrypt the file, use the following commands:

Get Brian’s stories in your inbox

Join Medium for free to get updates from this writer.

‘cp keyvault.gpg /tmp’

‘cp -r .gnupg /tmp’ (for this command you need to go back to hish directory since that is where ‘gnupg’ is located)

‘cd /tmp/’

‘export HOME=/tmp’

‘gpg — list-secret-keys’

‘gpg — decrypt keyvault.gpg’

I successfully decrypted the password

Press enter or click to view image in full size

I now tried to SSH into ‘hish’, which was a success

I first began with sudo -l

Press enter or click to view image in full size

I ran the following commands to gain a root shell

‘echo ‘/bin/bash’ > /tmp/rootme.sh’

‘chmod +x /tmp/rootme.sh’

‘export BASH_ENV=/tmp/rootme.sh’

‘sudo /usr/bin/systeminfo’

Gained the root flag

Ratings:

Press enter or click to view image in full size