Ted's cave

Crawlthroughs and projects

View on GitHub
21 November 2024

Kioptrix

by

ted

Kioptrix


picture

Going into our kali machine we determine our ip with ifconfig and then use the command netdiscover -r x.y.z.0/24 which uses address resolution protocol to discover every ip address on the subnet of 24.

picture

Nmap #Nmap


SYN (hey port are you open) –> SYNACK (yeah I’m open lets make the connection) –> ACK (makes connection)

We can do nmap -T4 -p- -A <ip>, where -T4 represents the speed, 1 being the slowest and 5 being the fastest. Slower is better for detection but it is slow. -p- means i want to scan all ports, without -p- we will scan the 1000 most common ports however that leaves 64535 ports left unscanned. -A stands for everything, version info, operating system, etc.

picture

The Nmap scan shows us a lot of important information such as the different ports and the services running on them as well as the version.

picture

Enumerating HTTP/HTTPS #http #https


picture

picture

picture

picture

The default webpage hints at poor hygiene. Are there hidden directories behind this?, is there another host?, if not why is this page still up, signals the admin is lazy and potentially left more vulnerabilities.

picture 404 page showing us a bit more information than it should.

We can run nikto which is a web vulnerability scanning tool. picture picture We can see the Apache version is outdated and open to exploits as well as OpenSSL. picture

Now let’s directory bust to try and find some interesting files on our target’s web application.

picture

File extensions help us narrow down the search, Apache usually runs php and Microsoft usually runs asp, this info is important to gather during enumeration .txt, .zip, .rar are other examples of common files

picture

in the responses section, 200s usually mean response is fine, 300s is a redirect, 400s are response errors and 500s are server errors

picture

might be an interesting file

picture always scroll to the bottom of the page, we can see we have Webalizer version 2.01 which might have known exploits

picture seems to be a list of folders and directories, could be interesting

Enumerating SMB #smb


SMB is a file share, consider the scans folder, when you scan something on a printer and it magically appears in your scans folder that is an example of SMB. A lot of internal exploits such as MS17010.

picture

picture

In Metasploit we can search for smb picture

picture

picture

smbclient allows us to connect to the file share possibly with anonymous access. A list of files on the server and the information inside will be huge in the exploitation phase of the mission. picture

picture

picture

picture

Enumerating SSH #ssh


picture

picture

Researching Potential Vulns


80/443 and 139/445 are the most vulnerable usually so we should research those first. Remember the nikto scan which showed us that Apache mod_ssl 2.8.4 was potentially vulnerable.

picture

picture

picture

picture

picture

picture

picture

Scanning with Nessus #nessus


After downloading Nessus from the terminal we can go to the Downloads folder and run dpkg -i <Nessus_filename>. Run the given command then access the https page, accessing the page without running the command will not give you the option to bypass the security certificate.

picture

picture

Reverse shells vs. Bind shells


picture

picture

Staged vs. Nonstaged #payloads


A payload is what we run as an exploit. This is what we send to the victim and attempt to get a shell on their machine.

picture

Gaining root w/ #Metasploit


picture

picture

picture

picture

picture

picture

picture

tags: