Friday, April 15, 2011

Installing Metasploit on Ubuntu 10.10

This is going to be a tutorial on installing Metasploit on Ubuntu 10.10. Metasploit is a free, open source penetration testing solution that provides you with a way to test security vulnerabilities. It provides a framework for which to develop (Ruby) future modules. It's been around since about 2003, but I still wanted to so a small series on it for those who may be new and who have never heard of it.

Download the Metasploit Linux Full setup from here.

From the Metasploit instructions located here, perform the following:

Install the Ruby dependencies:

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

Install the Subversion client:

sudo apt-get install subversion

Test the subversion client with the command svn ls https://www.metasploit.com/svn/framework3/trunk/ and you should see something like the screen shot below.



In order to build the native extensions (pcaprub, lorcon2, etc), the following packages need to be installed:

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

Here's where it gets a bit different. The current instructions say to download and untar the Metasploit tarball. Well, we we don't have a tarball at this point. The binary installer file that we have has to be run,


In trying to run the file, we run into a permissions problem. To fix, I set the permissions at "774" and ran the file again.





Making directories and linking folders

sudo mkdir -p /opt/metasploit3
sudo cp -a msf3/ /opt/metasploit3/msf3 <== This may take a few minutes
sudo chown root:root -R /opt/metasploit3/msf3
sudo ln -sf /opt/metasploit3/msf3/msf* /usr/local/bin/



Next we are going to install MySQL

sudo apt-get install mysql-server (Please provide a good password, 
when prompted.)
sudo apt-get install rubygems libmysqlclient-dev
sudo gem install mysql

Lastly, run ruby /opt/metasploit3/msf3/msfconsole and you should see something like this...


  
This concludes this tutorial, but look for future ones on the use of Metasploit as well as other security tools.

4 comments:

  1. Awesome! Thank you for your help.

    ReplyDelete
  2. You're welcome! Glad it was helpful!

    ReplyDelete
  3. i think there is easy method.just download linux version & run 3only 3 commands.it works for me.you can visit following link
    http://tipstrickshack.blogspot.com/2012/09/how-to-install-metasploit-in-ubuntu.html

    ReplyDelete