RickdiculouslyEasy: 1 VulnHub WriteUp
Walkthrough for RickdiculouslyEasy in VulnHub
Last updated
Walkthrough for RickdiculouslyEasy in VulnHub
Last updated
In this lab we are going to take another CTF challenge known as RickdiculouslyEasy by Luke. It is a very simple Rick and Morty themed boot to root. We also have to get root. If anyone is new to pentesting, it is worth a try!
RickdiculouslyEasy.zip (Size: 761 MB)
Download (Mirror): https://download.vulnhub.com/rickdiculouslyeasy/RickdiculouslyEasy.zip
Scanning
Discovering Targets IP
Network scanning (Nmap)
Enumeration
Surfing HTTP service port
Directory Enumeration
Connect to ftp
Command Injection
Exploiting
SSH login using Metasploit
Bruteforce login using Hydra
Using Netcat to get the reverse shell
Privilege Escalation
Checking SUID binaries
Accessing root directory
Capture the flag
After loading up the VM, our first step was to find out the targetβs IP address.
We found our targetβs IP address to be 192.168.1.101, next step was to scan the targetβs IP with nmap.
The scan result showed open Ports; we found our first flag returned as a banner for the service running on port 13337, moreover, anonymous FTP login was allowed on port 21 holding another flag.txt file.
From the nmap scan, we knew that anonymous ftp login is available. So, we logged in with username as βanonymousβ and password as blank. While working on the ftp console, ls displayed that it had βFLAG.txtβ and a get command downloaded the FLAG.txt over FTP to the Kali box. We found our second flag inside FLAG.txt.
From nmap result we found HTTP service is also running on port 80. So, we browsed Targetβs IP in the browser but in vain.
Next, we listed directories using dirb, it showed us two important directories β/passwords/β and β/robots.txtβ.
Viewing β/passwords/β directory displayed βFLAG.txtβ and βpassword.htmlβ.
We found our third flag here, so far it was a cake walk.
Browsing β/passwords/password.htmlβ pointed of the hidden password.
Why not go for source code! And the instinct was right we have a password here βwinterβ which we can use somewhere later.
Next, we opened β/robots.txtβ and found link to two files β/cgi-bin/root_shell.cgiβ and β/cgi-bin/ tracertool.cgiβ.
Only β/cgi-bin/tracertool.cgiβ is found to be useful, browsing this I found that one could get away with command injection or say RCE.
I also found that few commands have been filtered so we had to use βmoreβ instead of βcatβ to get the name of the users in /etc/passwd file. Here I found three users as RickSanchez, Morty and Summer. Summer could be linked to βwinterβ that we had found earlier.
It was time to perform ssh login using Metasploit with port 22222 using newly acquired credentials. And we found one more flag here.
Further enumeration showed three directories with the same name as of users that we found earlier. From directory Morty, we downloaded two files βSafe_Password.jpgβ and βJournal.txt.zipβ.
Safe_Password.jpg was an image file, but running strings on the file shows that a password βMeeseekβ is contained inside it.
Unzipping the file and supplying the password βMeeseekβ opened the file journal.txt. And you can see the next flag inside it.
Along with flag a number string β131333βwas there too and the message in the file hints it to be some kind of password.
Back at the target VM, inside βRickSanchezβ directory there is a subdirectory named βRICK_SAFEβ which was mentioned in the previous screenshot. Inside this, there is an executable file named βsafeβ. I downloaded this file into the main machine kali.
After providing all permissions to the file βsafeβ when executed by providing the string given with the previous flag, it displayed our fifth flag. Inside it there are clues for Ricksβs password too.
As the next password contains 1 uppercase character, 1 digit followed by one of the words in the name of the old band of Rick Sanchez. So, I had to do some web surfing to find out the bandβs name, it was called βthe flesh curtains β. Next, we used crunch to create two different format dictionaries and saved both of them in dict.txt.
It was time to use Hydra which tried to login the service using every possible combination of users and passwords provided in the dict.txt.
Great! we found a user/password pair.
Then I logged into ssh using recently acquired credentials. I reminded myself of the message in the last flag that βsudo is wheely goodβ so I ran sudo -l to find out his permissions. He had sudo permissions for ALL commands, so I just popped into an interactive root shell. In the root directory, we had our next flag inside FLAG.txt. But in order to get the flag, we had to use βmoreβ instead of βcatβ.
Now I was a root and I had 110 points out of 130.Where did I miss 20 points? We still didnβt check out few open ports.
We exploited port 60000 using netcat and it took us to a shell. ls showed us FLAG.txt and a cat displayed the flag.
We opened port 9090 in a web browser and found the last flag. Hence the task is completed.
Author: Eopi Noriko is a passionate Cybersecurity Researcher, contact Facebook.