Environment
Nmap scan
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
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
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
I modified the following parameters and forwarded the request
If successful you should receive a new request with ‘GET /management/dashboard’ this allowed me to bypass the login screen
You gain access to the dashboard
Began trying new ways to upload a reverse shell and decided to capture the request in Burbsuite
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.”)
I eventually got the reverse shell after patiently waiting
User.txt
Within the ‘hish’ directory we discover a backup directory and within it i discovered a file that is encrypted
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
I now tried to SSH into ‘hish’, which was a success
I first began with sudo -l
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:






