The Planets Mercury Walkthrough

In this article, we are going to solve another vulnhub CTF The Planets Mercury. this is another boot to root challenge. and this VM is made by SirFlash. you can download here the machine.

Network Scanning

Let’s discover target IP address by using the netdiscover command.

We discover an IP address in my case my target machine IP address is 192.168.43.110. now our next step is scanning all ports and running service by using the Nmap tool.

The Planets Mercury Walkthrough vulnhub

Enumeration

There are two ports are open 22/SSH and 8080 running http-proxy. now we navigate the target IP address in browser and we didn’t found here any useful stuff.

then we move the next step navigating common URLs and we see page not found error and we found an interested URL /mercuryfacts/

The Planets Mercury Walkthrough vulnhub

now we open the /mercuryfacts page and here we found nothing useful then we try some sql injection and again we face a SQL syntax error.

without wasting your time we jump the terminal and we open the sqlmap tool and we enumerate the Database name, Tables, and Columns and then we dump the all username and password by using the sqlmap command.

The Planets Mercury Walkthrough vulnhub

Since we found many credentials in SQL Database we try this credentials for log in the SSH server. After the third try, we successfully login with the webmaster users.

The Planets Mercury Walkthrough vulnhub

Now we have shell access target machine let’s enumerating the directory’s and files. we found our first flag in the webmaster home directory. and here we found a note.txt file we open the notes file using the cat command.

and here we see base64 encoded string let’s decode the base64 stuff and again we found another user linuxmaster password.

Privilege Escalation

we run the sudo -l command for check the sudo privilege for user Linuxmaster and we found the user Linuxmaster own sudo right for check_syslog.sh custom bash script. let’s escalate the privilege root user run the following command.

and we have a root shell target machine let’s move the /root directory and read our root flag. and We successfully complete the challenge by reading the root flag.

The Planets Mercury Walkthrough vulnhub

CengBox: 1 Vulnhub Walkthrough link