You are on page 1of 14

METASPLOIT PENETRATION TESTING

TOOL
Submitted by

Abhishek Sharma (19BCE0653)


Kaustubh Shrivastava (19BCE0617)
Suhaas Rao Badada (19BCE0637)
M. Yaswanth (19BCE0656)
T. Sahithi (19BCE0650)
Mohammed Ismail Zabiullah (19BDS0084)

for

CYBER SECURITY (CSE 4003)

PROJECT

SLOT E1 + E2 + TE1 + TE2

Submitted to

Prof. ILAYARAJA V.

School of Computer Science and Engineering

AUGUST 2022

1
TABLE OF CONTENTS

TABLE OF CONTENTS 2
ABOUT THE TOOL 3
MINIMUM REQUIREMENTS 4
OBJECTIVE 5
FEATURES 5
IMPLEMENTATION 7
RESULTS 14
CONCLUSION 14

2
ABOUT THE TOOL
It is an open source framework which allows testing via CLI or GUI. Apart from that it can be
extended to be used with multiple coding languages. Metasploit framework is based on Ruby,
which enables writing, testing and executing exploitable code legally.A number of tools are
included in the Metasploit Framework that one can use to perform attacks, enumerate networks,
test security vulnerabilities, and avoid detection. The Metasploit Framework's fundamental
component is a set of widely used tools that offer a full environment for penetration testing and
exploit creation. Used by cybercriminals as well as ethical hackers

Cybercriminals and ethical hackers can both use the sophisticated Metasploit framework to scan
servers and networks for systemic weaknesses. It may be used with most operating systems and
is highly customizable because it is an open-source framework.

The pen testing team can employ ready-made or bespoke code with Metasploit to introduce it
into a network and probe for vulnerabilities. Once faults are discovered and recorded, a different
variation of threat hunting can be used to prioritise fixes and address systemic issues.

WHY METASPLOIT ?
● Metasploit is an open source freely available framework that is used by professionals.
● The purpose of metasploit is to aid vulnerability scanning and penetration testing.
● It also comes in handy for developing exploits and payloads for testing a given host.
● The Metasploit Project includes anti-forensic and evasion tools, some of which are built
into the Metasploit Framework.
● Metasploit is pre-installed in the Kali Linux operating system.
● It provides an end-to-end framework for penetration testing.
● A great tool for information gathering.
● Metasploit is known for its thorough Vulnerability Scanning mechanism.
● Used for pre and post exploitation.
● Exploit development

3
MODULES OF METASPLOIT

1. Exploits - Tool used to take advantage of system weaknesses.


2. Payloads - Sets of malicious code
3. Auxiliary functions - Supplementary tools and commands
4. Encoders - Used to convert code or information
5. Listeners - Malicious software that hides in order to gain access
6. Shellcode - Code that is programmed to activate once inside the target
7. Post-exploitation code - Helps test deeper penetration once inside
8. Nops - An instruction to keep payload from crashing

MINIMUM REQUIREMENTS

Operating Systems:

● Ubuntu Linux 14.04 or 16.04 LTS (recommended)


● Windows Server 2008 or 2012 R2
● Windows 7 SP1+, 8.1, or 10
● Red Hat Enterprise Linux Server 5.10, 6.5, 7.1, or later

Hardware:

● 2 GHz+ processor
● Minimum 4 GB RAM, but 8 GB is recommended
● Minimum 1 GB disk space, but 50 GB is recommended

4
OBJECTIVE
During the course of this undertaking, we plan to robustly use the various exploits offered by the
metasploit to gain backdoor access to a vulnerable machine. However, such activities are
considered to be malicious if no permission is granted by the owner of the host. For this reason,
we will be using an already vulnerable server provided by metasploit known as metasploitabe 2.
We will be initiating 2 exploits based on ftp and telnet provided by metasploit, and assess
whether they were able to successfully breach the server or not.

