Hack The Box

Hack The Box: Jerry Walkthrough

Jerry uses default Tomcat Manager credentials and a deployed WAR payload to obtain SYSTEM.

Jerry Hack The Box machine artwork
Official Hack The Box machine artwork for Jerry.Hack The Box machine page opens in a new tab

Recon & Enumeration

Use nmap to scan for open ports and services:

HackTheBox “Jerry” Walkthrough, figure 2

Visit the app on port 8080.

HackTheBox “Jerry” Walkthrough, figure 3

Opening the site, a standard installation of the Tomcat Web Application is evident. Clicking on the "Manager App" option triggers a pop-up login prompt.

HackTheBox “Jerry” Walkthrough, figure 4

Upon cancellation, redirection occurs to the "/manager/html" web directory, which prominently displays a specific username and password.

HackTheBox “Jerry” Walkthrough, figure 5

After refreshing the page, the login prompt reappears, and we will enter the recently exposed credentials: Username: tomcat Password: s3cret.

HackTheBox “Jerry” Walkthrough, figure 6

After logging in, you will be directed to the "Tomcat Web Application Manager" page. While scrolling down, a noteworthy finding emerges. Within the "Deploy" section, there is an opportunity to upload a .war file.

We will generate a reverse shell WAR file using msfvenom and as per the structure here opens in a new tab.

HackTheBox “Jerry” Walkthrough, figure 7

Upload the file to the web application and proceed to deploy it.

HackTheBox “Jerry” Walkthrough, figure 8

Next, we will observe the payload of the war file listed in the Applications section.

Start a listener.

HackTheBox “Jerry” Walkthrough, figure 9

Click on "/shell" in the applications section to trigger the reverse shell payload.

HackTheBox “Jerry” Walkthrough, figure 10

And we get a SYSTEM shell.

Further reading

Evidence connected to this article.

Back to article start