Writing THM excersise solvings here and my thoughts on how to solve them
https://tryhackme.com/room/mustacchio
I started again with nmap
to find which ports would be vulnerable.
Going to http I found a website with some text and images so I decided to run gobuster
After looking at /custom
I found a users.bak file
Which appeared to be a user database file with admin and password? admin1868e36a6d2b17d4c2745f1659433a54d4bc5f4b
Running hashcat gave me the password for admin bulldog19
. I just needed to figure out where to put this so I ran nmap with more ports
At port 8765
I found an admin panel
I decided to open burpsuite and view what sending a comment does and it showed something about /auth/dontforget.bak
Seeing the file be xml I thought that it could have XML external entity (XXE) injection
vulnerability
I made a injection payload and submitted it.
Now I wanted to get barrys id_rsa file and I could do that by changing the request a bit.
Now I got the rsa now I just neet to use it to login
I started doing a priviledge escalation checklist and when doing find / -perm -u=s -type f 2>/dev/null
I found /home/joe/live_log
When viewing it I found this
Noticing that the command tail
doesn’t specify an absolute path, which opens it to vulnerability
So I decided to make a tail file and looked online what would be a good payload and found that version and after running ./live_log
I got root access and flag
The hardest part was to find a way to get into the ssh but after that quite pleasable. Very good CTF in my opinion