-
Book Overview & Buying
-
Table Of Contents
Kali Linux CTF Blueprints
By :
The following are the exploit guides for the scenarios created in this chapter. These are guidelines, and there are more ways to exploit the vulnerabilities.
The brief provided for this exploitation guide is assumed to be:
Use the common web framework vulnerability to capture the RFLAGG's finances spreadsheet from his documents directory.
The following are the steps to be performed for this scenario:

The great thing about this scenario is that the vulnerable package runs on a high port, which means that a user who only runs quick Nmap scans won't find it.
ColdFusion directory; that wasn't a trick.)This looks vulnerable in itself, containing installation files, so we can make a note of it and move on. There's an admin directory, so we click on that, and we are presented with a login page.
admin:adminadmin:passwordguest:guestadministrator:administratoradmin:coldfusioncoldfusion:coldfusionexploit/multi/http/coldfusion_rds) that can deliver Meterpreter payloads. If you take this route, Meterpreter will carry you the entire way in a canoe, and the usage of Meterpreter is found in the next exploitation guide. 
That looks vulnerable to the might of URL-based directory traversal. By supplying a directory that goes up as well as down the directories, as shown in the preceding screenshot, we can potentially access sensitive files. So, in this example, we're going to go after the Excel sheet with RFLAGG's finances in it. We supply the following URL:
192.168.0.5:8500/CFIDE/componentutils/cfcexplorer.cfc?method=getcfcinhtml&name=CFIDE.adminapi.accessmanager&path=../../../../../../../../../users/Rflagg/Documents/finances.xls
The vulnerabilities shown are:
The brief provided for this exploitation guide is assumed to be:
Using a vulnerable database, become an administrative user on The Wizard's computer and describe the desktop picture.
The following are the steps to be performed for this scenario:
The Wizard as a description.-A to detect the currently running service, as shown in the following screenshot:
As we were informed that it's a vulnerable database we are to attack, we can assume that the MSSQL service is the target.
Hex0rbase is the tool of choice for testing usernames and passwords.
Using the inbuilt username and password list for MSSQL, we can test default credentials pretty quickly, as shown in the following screenshot:

exploit/windows/mssql/mssql_payload, which (provided the antivirus isn't on the box) will give us a Meterpreter payload on the box. It needs to be configured as shown in the following screenshot:
The preceding screenshot sets the Metasploit values as:
METHOD = cmdPASSWORD = saRHOST = the targetRPORT = 1433 (default for MSSQL)USERNAME = saUSE_WINDOWS_AUTHENTICATION = falseThe vulnerabilities shown here are:
The brief provided for this exploitation guide is assumed to be:
Use the vulnerable service to extract the user Jay Bacon's secret file stored at C:/Bearnaisesauce.txt.
The following are the steps to be performed for this scenario:

However, since Nmap is useful for port identification anyway, you can use the -Pn operator to perform a ping sweep on the range given.
Jay-PC, Bacon-PC, JayBacon, or something similar, we know we're on the right track.nmap –sU<IP>) will show that port 69 is open.tftp command from the Kali terminal, and so we connect.There's no way to know which folder TFTP is built into. So, the methods we try are:
get Bearnaisesauce.txtget ../../../../../../../ Bearnaisesauce.txtget C:/ Bearnaisesauce.txtThe file should be retrieved and the challenge is completed.
The vulnerabilities shown here are:
Change the font size
Change margin width
Change background colour