Reader small image

You're reading from  Metasploit for Beginners

Product typeBook
Published inJul 2017
PublisherPackt
ISBN-139781788295970
Edition1st Edition
Right arrow
Author (1)
Sagar Rahalkar
Sagar Rahalkar
author image
Sagar Rahalkar

Sagar Rahalkar is a seasoned information security professional having more than 10 years of comprehensive experience in various verticals of IS. His domain expertise is mainly into breach detection, cyber crime investigations, digital forensics, application security, vulnerability assessment and penetration testing, compliance for mandates and regulations, IT GRC, and much more. He holds a masters degree in computer science and several industry-recognized certifications such as Certified Cyber Crime Investigator, Certified Ethical Hacker, Certified Security Analyst, ISO 27001 Lead Auditor, IBM certified Specialist-Rational AppScan, Certified Information Security Manager (CISM), and PRINCE2. He has been closely associated with Indian law enforcement agencies for more than 3 years dealing with digital crime investigations and related training and received several awards and appreciations from senior officials of the police and defense organizations in India. Sagar has also been a reviewer and author for various books and online publications.
Read more about Sagar Rahalkar

Right arrow

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 2017Publisher: PacktISBN-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.
undefined
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 €14.99/month. Cancel anytime

Author (1)

author image
Sagar Rahalkar

Sagar Rahalkar is a seasoned information security professional having more than 10 years of comprehensive experience in various verticals of IS. His domain expertise is mainly into breach detection, cyber crime investigations, digital forensics, application security, vulnerability assessment and penetration testing, compliance for mandates and regulations, IT GRC, and much more. He holds a masters degree in computer science and several industry-recognized certifications such as Certified Cyber Crime Investigator, Certified Ethical Hacker, Certified Security Analyst, ISO 27001 Lead Auditor, IBM certified Specialist-Rational AppScan, Certified Information Security Manager (CISM), and PRINCE2. He has been closely associated with Indian law enforcement agencies for more than 3 years dealing with digital crime investigations and related training and received several awards and appreciations from senior officials of the police and defense organizations in India. Sagar has also been a reviewer and author for various books and online publications.
Read more about Sagar Rahalkar