Simple CTF — Try Hack Me

Lime1O1
3 min readDec 20, 2021

--

Beginner level ctf ….

Hi folks, today I am going to solve TryHackMe box, named Simple CTF, made by MrSeth6797..

Initial Recon :

1- First we will do a port scan using nmap

sudo nmap -Pn -T5 -p-  10.10.28.215 
basic nmap scan

-p- : To scan All Ports (65535)

-Pn : Treat all hosts as online — skip host discovery ( “ disable ping scan “)

-T5 : to speed up time

Now we have three open ports ( “ 21 ,80,2222 “ ) :

We need to know more information about these ports ..

sudo nmap -Pn -T5 -A 10.10.28.215  -p 21,80,2222 --script http-enum
advanced nmap scan

FTP → Enumeration :

Can we access ftp files by anonymous user?

ftp 10.10.28.215
FTP → Enumeration

We can login with an anonymous user :

But we don’t have permissions to download files ,

Note: Sometimes we can upload a file in ( ftp ) and read it from the web server in this case we upload reverse shell ….

I tried brute force ( SSH ) : 2222 >> But to no avail ….

HTTP → Enumeration :

First we need to know the hidden ( DIR ), gobuster

But before running gobuster let’s see ( robots.txt )

robots.txt

Tried Access /openemr-5_0_1_3 , but to no avail

sudo gobuster dir -w /usr/share/wordlists/dirb/small.txt -u http://10.10.28.215
(DIR Brout Fource )

gobuster found :

/simple

Now we can see it is running Cms Made simple it is a Content Manager with version 2.2.8. Now we can use Searchsploit to know if the CMS 2.2.8 is vulnerable or not.

/simple
/simple

Use searchsploit in general as ( simple cms ) without specifying the version for public knowledge ….

searchsploit cms made simple
basic_searchsploit

We can determine the version to know the vulnerabilities in a particular version …

searchsploit cms made simple  2.2.8

We can see the CMS is vulnerable to SQL or SQLi injection …

To get the exploitation code :

                                                                                                             
┌──(root💀localhost)-[~]
└─# locate php/webapps/46635.py

/usr/share/exploitdb/exploits/php/webapps/46635.py
┌──(root💀localhost)-[~]
└─# cp /usr/share/exploitdb/exploits/php/webapps/46635.py .

Or you can get it from ( EXPLOIT DB ) :

https://www.exploit-db.com/exploits/46635

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

--

--

No responses yet

Write a response