circle-3Exploitation

Topics

Common Vulnerabilities

  1. Password Backtrace Disclosure Visiting /auth.jsp might reveal passwords in backtraces.

  2. Double URL Encoding Vulnerabilities like CVE-2007-1860 allow management interface access via:

    pathTomcat/%252E%252E/manager/html
  3. 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.

  4. Path Traversal Exploit path traversal with:

    <tomcat_target_ip>/lalala/..;/manager/html

    or

    http://<tomcat_target_ip>/;param=value/manager/html

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

  1. TomcatWarDeployer Deploy shells or bind shells via:

  2. Clusterd Automate testing:

  3. Manual Web Shell Example JSP for command execution:

    Package it into a WAR file and upload it.


Other Tools

Last updated