• Register now to get access to thousands of Tutorials, Leaked content, Hot NSFW and much more. Join us as we build and grow the community.

Advertise Here

Advertise Here

Advertise Here

Hack the Seattle VM (CTF Challenge)

skander120

AMV Creator
S Rep
0
0
0
Rep
0
S Vouches
0
0
0
Vouches
0
Posts
133
Likes
20
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
This is another article for Boot2Root series in CTF challenges. This lab is prepared by HollyGracefull. This is just a preview of the original lab which stimulates the E-commerce web application which contains common security errors. Current vulnerabilities are listed below :

  • SQL Injection (Error-based)
  • SQL Injection (Blind)
  • Reflected Cross-Site Scripting
  • Stored Cross-Site Scripting
  • Insecure Direct-Object Reference
  • Username Enumeration
  • Path Traversal
  • Exposed phpinfo()
  • Exposed Administrative Interface
  • Weak Admin Credentials

WalkThrough

Firstly, let’s locate our target.

netdiscover

1.png


Our target is 192.168.1.8. Let’s scan it with nmap.

nmap –p- -A 192.168.1.8

2.png


The only port we found open was 80. Next, we fire up the Nikto.

nikto –h 192.168.1.8

3.png


Through nikto we discovered two directories : /admin/ and /images/. OK! Let’s make its mental note and decided to move forward with opening our target in the browser.

4.1.png


Opening it on the browser we found that it was an e-commerce site as hinted by the author. We checked every tab but found nothing except in the blog tab.

4.png


In the blog tab, when you will hover your mouse arrow over the admin in the phrase ‘Hey Admin!’. It will change from arrow to a hand that indicates that means it will open as it a click on.

5.png


When you click on it, it will show a username of admin. Ok! I made a note of it. Let’s now check the clothing tab.

6.png


There is nothing useful in this tab. As the author hinted that the website is vulnerable towards SQL attacks so let’s try one. This time let’s try a different SQL attack using BurpSuite. Capture the cookies of the webpage through BurpSuite.

7.png


Copy the cooky string and paste it in a simple text file.

8.png


Then start the SQL attack by typing the following command in the terminal of Kali.

sqlmap –r /root/Desktop/sea.txt –dbs

Here,

/root/Desktop/sea.txt is the path of the text file in which we had saved the cookies.

9.png


This command will give us the name of the following database.

10.png


Out of these databases, we will dump the tables of seattle with the following command :

sqlmap –r /root/Desktop/sea.txt –D seattle –tables

11.png


And with that, we will have all the name of the tables as you can see in the following image.

12.png


Next, we will dump the columns of the tables with the following command :

sqlmap –r /root/Desktop/sea.txt –D seattle –T tblMembers –columns

13.png


The execution of the above command will show the table names as follows:

14.png


Now in the table names, there is a table password. Now we already have the username of the admin and we just want the password. So now we will dump the contents of the password table.

sqlmap –r /root/Desktop/sea.txt –D seattle –T tblmembers –C password –dump

15.png


And voila! We have the password i.e. Assasin1

16.png


Now in the browser, go to my account tab and there you will find a login portal. Give the username and password of the admin and click on Login.

17.png


And you will be logged in as the admin.

18.png


This CTF does contain any flag. All that required was to have admin access and yooohoooo!! We have that.

Author: Yashika Dhir is a passionate Researcher and Technical Writer at Hacking Articles. She is a hacking enthusiast. contact here.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

452,499

349,821

349,831

Top