教程链接:http://www.darkoperator.com/installing-metasploit-in-ubunt/
Installing Metasploit Framework on Ubuntu 12.04 LTS to 14.04 LTS and Debian 7
This Guide covers the installation of Metasploit Framework OSS Project on Ubuntun Linux LTS I recommend you first try with the following install script since it will do more than what is covered in the guidehttps://github.com/darkoperator/MSF-Installer if you do not wish to run the Open Source version or set up a development environment and do not mind giving your email address to Rapid 7 for marketing I would recommend downloading their comercial installer from http://www.metasploit.com/
Installation using Install Script
Download the script from GitHub and make it executable. Test with the -h option to make sure it is working properly
$ chmod +x msf_install.sh
$ ./msf_install.sh -h Scritp for Installing Metasploit Framework By Carlos_Perez[at]darkoperator.com Ver 0.1.0 -i:Install Metasploit Framework. -p:password for Metasploit databse msf user. If not provided a roandom one is generated for you. -g:Install GNU GCC (Not necessary unless you wish to compile and install ruby 1.8.7 in OSX -h:This help message
直接运行
./msf_install.sh -h就可以安装了,但是安装完成,运行metaconsole会出错,错误见后
To start the installation you just run the script with the -i option and the installation will start. If you do not plan to be testing a mixed of third party gems and versions of Ruby against the framework I recommend you do not use RVM so as to keep the install simpler. DO NOT RUN the script as root. It will:
- Check that dependencies are meet if not install them.
- Install Ruby 1.9.3
- Install base ruby gems.
- Install and configure Postgres for use with Metasploit
- Download and install Metasploit Framework.
- Installs all necessaries Ruby Gems using bundler.
- Configure the database connection and sets the proper environment variables.
- Download and install the latest version of Armitage.
- Download and install the Pentest plugin and DNSRecon Import plugin.
Installing Dependencies
We start by making sure that we have the latest packages by updating the system using apt-get:
sudo apt-get update sudo apt-get upgrade
Now that we know that we are running an updated system we can install all the dependent packages that are needed by Metasploit Framework:
sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre subversion git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev ruby1.9.3 ruby-dev
Once the packages have been install we need to install the required Ruby libraries that metasploit depends on: