Pickle Rick
Last updated
Last updated
Lets start with a initial nmap scan to find open ports
Detailed Nmap Scan :
Command Breakdown:
(-sV): Service version
(-sC): Default nmap scripts
(-p): Specifying ports 22,80
(-oN nmap): Saving it into a files called nmap
Lets visit the website and look at the source code
Lets add this to our notes, I personally use gedit
on the kali virtual machine and then transfer all of it to "OneNote" on my host machine and organize it. To use gedit: gedit <name of file>
Now lets visit robots.txt
, usually we find something interesting on this page like hidden directories or even sometimes passwords.
This looks interesting, it could probably be a directory, but I tested it and it was not, so it could be a password, so lets save it in our notes.
Now lets run Gobuster
to see if we can find hidden directories
Command Breakdown:
(-w): Specifying wordlist
(-u): Specifying URL
(-x): Specifying extensions
/login.php
and /portal.php
were the same page as /portal.php
redirects us to /login.php
/assets
had some Javascript and CSS files which did not look like there were going to help us exploit this machine.
Now we found ourselves a login page
And if we look at our notes, we have a username and a possible password, lets try using them to login.
And we got in!!
We have a command panel where we can run some commands, lets explore it.
Running ls
gives us some files present in the current directory
Lets try reading those files
And.... the command is disabled, so what can we do here, if we try different commands we can see that many commands are allowed but cat
is not allowed. After a lot of searching I found a command that gave us reverse shell on the server.
And now we can read the contents of Sup3rS3cretPickl3Ingred.txt.
This is answer for the first question
Now lets enumerate the machine and find a way to get root
While looking around I found the second ingredient which is the second answer.
Now lets try to become root to cd into the root directory as I think the final ingredient is hidden there, lets run the command sudo -l
to see if we can files as other users.
We are allowed to run ALL, so lets try switching users to root using the command su
And we are root! We can also see the 3rd and final ingredient in the root directory