Posts Tryhackme - Rick And Morty
Post
Cancel

Tryhackme - Rick And Morty

Rick and Morty

It’s a write-up about the Tryhackme room : [Rick and Morty]

1. Challenge

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.

2. Solution

First thing let’s run a scan on the IP we got

for this i’ve used nmapAutomator

nmapAutomator scan

let’s go ahead to the 80 port and check the website

site

there’s nothing interesting here so let’s take a look on the webpage source code

Source code

that’s great we have found the username

1
Username: R1ckRul3s

but we can’t see any login form

let’s continue our enumeration

for this im going to use dirsearch

dirsearch

okay let’s check the robots.txt

robots.txt

hmmm i’ll keep that in mind

let’s go and check /assets/

assets

i guess nothing is important here

let’s go to the login.php page

login.php

let’s use the username we found earlier and for the password i’ll go with that text we found in robots.txt

logged

okay we are in

let’s try to create a reverse shell through it

shell

okay we are able to get our shell

i’ve ran ls and we got a suspicious file name

Sup3rS3cretPickl3Ingred.txt

when we cat that file we find our first flag

then let’s cat the clue.txt

1
2
3
$cat clue.txt

Look around the file system for the other ingredient.

if we play around in the system we’ll find the second flag in /home/rick

1
2
3
$cat 'second ingredients'

**!REDACTED!**

okay we still have to find the third flag now

let’s check our current user

1
2
3
$whoami

www-var

can we preform a preform a simple PE ?

let’s check our sudo permissions

sudo -l

let’s go root then check the /root directory

1
2
3
4
$sudo su
$ls /root
3rd.txt
snap

finally let’s cat our 3rd flag

1
2
$cat /root/3rd.txt
!REDACTED!

i guess that’s it for this room. Peace.

This post is licensed under CC BY 4.0 by the author.