Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Metasploit for Beginners

You're reading from  Metasploit for Beginners

Product type Book
Published in Jul 2017
Publisher Packt
ISBN-13 9781788295970
Pages 190 pages
Edition 1st Edition
Languages
Author (1):
Sagar Rahalkar Sagar Rahalkar
Profile icon Sagar Rahalkar

Table of Contents (11) Chapters

Preface 1. Introduction to Metasploit and Supporting Tools 2. Setting up Your Environment 3. Metasploit Components and Environment Configuration 4. Information Gathering with Metasploit 5. Vulnerability Hunting with Metasploit 6. Client-side Attacks with Metasploit 7. Web Application Scanning with Metasploit 8. Antivirus Evasion and Anti-Forensics 9. Cyber Attack Management with Armitage 10. Extending Metasploit and Exploit Development

Setting up Your Environment

In the preceding chapter, you got familiarized with vulnerability assessments, penetration testing, and the Metasploit Framework in brief. Now, let's get practically started with Metasploit by learning how to install and set up the framework on various platforms along with setting up a dedicated virtual test environment. In this chapter, you will learn about the following topics:

  • Using the Kali Linux virtual machine to instantly get started with Metasploit and supporting tools
  • Installing the Metasploit Framework on Windows and Linux platforms
  • Setting up exploitable targets in a virtual environment

Using the Kali Linux virtual machine - the easiest way

Metasploit is a standalone application distributed by Rapid7. It can be individually downloaded and installed on various operating system platforms such as Windows and Linux. However, at times, Metasploit requires quite a lot of supporting tools and utilities as well. It can be a bit exhausting to install the Metasploit Framework and all supporting tools individually on any given platform. To ease the process of setting up the Metasploit Framework along with the required tools, it is recommended to get a ready-to-use Kali Linux virtual machine.

Using this virtual machine will give the following benefits:

  • Plug and play Kali Linux--no installation required
  • Metasploit comes pre-installed with the Kali VM
  • All the supporting tools (discussed in this book) also come pre-installed with the Kali VM
  • Save time and effort in setting...

Installing Metasploit on Windows

Metasploit Framework can be easily installed on a Windows based operating system. However, Windows is usually not the platform of choice for deploying Metasploit Framework, the reason being, that many of the supporting tools and utilities are not available for Windows platform. Hence it's strongly recommended to install the Metasploit Framework on Linux platform.

The following are the steps for Metasploit Framework installation on Windows:

  1. Download the latest Metasploit Windows installer from: https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version.
  2. Double click and open the downloaded installer.
  3. Click Next, as seen in the following screenshot:
  1. Accept the license agreement:
  1. Select the location where you wish to install the Metasploit Framework:
  1. Click on Install to proceed further:

The Metasploit installer progresses...

Installing Metasploit on Linux

For the scope of this book, we will be installing the Metasploit Framework on Ubuntu (Debian based) system. Before we begin the installation, we first need to download the latest installer. This can be done using wget command as follows:

  1. Open a terminal window and type:
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-installer.run
  1. Once the installer has been downloaded, we need to change the mode of the installer to be executable. This can be done as follows:
    • For 64-bit systems: chmod +x /path/to/metasploit-latest-linux-x64-installer.run
    • For 32-bit systems: chmod +x /path/to/metasploit-latest-linux-installer.run
  2. Now we are ready to launch the installer using the following command:

    • For 64-bit systems: sudo /path/to/metasploit-latest-linux-x64-installer.run
    • For 32-bit systems: sudo /path/to/metasploit-latest-linux...

Setting up exploitable targets in a virtual environment

Metasploit is a powerful penetration testing framework which, if not used in a controlled manner, can cause potential damage to the target system. For the sake of learning and practicing Metasploit, we can certainly not use it on any live production system for which we don't have any authorized permission. However, we can practice our newly acquired Metasploit skills in our own virtual environment which has been deliberately made vulnerable. This can be achieved through a Linux based system called Metasploitable which has many different trivial vulnerabilities ranging from OS level to Application level. Metasploitable is a ready-to-use virtual machine which can be downloaded from the following location: https://sourceforge.net/projects/metasploitable/files/Metasploitable2/

Once downloaded, in order to run the virtual...

Summary

In this chapter we have learned how to quickly get started with the Metasploit Framework by installing it on various platforms. Having done with the installation part, we'll proceed further to the next chapter to get an overview of structure of Metasploit and component level details.

Exercises

You can try the following exercises:

  • Download Kali Linux virtual machine and play it in VMPlayer or VMware Workstation
  • Try installing the Metasploit Framework on Ubuntu
lock icon The rest of the chapter is locked
You have been reading a chapter from
Metasploit for Beginners
Published in: Jul 2017 Publisher: Packt ISBN-13: 9781788295970
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}