Attacking Metasploitable2 VM Server Cameron W
Attacking Metasploitable2 VM Server Cameron W
Attacking Metasploitable2 VM Server Cameron W
ATTACKING
METASPLOITABLE 2 VM
SERVER
Cameron W
1
Contents
Synopsis...........................................................................................................................................2
Tools Used.......................................................................................................................................2
Metasploitable..............................................................................................................................3
Metasploit.....................................................................................................................................3
NMAP..........................................................................................................................................4
System Configuration......................................................................................................................5
Reconnaissance................................................................................................................................6
Exploitation....................................................................................................................................16
Synopsis
This task demonstrates two stages of penetration testing, which are reconnaissance and
exploitation on a vulnerable network server. The vulnerable server will be the Metasploitable 2.0
virtual machine and the attacks will come from a Kali Linux virtual machine. Both the virtual
machines will be networked on a private VLAN for safety. During this assignment, the following
questions will be answered:
Tools Used
The following tools used are free to use and available to download for anyone who wishes.
These are the basic set of tools to simulate/demonstrate an attack for practice and in professional
use.
3
Metasploitable
Metasploitable is a virtual Linux Operating Machine loaded with many types of vulnerabilities
Normally Founds In Operating System That Can be used for Exploiting this Linux Machine.
Metasploitable Project is also created and maintained by rapid7 Community (Metasploit-
Framework Community). Metasploitable is Originally Design for Metasploit Framework
Testing. A summary of Metasploitable is a purposely vulnerable Linux server, especially design
for practicing penetration testing, network security, Metasploit-Framework And many other
avenues of practice without the worry of attacking a legitimate sever. (Bitforestinfo)
Metasploit
The Metasploit Project is a computer security project that provides information about security
vulnerabilities and aids in penetration testing and IDS signature development.
Its best-known sub-project is the open-source Metasploit Framework, a tool for developing and
executing exploit code against a remote target machine. Other important sub-projects include the
Opcode Database, shellcode archive, and related research.
The Metasploit Project is well known for its anti-forensic and evasion tools, some of which are
built into the Metasploit Framework. (Wikipedia, 2018)
4
NMAP
Nmap (Network Mapper) is a free and open-source security scanner, originally written by
Gordon Lyon.
The software provides several features for probing computer networks, including host discovery
and service and operating-system detection. These features are extensible by scripts that provide
more advanced service detection, vulnerability detection, and other features. Nmap can adapt to
network conditions, including latency and congestion during a scan. The Nmap user community
continues to develop and refine the tool. (Wikipedia)
5
System Configuration
Source Address:
192.168.5.1 Windows 10 Host Workstation
192.168.5.5 Kali Linux Virtual Machine
Destination Address:
192.168.5.3 Metasploitable Server Virtual Machine
6
Reconnaissance
Because we have the IP from the ifconfig command, the IP can be input in a web browser to
display the front webpage of the webserver. Figure 2 is a screenshot of the front-end webpage to
show that it is up and running and what is being hosted.
When using Nmap, you must provide a set of options after the targeted IP has been chosen.
Below is the full Nmap command that will be used, and a breakdown of each option being
provided into the command call.
In Figure 4, the results of the Nmap Scan part 1 are displayed. The figure shows a ton of
information about the system which opens the system up to all kinds of possible attacks.
However, a regular scan of the server should not turn up this many results and whatever that does
show up is hopefully secured and ready for any attacks. Because Metasploitable is a simulated
vulnerable server, there are a ton of ports open on the server giving a wide range of ways to enter
the system.
10
Figure 5 is the second part of the Nmap scan which displays what is running on all the open ports
which were discovered during the scan. The results are summarized in Table 1 below Figure 5.
12
Nmap can not only determine what port is open on the server but also what service is running
and the corresponding versions of the service running on the server depending on the port. The
results show 23 services running on the host server and 977 ports are closed ports. The open
ports provide a vast attack vector and if a malicious attacker wanted to, could use commonly
know attacks for these open ports and services. Due to this, possible exposure is one of many
reasons why we are told as security experts to patch and update systems to reduce our attack
surfaces from commonly known attacks on known vulnerable services.
Table 1:
List of
13
The final result that is useful for this assignment is the operating system and its version, which
was discovered by the scan. Displayed in Figure 6 is the operating system running which is
Linux 2.6.X, the OS details: Linux 2.6.9 – 2.6.33 stating more information on which the server is
running. This information can be used to find known attacks and use them against a server if it is
running on an outdated version of the OS.
2. What Operating System and services are running on the target VM based on the
fingerprinting performed by the VAT(s)?
a. Figure 6 is a screenshot of the servers operating system which is Linux 2.6.X and
also provides more information on it such as OS CPE:
cpe:/o:Linux:linux_kernal:2.6 and OS details: Linux 2.6.9 – 2.6.33.
b. Table 1 provides a list of ports and services running on the target.
Exploitation
The assignment is finished, and the questions required are completed, however, to demonstrate
the attack I said I would use, I’ll use Metasploit to launch a DoS attack on the target VM. Figure
7 will display the starting page of the Metasploit program that will be used to attack the target
VM.
Figure 7 displays all the options to attack a host, following along in the guide found online to
demonstrate this DoS attack. Using the command to get to this menu option from the start is to
use auxiliary/dox/TCP/synflood which is provided in the guide I am following. On this page, we
can set the host and a few other options for the attack. Once I have set the IP using the command
rhost I can now launch the attack on the target VM. Once I start the attack using exploit
command when I tried to access the website from the browser, I received “This site can’t be
reached,” and once I stopped the attack, I was once again able to access the site.
18
Suraj Sign Bisht (May 19, 2017). what is Metasploitable? | what are the usages of
Metasploitable Iso? | Best For Penetration Testing Practise. Retrieved October 14, 2018, from
http://www.bitforestinfo.com/2017/05/what-is-metasploitable-what-are-the-usages-of-
metasploitable-iso-best-for-penetration-testing.html
Gurbaran S (June 11, 2018). How to Launch a DoS Attack by using Metasploit Auxiliary.
Retrieved October 14, 2018, from https://gbhackers.com/kali-linux-tutorial-dos-attack/