How I Won a $2,000 Bug Bounty Using Only Nmap
An exposed Tomcat directory with read-write permissions allowed the upload of a web shell, leading to remote code execution. The attacker could then access other sensitive parts of the server.
medium.com
Published on medium.com
Bug bounty hunting is often seen as an art that requires sophisticated tools and techniques. But sometimes, the most effective approach can be as simple as using the right tool in the right way.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a misconfigured Tomcat instance with a directory that allowed file uploads without proper access controls.
Impact
The attacker could upload a web shell and gain remote code execution, then escalate to access other sensitive parts of the server.
What the attacker needed
Target runs Tomcat with default settings; exposed directory with read-write permissions; network access to port 8080
How it was found
- Run an Nmap scan to find open ports.
- Identify an HTTP service on port 8080.
- Perform a detailed scan on that port to discover Tomcat with default settings.
- Use Nmap scripts to enumerate services and find an exposed directory with read-write permissions.
- Upload a web shell to that directory.
- Access the shell to gain remote code execution and escalate access.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web server had a folder that anyone could write files to. The attacker put a small program there that let them run commands on the server, like a remote control. This is dangerous because it gives full access to the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.