Pickle Rick
Last updated
Last updated
This Rick and Morty themed challenge requires you to exploit a webserver to find 3 ingredients that will help Rick make his potion to transform himself back into a human from a pickle.
Using nmap
to find open ports and services. nmap -sC -sV -oN {outputfile} {IP}
We find ports 22 (ssh) and port 80 (http) open
Using gobuster to brue-force web directories gobuster dir -u http://{ip} -w {wordlist} -o {outputfile} -x php,txt,html,css,js
Upon navigating to the website,
Inspecting source code we see,
Checking out the directories we got from Gobuster
fail.gif
picklerick.gif
portal.jpg
rickandmorty.jpeg
Nothing hidden in the images
Wubbalubbadubdub
Using the username we got previously and hoping that the random gibberish from robots.txt might be the password,
Username:R1ckRul3s Password: Wubbalubbadubdub
..and,we're in
We see a command panel right after login.Convenient huh?
Inspecting source code, we see
Vm1wR1UxTnRWa2RUV0d4VFlrZFNjRlV3V2t0alJsWnlWbXQwVkUxV1duaFZNakExVkcxS1NHVkliRmhoTVhCb1ZsWmFWMVpWTVVWaGVqQT0==
which is a RABBIT HOLE (literally!!, keep on base64 decoding and you'll get the text "RABBIT HOLE")`
Upon further inspection, we are denied permission to all the other pages. Something about the real rick
Running ls
on command panel
cat
cannot run since it is disable(well, there goes our convenience)
WORKAROUND (thank you ,JOHN HAMMOND): using grep .
(to grep for everything in a specific file) we find :
Sup3rS3cretPickl3Ingred.txt
1st ingredient: xx. xxxxxxx xxxx
Clue.txt : Look around the file system for the other ingredient
We can try a reverse shell to get a more stable connection since navigating the file system through the given command panel can be cumbersome.
netcat reverse shell not working.
Python3 found(which python3
)
Second ingredient can be found in /home/rick/second ingredients
2nd ingredient: x xxxxx xxxx
Running sudo -l, we find that www-data can run as root without password. So sudo bash
gives root access - We find 3rd ingredient.txt in /root/3rd.txt
3rd ingredient: xxxxx xxxxx
python reverse shell from with netcat listening on the attacker's machine and running this command in the command panel
Stabilizing the reverse-shell using (not required for now,but is a cool trick)