Pickle Rick CTF : TryHackMe Walkthrough
Pickle Rick CTF
Hello Guys, Today we'll Capture Flags from Pickle Rick CTF Machine by @tryhackme and @ar33zy available for free on TryHackMe here.
So, Let's Go!
"This Rick and Morty-themed challenge requires you to exploit a web server and find three ingredients to help Rick make his potion and transform himself back into a human from a pickle."
Click on the start Machine Button in the task, and give it 3-5 min to fully load.
Now, Start Attakbox or connect using Open-VPN.
Note: Check the connecting using ping command: ping <Machine IP>.
Enumeration
Our first step will be pretty simple, to run an nmap scan to find out open ports on the machine, Run the following command in the Terminal:
nmap -Pn -O -sV -sC -T5 -vv -p- <Machine IP>
Note to self, remember username!
Username: R1ckRul3s
-->"gobuster dir -w /usr/share/wordlists/dirb/common.txt -x .php,.txt,.html -u http://<Machine IP>/
Let's go for each subdomain one-by-one: http://<Machine IP>/<Subdomain>
- /.php (Status: 403) [Size: 291]
/.html (Status: 403) [Size: 292]
/.hta.php (Status: 403) [Size: 295]
/.hta (Status: 403) [Size: 291]
/.hta.txt (Status: 403) [Size: 295]
/.htaccess (Status: 403) [Size: 296]
/.htaccess.txt (Status: 403) [Size: 300]
/.hta.html (Status: 403) [Size: 296]
/.htaccess.html (Status: 403) [Size: 301]
/.htpasswd (Status: 403) [Size: 296]
/.htaccess.php (Status: 403) [Size: 300]
/.htpasswd.php (Status: 403) [Size: 300]
/.htpasswd.txt (Status: 403) [Size: 300]
/.htpasswd.html (Status: 403) [Size: 300]
Code/Status 403 mean we dont have permission to check these pages.
- /assets:
- /denied.php, /login.php & /portal.php are all redirecting to /login.php:
After login we got a Command panel:
Lets try to run simple linux command like: ls, whoami , date, cal ,etc.
OK, so its a Linux Server. Now lets see results of ls:
Got a list of files on the server. lets try to read a file using "cat <filename>".
OOhhooo some commands are disabled.
lets try to access Sup3rS3cretPickl3Ingred.txt using url method:
http://<Machine IP>/Sup3rS3cretPickl3Ingred.txt
Output:
Got the first ingredient.
So, now lets check other files too: clue.txt
Output: "Look around the file system for the other ingredient."
Use ls command to look around the /home dir and other directory.
Use sudo command also to check /root directory.
Third Ingredient: /root
Use sudo command to list files in /root directory and read the file usin g tac or less command with sudo :
Output: fleeb juice










Comments
Post a Comment