TryHackME: RootMe Walkthrough
RootMe felt like a short, satisfying story. It had a clear beginning with reconnaissance, a middle where I gained access, and an ending where I escalated to root. I treated it like a real-world engagement: stay curious, stay organized, and make every step easy to verify.
PART 1 — Reconnaissance
I started with reconnaissance. Running nmap -sC -sV 10.201.17.67 showed two open ports. One was an Apache 2.4.41 web server, and the other was SSH on port 22. That quick scan already told me where to focus. I prefer mapping things carefully rather than testing everything blindly. Knowing the exact versions made later steps easier.
- Scan the machine, how many ports are open? 2
- What version of Apache is running? 2.4.41
- What service is running on port 22? SSH
Next came enumeration. Using gobuster to search for hidden directories, I found a secret path called /panel. Inside, there was a file upload form. That immediately caught my attention because upload forms often lead to remote access. I tried uploading a PHP reverse shell, but .php files were blocked. Instead of forcing it, I renamed the file with a different extension (.phtml). The upload worked perfectly.
- What is the hidden directory? /panel
PART 2—Getting a Shell
Once uploaded, I started a netcat listener and visited the uploaded file in the browser. The connection came back, and I had a shell. The first thing I did was make it stable and interactive. I used Python to spawn a proper terminal with python -c ‘import pty; pty.spawn(“/bin/bash”)’. Then I adjusted the terminal settings so I could type commands smoothly.
PART 3—Privilege Escalation
For privilege escalation, I ran a search for SUID binaries using find / -user root -perm /4000 2>/dev/null. The results showed something unusual: /usr/bin/python had the SUID bit set. That is not normal and usually means there is a privilege escalation opportunity.
- Which weird file has SUID? /usr/bin/python
After that, I searched for the user flag using -type f -name user.txt 2>/dev/null. I found it inside /var/www/user.txt. Reading it confirmed that my foothold was solid. That small success was motivating and proved my method was working.
I used a known Python technique to open a root shell: python -c ‘import os; os.execl(“/bin/sh”, ”sh”, ”-p”)’. The command worked, and I gained root access. I then located the root.txt file and read it to complete the task.
What I liked about RootMe is how logical it was. Every step had a clear reason and result. It tested both patience and creativity without being overwhelming. Throughout the process, I kept my notes neat and my commands organized. I avoided unnecessary noise, respected the system, and focused on clarity.
Get Maxine Reyes’s stories in your inbox
Join Medium for free to get updates from this writer.
In the end, RootMe was not just about hacking into a box. It was about thinking critically, staying disciplined, and documenting cleanly. It reminded me that good cybersecurity work is not about flashy exploits but about steady progress and smart habits. Those are the qualities I bring to any challenge: curiosity, attention to detail, and clear, responsible execution.






