Setting up Metasploit Framework 3.2 on Debian (Lenny)
Posted October 10, 2009 at 10:32 pm in Pen TestingSetting up the Metasploit Framework to run on Debian is quite simple. The current stable version of the Metasploit Framework is version 3.2 and is written in the Ruby programming language. The previous version, 2.7, was implemented in Perl. The complete rewrite of the Framework with Ruby requires the following packages to be installed on your system prior to using Metasploit:
apt-get install ruby libruby rdoc apt-get install libyaml-ruby apt-get install libzlib-ruby apt-get install libopenssl-ruby apt-get install libdl-ruby apt-get install libreadline-ruby apt-get install libiconv-ruby apt-get install rubygems
A note about what packages you should install comes from the Metasploit User's Guide: "The latest stable release of the Ruby interpreter (1.8.7-p72) contains a bug which breaks many of the Metasploit Framework modules. The only way to work around this bug is by downgrading to an older version of 1.8.6 or by upgrading to the latest stable snapshot of 1.8.7. The latest stable snapshot can be downloaded from
ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz. For more information about this issue, please see the Ubuntu ticket: https://bugs.launchpad.net/bugs/282302.To determine which Ruby packages you have installed run the following command from your command line:
dpkg -l | grep -i 'ruby'This is what my system spits back to me after executing the above command:
ii irb1.8 1.8.7.72-3lenny1 ii libdl-ruby 4.2 ii libiconv-ruby 4.2 ii libopenssl-ruby 4.2 ii libopenssl-ruby1.8 1.8.7.72-3lenny1 ii libreadline-ruby 4.2 ii libreadline-ruby1.8 1.8.7.72-3lenny1 ii libruby 4.2 ii libruby1.8 1.8.7.72-3lenny1 ii libyaml-ruby 4.2 ii libzlib-ruby 4.2 ii rdoc 4.2 ii rdoc1.8 1.8.7.72-3lenny1 ii ruby 4.2 ii ruby1.8 1.8.7.72-3lenny1 ii rubygems 1.2.0-3 ii rubygems1.8 1.2.0-3Next you'll need to download the Framework from the Metasploit download page. I downloaded 3.2 Release [STABLE] for Linux. When your download completes you'll have to untar the archive.
tar -xvvf framework-3.2.tar.gzAfter you've unpacked the tarball, the last step to getting the Metasploit Framework up and running is to run the msfconsole command from within the framework-3.2 directory.
./msfconsoleIf you run into problems try the Metasploit Framework support site at http://metasploit.com/framework/support/, otherwise fire up nmap/Nessus and have fun with Metasploit Framework 3.2!
Note: After running the ./msfconsole command, be patient, it may take a few seconds for you to be greeted by Metasploit's command prompt, which is "msf >".
Commentary