Exploitation
Topics
Common Vulnerabilities
Password Backtrace Disclosure Visiting /auth.jsp might reveal passwords in backtraces.
Double URL Encoding Vulnerabilities like CVE-2007-1860 allow management interface access via:
Insecure Example Scripts Apache Tomcat versions 4.xβ7.x include examples susceptible to XSS or information disclosure. Examples:
/examples/jsp/num/numguess.jsp
/examples/servlet/HelloWorldExample
Check and restrict access to these paths.
Path Traversal Exploit path traversal with:
or
Using Metasploit Framework
Leverage the tomcat_mgr_upload
exploit available in Metasploit for Tomcat file upload vulnerabilities. Launch Metasploit and execute the following commands:
After exploitation, a reverse shell is obtained, allowing command execution via the meterpreter
shell.
Remote Code Execution (RCE)
If you gain access to the /manager/html interface, you can upload and deploy a .war
file to achieve RCE.
Example:
Metasploit can automate this:
To create a reverse shell WAR file:
Other Methods
TomcatWarDeployer Deploy shells or bind shells via:
Clusterd Automate testing:
Manual Web Shell Example JSP for command execution:
Package it into a WAR file and upload it.
Other Tools
Last updated