Sitemap
Mac Leo

Mac Leo

Hacker |Cybersecurity Researcher | CTF Player |Cybersecurity Enthusiast

TryHackMe: Agent T

3 min readJan 19, 2023

Task 1: Find The Flag

Agent T uncovered this website, which looks innocent enough, but something seems off about how the server responds…

After deploying the vulnerable machine attached to this task, please wait a couple of minutes for it to respond.

  1. What is the flag?

ANS: flag{4127d0530abf16d6d23973e3df8dbecb}

EXPLANATION:

Step 1: Always Recon , nmap:

nmap -sC -sV <THM_IP>

Press enter or click to view image in full size

Step 2: We noticed port 80 is open which is web portal is possible, Open in Web Browser.

Press enter or click to view image in full size

Step 3: Open Burp and intercept the request to check what the responses are.

Press enter or click to view image in full size
Press enter or click to view image in full size

Step 4: We noticed the PHP version, so let`s check if there is any exploit on the info. We found so many scripts to exploit the vulnerability via Google. But I personally found this script works efficiently for the challenge.

Get Mac Leo’s stories in your inbox

Join Medium for free to get updates from this writer.

https://github.com/musyoka101/PHP-8.1.0-dev-Exploit

Press enter or click to view image in full size
Press enter or click to view image in full size

Step 5: git clone https://github.com/musyoka101/PHP-8.1.0-dev-Exploit and chmod 777 exploit.py

Step 6: python3 exploit.py <THM_IP>

NOTE: In the screenshot, the name of the file is different because I renamed it.

Step 7: find / -name flag.txt 2>/dev/null

Step 8: cat /flag.txt

FINALLY, WE DISCOVERED THE FLAG

*****************THANK YOU****KEEP LEARNING ******************
HOPE GUYS, THIS WALKTHROUGH MIGHT HELP YOU,IF SO LIKE THE WRITE UP ,LIKE & FOLLOW TO THE BLOG AND PROFILE WILL BE MUCH APPRECIATED
FOLLOW MY PROFILE FOR MORE WRITE-UPS
****************************PEACE********************************

--

--

Mac Leo
Mac Leo

Written by Mac Leo

Hacker |Cybersecurity Researcher | CTF Player |Cybersecurity Enthusiast