Pickle Rick
A Rick and Morty CTF. Help turn Rick back into a human!
Pickle Rick is a Rick and Morty themed tryhackme room where we exploit a webserver to find 3 ingredients or flags.
Questions :
What is the first ingredient Rick needs?
What's the second ingredient Rick needs?
What's the final ingredient Rick needs?
Enumeration
NMAP
nmap -sS -sC -sV -A -O -vv BOX_IP
output
we have two open ports, 20 (ssh) and 80 (apache2 httpd)
Site
Source Code
Username: R1ckRul3s
find out interesting directories and files
robots.txt
(a string like a password???)
Login
trying to login with User:R1ckRul3s and Password:Wubbalubbadubdub in /login.php
Success
RCE
on this panel, we were able to execute commands on the system
then let's try a reverse shell from that
for this we will use python, so we have to know where it is (and if it exists)
all right, let's run the reverse shell
(changing the ip address for my thm-vpn IP)
Reverse Shell
Shell to TTY
python3 -c "import pty; pty.spawn('/bin/bash')"
answering the first question
cat Sup3rS3cretPickl3Ingred.txt
walking to the second question
answering the second question
walking to root
looking at the commands that the user can run
sudo -l
EASY!!!!!
We can run ANY command as root without password :O
Root flag (3rd question)
Last updated
Was this helpful?