FEATURES
Automate Every Step of Your Penetration Test : Conducting a thorough penetration test is
time consuming for even the most experienced pen tester. Metasploit makes it easy to automate
all phases of a penetration test, from choosing the right exploits to streamlining evidence
collection and reporting. Every hour you save is an hour you can spend digging deeper into your
network.

Put Your People to the Test : Real attackers know people are generally the weakest link in the
security chain. Our penetration testing software creates sophisticated attacks to test user
weaknesses, including cloning websites with the click of a button for phishing campaigns and
masking malicious files for USB drop campaigns. Keep track of who falls for what to assess
your user awareness—or to gain a foothold for a deeper attack.

Test with Success, Regardless of Experience : Every organisation is open to cyberattack, so


every defender needs to be able to test their defences. Metasploit Pro makes the powerful
Metasploit Framework accessible to all with an easy-to-use interface, as well as wizards to get
you launching and reporting on full pen tests in seconds.

Become a Next-Level Pen Tester : If you’ve already spent years becoming a Metasploit
Framework expert, Metasploit Pro has a lot to offer: Manoeuvre through a network with ease
with VPN pivoting and antivirus evasion capabilities, create instant reports on your progress and

5
evidence, or, best of all, go down into the command line framework at any time and seamlessly
use your custom script.

Gather and Reuse Credentials : Credentials are the keys to any network, and the biggest prize
for a penetration tester. With our penetration testing software, you can catalogue and track
gathered creds for reporting and try them across every other system in the network with a simple
credential domino wizard, ensuring you leave no stone unturned.

6
IMPLEMENTATION

Fig.1: Hosting the metasploitable 2 server on the Virtual Box.

Fig.2: Executing the “ifconfig” command to get the ip address of the metasploitable 2 server.

7
Fig.3: Executing the whois command to check whether the host is up or not.

Fig.4: this nmap command is used to identify the vulnerable ports, the associated services and the
version of the service running on the server.

8
Fig.5: Using the search command, we can find an exploit for the aforementioned services using their
respective versions. In this case we will be using the “ftp” exploit.

Fig.6: we can get the information about the exploit using the “info” command.

Fig.7: to switch to the respective exploit, we execute the “use” command followed by its name.

9
Fig.8: the rhost field is set to the host we wish to attack.

Fig.9: by executing the “run” command, the exploit begins its attack on the server. Consequently, a
command shell is opened giving a backdoor access to the metasploitable server. Here we first
change our directory to the home directory and create a folder named virus and inside it create a
viruses text file.

10
Fig.10: using the telnet exploit.

Fig.11: setting the required fields. The users.txt file and passwords.txt file contain the login
credentials of multiple users, and the rhost is set to the ip address of the target machine.

Fig.12: executing the “run” command to run the telnet exploit. The exploit checks each combination
of username and password to gain access to the shell.

11
RESULTS
TELNET

Fig.13: the “sessions -l” command is used to seen the number of active sessions we have established.

Fig.14: “sessions -i 3” command is used to start the 3rd shell session and then the we run the
commands in the shell opened

12
Fig.15: Through the 3rd session of telnet, we created a directory malware and a trojan.txt file.

FTP

Fig.16: it is evident that a directory “Virus” containing the file viruses.txt has been created.

13
CONCLUSION
As we can see from the results we are able to find vulnerabilities in the ftp and telnet service of
Metasploitable 2. Using the exploits available in Metasploit we are able to take advantage of
these vulnerabilities. Using the ftp exploit we got access to the shell of the Metasploitable 2 and
then we were able to get access to all the files and folders present in the computer system. We
could even mutilate files or implant a virus in the Metasploitable 2. Using the telnet exploit we
gained access to all the shells of the users present in the Metasploitable 2. After gaining access to
one of the user's shells we can exploit the shell to change the files or make new files there which
may contain different types of malware. In this way we were able to exploit the vulnerabilities
and implant virus in the host system using the Metasploit tool.

14

You might also like