Reconnaissance
First, I added the new host to my known ones:
Then I performed a Nmap scan:
So I checked the website:
Seems to be some kind of security dashboard. After inspecting the source code, I found the /capture
subdirectory which allows to download a .pcap
:
Once downloaded, I opened it with Wireshark. Unfortunately, this pcap hadnโt anything interesting.
Exploitation
Going back to check the website again, I tested for IDOR (Insecure Direct Object Reference) in the url, because the capture creation relays under /data/<ID>
, so I tested it changing manually the id:
This worked and gave me a new capture to download.
Following along the TCP stream I noticed that there were FTP credentials in plain text:
FTP Creds:
nathan:Buck3tH4TF0RM3!
So I logged in the FTP service and saw the user.txt, but got no permissions. So I tried tris credentials via ssh, which also worked:
Privilege escalation
I uploaded linpeas
to the machine:
So I checked GTFObins:
Info
If the binary has the Linuxย
CAP_SETUID
ย capability set or it is executed by another binary with the capability set, it can be used as a backdoor to maintain privileged access by manipulating its own process UID.
Got the root flag :)
Machine pwned!