TryHackMe: Agent T
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.
- What is the flag?
ANS: flag{4127d0530abf16d6d23973e3df8dbecb}
EXPLANATION:
Step 1: Always Recon , nmap:
nmap -sC -sV <THM_IP>
Step 2: We noticed port 80 is open which is web portal is possible, Open in Web Browser.
Step 3: Open Burp and intercept the request to check what the responses are.
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
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********************************










