Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Metasploit Penetration Testing Cookbook

You're reading from   Metasploit Penetration Testing Cookbook Over 70 recipes to master the most widely used penetration testing framework with this book and ebook.

Arrow left icon
Product type Paperback
Published in Jun 2012
Publisher Packt
ISBN-13 9781849517423
Length 268 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Abhinav Singh Abhinav Singh
Author Profile Icon Abhinav Singh
Abhinav Singh
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Metasploit Penetration Testing Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Metasploit Quick Tips for Security Professionals FREE CHAPTER 2. Information Gathering and Scanning 3. Operating System-based Vulnerability Assessment and Exploitation 4. Client-side Exploitation and Antivirus Bypass 5. Using Meterpreter to Explore the Compromised Target 6. Advanced Meterpreter Scripting 7. Working with Modules for Penetration Testing 8. Working with Exploits 9. Working with Armitage 10. Social Engineer Toolkit Index

Configuring Metasploit on Ubuntu


The Metasploit framework has full support for Ubuntu-based Linux operating systems. The installation process is a bit different from that of Windows.

Getting ready

Download the setup from the official Metasploit website (http://www.metasploit.com/download).

Again, you will have the option to choose either a minimal setup or full setup. Choose your download according to your need. The full setup will include all the dependencies, database setup, environment etc whereas the minimal setup will only contain the dependencies with no database setup.

How to do it...

The process for installing a full setup is a bit different from a minimal setup. Let us analyze each of them:

  • Full installer: You will need to execute the following commands to install the framework on your Ubuntu machine:

    $ chmod +x framework-4.*-linux-full.run
    $ sudo ./framework-4.*-linux-full.run
  • Minimal installer: You will need to execute the following commands to install the framework with minimal options:

    $ chmod +x framework-4.*-linux-mini.run
    $ sudo ./framework-4.*-linux-mini.run

How it works...

The installation process demonstrated above is a simple Ubuntu-based installation procedure for almost all software. Once the installation is complete, you can run hash –r to reload your path.

Note

This installation process can be followed on almost all flavors and versions of Linux.

There's more...

Now let's talk about some other options, or possibly some pieces of general information that are relevant to this task.

Error during installation

There can be chances that the installer may not work for you for some reason. Some versions of Ubuntu come with broken libraries of the Ruby language, which may be one of the reasons for the installation failure. In that case, we can install the dependencies separately by executing the following commands:

For installing Ruby dependencies run:

$ sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby     libiconv-ruby libreadline-ruby irb ri rubygems

For installing the subversion client run:

$ sudo apt-get install subversion

For building native extensions run:

$ sudo apt-get install build-essential ruby-dev libpcap-dev

After installing the following dependencies, download the Metasploit Unix tarball from the official Metasploit download page and execute the following commands:

$ tar xf framework-4.X.tar.gz
$ sudo mkdir -p /opt/metasploit4
$ sudo cp -a msf4/ /opt/metasploit3/msf4
$ sudo chown root:root -R /opt/metasploit4/msf4
$ sudo ln -sf /opt/metasploit3/msf3/msf* /usr/local/bin/

On successful execution of the preceding commands, the framework will be up and running to receive your instructions.

You have been reading a chapter from
Metasploit Penetration Testing Cookbook
Published in: Jun 2012
Publisher: Packt
ISBN-13: 9781849517423
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 $19.99/month. Cancel anytime