Internal

Room Link: https://tryhackme.com/room/internal

Scanning

Initial Scan

nmap -A 10.10.46.54

Scan all ports

No other ports found.

TCP/80 - HTTP

Wordpress is running under both /blog and /wordpress. /blog has a login page

Credentials found

Trying to login the page redirects to internal.htm so I add that to the host file.

We are able to successfully get into wordpress with the credentials

Reverse Shell Failed Attempt

revshell.php code

Unable to upload the plugin due to write issues

Reverse Shell

TWENTY SEVENTEEN theme had a writable pages so I modified the 404 page with a reverse shell and then navigated to a page that does not exist.

Just added the revshell.php code mentioned earlier.

Kali

Browser

A page that doesn't exist to trigger the reverse shell.

Get full TTY shell

LinPeas

Kali

Victim

Linpeas was able to find two sets of credentials. phpmyadmin credentials worked.

The note for Bill

Able to ssh in with the credentials. There is a file that says that Jenkins is running and we can confirm that is is running with netstat as well.

Pivot

From Kali I am now able to reach the Jenkins server

Option #1

For the rest of guide I used this option.

Option #2

If I followed this way jenkins would be redirected to port 4444 on kali.

Bruteforce

After checking for some time I couldn't find any files with credentials that worked and the jenkins server is being ran on docker and I had no access to anything for that so I resorted to using hydra. What I did was tried logging in with fake credentials than seeing the request and copying the info I needed to start bruteforcing.

The default hydra was giving false positives and not getting the correct credentials so I downloaded from gitlab and ran the bruteforcing again.

Credentials were found.

Jenkins Web

Just added a reverse shell to the job and ran it.

Kali

Setup a listener

Privilege Escalation

There was a note under opt for Aubreanna that had the credentials for root.

Tried logging in with the credentials with ssh and it worked.

Last updated