Hi, my name is Vitalii Rudnykh 👋

Jun 19, 2022

📝 TryHackMe. Walkthrough: Pickle Rick


Rick turned into a pickle, you need to help him become human again, to do this you need to find three ingredients that will help Rick make a potion.

Open the site, look at the source code and see the tooltip:

<!--
  Note to self, remember username!
  Username: R1ckRul3s
-->

Пробуем сбрутфорсить директории на веб-сервере.

$ python3 dirsearch.py -u http://10.10.180.253/
...
[11:15:43] 200 -  882B  - /login.php
[11:16:01] 200 -   17B  - /robots.txt

We go to http://10.10.180.253/login.php, and see the authorization form. The username we already know.

We look at http://10.10.180.253/robots.txt, it looks like a password.

Try to log in. We see a form for entering commands. Try ls.

pic 1

We see the file Sup3rS3cretPickl3Ingred.txt, try to get its contents through cat and get error Command disabled. Use less instead of cat (alternatively, you can also use nl).

What is the first ingredient Rick needs?

Answer: *** m*****k ***r


Whats the second ingredient Rick needs?

Check the file system and find the next ingredient in the /home/rick/. There is a space in the file name, so it must be escaped.

less /home/rick/second\ ingredients

Answer: * j***y ***r


Whats the final ingredient Rick needs?

The third ingredient is in the /root/ directory, but we can’t just get there, so try sudo.

Answer: fl*** ****e