Skip to content
Misconfiguration Write-up Intermediate

Reconnaissance

The Tomcat host-manager was accessible with default credentials while the manager was not, and it allowed deploying a web application from a UNC path pointing to an attacker-controlled SMB server. An attacker could host a malicious WAR file on that share and have Tomcat deploy it, gaining remote code execution on the Windows server.

certilience.fr

Published on certilience.fr

During an internal audit mission, I was led to exploit a Windows based Tomcat instance. Now usually, exploiting a Tomcat instance involves accessing the “manager”, which is suite a simple exploit.

cyril, on certilience.fr

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 host-manager was left enabled with default credentials and allowed deployment from a remote UNC path, so Tomcat loaded attacker-supplied application code from an SMB share.

Impact

An attacker with access to the host-manager could deploy a malicious application and execute system commands on the Windows server, potentially with system rights.

What the attacker needed

Host-manager reachable; default credentials valid; attacker-controlled SMB server

How it was found

  1. Scan the target and find Tomcat listening on port 8080.
  2. Try default credentials on the manager, which returns 403.
  3. Try the same credentials on the host-manager, which returns 200.
  4. Create a WAR file containing a JSP backdoor.
  5. Start an SMB server sharing a folder that contains the WAR file.
  6. Deploy the application from the host-manager using a UNC path to the SMB share, then access the backdoor.

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.

Tomcat is a Java web server. It has a management page that can install web applications, and if that page is protected only by a weak default password, anyone who guesses it can use it. The attacker made Tomcat fetch an application from a shared folder on the attacker's own machine, and that application ran commands on the server.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.