Pickle Rick — A Rick and Morty Themed CTF — TryHackMe Walkthrough

Nathamayil Natesh
4 min readOct 17, 2024

--

Hey guys! So recently, I came across the popular TryHackMe room : Pickle Rick. As someone who has watched the show, I found it quite fun to solve the themed and gamefied challenge.

I decided to blog a walkthrough of this room, so here we do!

The Room has one task : Pickle Rick

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.

Deploy the virtual machine on this task and explore the web application: MACHINE_IP

Click on Start Machine and start the AttackBox

Let’s do some basic recon first:

The website opens up this page:

Let’s check the source code:

Looks like we got our first clue, the username is R1ckRul3s. Let’s dig in deeper for more clues:

The assets page has the following files. After looking through cookies.txt, I found about robots.txt. Let me perform a curl:

We got a password : Wubbalubbadubdub

Whew! A wild guess about portals and here we are, there’s a login page!

Use the username and password we got earlier — we’re in!

Let’s try some Linux commands to see if Command Injection works:

Okay, so it’s obvious we need to check the first file. Time to try cat Sup3rS3cretPickl3Ingred.txt

Got this instead:

Let’s try tac Sup3rS3cretPickl3Ingred.txt. Looks like we got our first ingredient :)

Let’s look at clue.txt too using tac. Looks like we will have to look at the file system for the remaining two ingredients :)

I proceeded with tac portal.php, and got some information — all our usual recon commands are disabled:

Clicking on Beth Clone Notes also led to this, one thing to note here is that the URL says denied.php:

Let’s get back to the previous page and find out what we can use using the command sudo -l

So time to go on a wild goose chase for the other two ingredients. Let’s see what we can find, starting off with the home directory with ls ../../../home

Let’s try ls ../../../home/rick

and time for the tac command : tac ../../../home/rick/”second ingredients” and it’s done, we have our second ingredient!

Now, moving to finding our last ingredient. After a lot of trial and errors, I ended up with this after looking into the root directory with the command sudo ls ../../../root

And let’s find out the final ingredient with sudo tac ../../../root/3rd.txt

Looks like Rick is finally back!!

To summarize things :

What is the first ingredient that Rick needs?

Answer: mr. meeseek hair

What is the second ingredient in Rick’s potion?

Answer: 1 jerry tear

What is the last and final ingredient?

Answer: fleeb juice

Hope this helps!!

--

--