TryHackMe Vulnversity: enumeration to root
Vulnversity is a beginner boot-to-root room on TryHackMe and a clean tour of the basic offensive workflow: enumerate, find a foothold, escalate. I did it during my internship as an early hands-on box. This is the path, with flag values left out.
1. Enumeration
Everything starts with a port scan. nmap -sV -p- turns up FTP, SSH, Samba, a Squid proxy, and an HTTP server on the non-standard port 3333. The lesson the room drives home is to read the services before touching them; the web app on 3333 is the way in.
nmap -sV -sC -p- <target-ip>
2. Directory brute-forcing
The site has little on the surface, so I brute-forced paths with Gobuster. That surfaced an /internal/ directory holding a file-upload form, exactly the kind of feature worth poking at.
gobuster dir -u http://<target-ip>:3333 -w /usr/share/wordlists/dirb/common.txt
3. Bypassing the upload filter
The upload form tries to block executable files by extension, but the block-list is incomplete. PHP won't upload, yet an alternate PHP extension such as .phtml sails through, a textbook block-list failure. I uploaded a PHP reverse shell renamed with the allowed extension and started a listener.
nc -lnvp 4444 # listener
# browse to the uploaded file to trigger the shell
That lands a shell as the www-data web user, enough to read the first flag.
4. Privilege escalation via SUID
From the low-privilege shell, the standard move is to look for SUID binaries, programs that run as their owner (often root) regardless of who launches them.
find / -perm -u=s -type f 2>/dev/null
The interesting result is /bin/systemctl with the SUID bit set. GTFOBins documents the technique: write a small systemd service whose ExecStart runs a command of your choosing, then start it through the SUID systemctl so it executes as root. I used it to read the root flag.
What it teaches
Vulnversity is simple, but the shape is the same on every machine I've touched since: thorough enumeration beats cleverness, input filters that block-list instead of allow-list tend to fail, and a single over-privileged binary can undo everything else. From the defender's side, the fixes are the mirror image, allow-list uploads and validate content type, and never leave systemctl (or any shell-capable binary) SUID-root.
More writing
- Five ways JWT validation fails, and how to test for them
- The row ID that scored 100%: data leakage in the Bot-IoT dataset
- Hiding instructions in a document: indirect prompt injection in a RAG chatbot
- Access control belongs in the retrieval layer, not the prompt
- Quarantining a compromised EC2 instance in seconds with GuardDuty and Lambda
- Working the OWASP Top 10 by hand: PortSwigger and TryHackMe