Simple CTF TryHackMe

1) Intro 


2) How many services are running under port 1000? 

 

For this we can use simple nmap command which is nmap <IP-TARGET>

and as the question asked, we can see there are 2 services are running under port 1000. 


3) What is running on the higher port? 

ssh


4) What's the CVE you're using against the application? 

we will be using command gobuster dir -u <URL> -w <wordlist> to see if there is any directory we can access. 



here, the /simple directory can be accessed



as we scroll down, we can see version used by this cms, when it comes to something around "version", we can try to search any CVE associated with that version

In Exploit-DB we can see the exact CVE associated with the version as suspected. 

CVE-2019-9053


5) To what kind of vulnerability is the application vulnerable? 

sqli


6) What's the password? 

to know what password is being used, we need to download the exploit file first


then we need to put the file at /root


we then execute this command python2 46635.py -u http://10.201.65.172/simple/ -c -w /root/Desktop/Tools/wordlists/rockyou.txt

what this command do is basically perform an automated password-guessing / brute-force / credential attack against the login or form at /simple/, using rockyou.txt as candidate passwords.


After a while, it will show both username and its password. 

7) Where can you login with the details obtained? 

ssh


8) What's the user flag? 

Here we need to SSH into the mitch account at the target ip address

ssh mitch@<TARGET-IP> -p -2222


after that, we can see the file and its content



9) Is there any other user in the home directory? What's its name? 

First we identify our working directory and go to home directory to see if there is any other user aside from mitch



10) What can you leverage to spawn a privileged shell? 

for this we can user sudo -l to see what our user can do.

here we can see that user mitch can execute the vim command without password. 


11) What's the root flag? 

from the infromation we get from 10) we then go to GTFOBin, which is a curated list of Unix binaries that can be used to bypass local security restrictions in misconfigured systems.

we can search for vim here


we use this command to get into root. 


the question mentioned about root, so we try to see if there is anything under root, and as we suspected, we find the flag. 


Comments

Popular posts from this blog

Data Exfiltrtation Detection (DNS, FTP, HTTP, ICMP)

Firewall, WAF, and VPN manual log Analysis using command line.

Reversing ELF TryHackMe