Starting with a port scan shows that SSH is open and also a web app running on port 1337.
Starting Nmap 7.95 ( https://nmap.org ) at 2025-09-01 16:49 EDT
Nmap scan report for 10.10.129.55
Host is up (0.045s latency).
Not shown: 65533 closed tcp ports (reset)
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0)
1337/tcp open http Apache httpd 2.4.41 ((Ubuntu))
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 67.39 seconds
I checked the page source on the landing page and found an interesting comment:
I use ffuf to see if we can discover some subdirectories using this information:
The hmr_log directory contains some error logs that gives us an email address ([email protected]). I tried to bruteforce my way in using the email but wasn't able to find the password. Let's exlore the forgot password functionality instead. If we enter our newly found email address we have 3 minutes to find the correct 4 digit code being sent to that email address.
Below is a Python script that will brute force this and find the 4 digit code within the 3 minutes.
Using this code and doing a password reset will get us the first flag.
We're pretty limited in what we can do. We can run 'ls' but not much more.
Looking at the source code however gives us a jwtToken
Decoding this using jwt.io shows us this:
The 'ls' I mentioned earlier showed us that there was a key in that directory called '188ade1.key'. We can generate a new JWT referencing that key in the 'kid' header and changing the 'role' in the payload to admin and try sending a request to cat the root flag (which we got the path to in the task (/home/ubuntu/flag.txt).