Surfer
https://tryhackme.com/room/surfer
Nmap
Web Server
The root page for the web server takes us to a login page.
Trying some standard credentials we are able to gain access with admin:admin
. After login we are presented with the dashboard for 24X7 System+.
Inspecting the Admin's profile we take notice that the admin has mentioned a tool they have created that generates reports in pdf.
Going back to the dashboard we can see the button for exporting to pdf.
Testing the button we observe that by default this prints out the page located on http://127.0.0.1/server-info.php
.
Using feroxbuster
we enumerate for further files and discover the existence of /internal/admin.php
.
Running curl against the file we are given the message "This page can only be accessed locally."
Looking again at the tool for exporting2pdf we view the page source and can see where the tool takes the parameter "value=<url>".
Using the browser's inspector we change the value for value=
to point to http://127.0.0.1/internal/admin.php
. As this file can read locally we should, hopefully read the admin.php
file.
After updating the value in the browser inspector and running the tool again we are now able to read the room flag in admin.php
.
Last updated