Skip to content
RCE Write-up Beginner

File Upload by RCE: Apache Tomcat Manager Exploit

The Tomcat Manager application was reachable with weak or default credentials, allowing an attacker to log in and deploy a malicious WAR file containing a JSP web shell. That gave remote command execution on the server as the Tomcat user.

medium.com

Published on medium.com

if you can connect me in LinkedIn i wanna more friends that interested in Bug Hunting & Cyber Security .

Digvijaysingh, on medium.com

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 the Tomcat Manager was exposed with weak or default credentials, and the deploy function was left enabled, so an authenticated user could upload a WAR that executes code.

Impact

An attacker with valid Manager credentials could run arbitrary commands on the server and obtain a shell as the Tomcat user.

What the attacker needed

Network access to port 8080; valid or guessed Manager credentials

How it was found

  1. Scan the target and find the Tomcat service on port 8080.
  2. Open the Manager page and log in with the discovered credentials.
  3. Create a JSP file that runs system commands and package it into a WAR archive.
  4. Upload the WAR through the Manager interface.
  5. Visit the deployed application path and pass a command to run it.
  6. Start a listener and trigger a reverse shell to get an interactive session.

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.

Apache Tomcat is a Java web server, and its Manager page lets administrators deploy web applications. If that page is reachable and protected by a weak password, anyone who guesses it can upload their own application that runs commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.