Metasploit Tutorial
Metasploit Tutorial
Metasploit Tutorial
Audience
This tutorial is meant for beginners who would like to learn the basic-to-advanced concepts
of Metasploit and how to use it in penetration testing to safeguard their systems and
networks.
Prerequisites
Before proceeding with this tutorial, you should have a good grasp over all the fundamental
concepts of a computer and how it operates in a networked environment.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at [email protected]
i
Metasploit
Table of Contents
About the Tutorial .................................................................................................................................. i
Audience ................................................................................................................................................ i
Prerequisites .......................................................................................................................................... i
ii
Metasploit
iii
1. Metasploit – Introduction Metasploit
Metasploit is one of the most powerful tools used for penetration testing. Most of its
resources can be found at: https://www.metasploit.com. It comes in two versions:
commercial and free edition. There are no major differences in the two versions, so in this
tutorial, we will be mostly using the Community version (free) of Metasploit.
As an Ethical Hacker, you will be using “Kali Distribution” which has the Metasploit
community version embedded in it along with other ethical hacking tools. But if you want
to install Metasploit as a separate tool, you can easily do so on systems that run on Linux,
Windows, or Mac OS X.
2 GHz+ processor
1 GB RAM available
1 GB+ available disk space
Matasploit can be used either with command prompt or with Web UI.
1
2. Metasploit – Environment Setup Metasploit
In total, we will have 3 machines which will be logically connected in the same network.
Select the appropriate version depending on your OS and the hardware configuration of
your system.
2
Metasploit
After selecting the appropriate version of Virtual Box, the following screen will appear.
Click Next.
3
Metasploit
On the next screen, set the location where you want to install the application.
You will get a Warning message before proceeding with the installation.
4
Metasploit
Click Yes on the above screen which will display the following screen. Click Install to begin
the installation.
Once the installation is complete, you will get the following screen. Click Finish to exit the
Setup Wizard.
5
Metasploit
Now we are ready to install the rest of the hosts for this tutorial.
6
Metasploit
Go to the official website and download prebuilt Kali Linux VirtualBox images.
Go to the location where Kali Linux has been downloaded and choose a virtual hard disk
file.
7
Metasploit
The next screen will prompt you to create a virtual machine. Click the Create button, as
shown in the following screenshot.
Now, you can start Kali OS. Your default username will be root and your password will be
toor.
8
3. Metasploit – Basic Commands Metasploit
In this chapter, we will discuss some basic commands that are frequently used in
Metasploit.
First of all, open the Metasploit console in Kali. You can do so by following the path:
Applications -> Exploitation Tools -> Metasploit.
9
Metasploit
Once you open the Metasploit console, you will get to see the following screen. Highlighted
in red underline is the version of Metasploit.
Help Command
If you type the help command on the console, it will show you a list of core commands in
Metasploit along with their description.
10
Metasploit
11