Surfer
Surfer
Room link: https://tryhackme.com/room/surfer
Scanning
Just to ensure that I wasn't missing anything. I ran an aggressive NMAP scan.
ajread@aj-ubuntu:~/TryHackMe$ nmap -A [REMOTE IP]
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-27 19:16 EDT
Nmap scan report for [REMOTE IP]
Host is up (0.073s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.4 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.38 ((Debian))
| http-cookie-flags:
| /:
| PHPSESSID:
|_ httponly flag not set
| http-robots.txt: 1 disallowed entry
|_/backup/chat.txt
|_http-server-header: Apache/2.4.38 (Debian)
| http-title: 24X7 System+
|_Requested resource was /login.php
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.39 secondsI ran nikto as well to see what possible web app vulnerabilities there were.
As seen, there was a robots.txt entry. I investigated the entry and found and interesting chat log.
Therefore, I was able to log into the application with credentials admin:admin. On the right hand side within Recent Activity, the application stated that the flag was located within /internal/admin.php.The chat above talked about the export2pdf tool that was new as well. I needed to conduct SSRF to access the internal page. I decided to check out how the export2pdf interacts with the webpage. It appeared to submit a POST request to an internal info page.
I changed the value of the webpage to be the /internal/admin.php page and resent the request by clicking the Export to PDF button.
Finally, I found the flag!
Last updated