Information
Room
- Name: RootMe
- Profile: tryhackme.com
- Difficulty: Easy
- Description: A ctf for beginners, can you root me?
Write-up
Overview
Install tools used in this WU on BlackArch Linux:
Network enumeration
Service scn with nmap:
Web enumeration
Let's find hidden directories:
There is an upload form at /panel/
.
Web exploitation
The file /index.php
let us know that the app is in PHP.
Uploading a .png
image is allowed but not a php file (.php
).
Let's generate a webshell:
We can bypass the upload by using the .phtml
extension.
Let's obtain a reverse shell from our web shell:
On my machine:
System enumeration
Let's find SUID binaries:
/usr/bin/python
should not have the SUID flag.
We can consult GTFObin:
Let's get our privileged shell: