sudo apt install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-8-jre git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev, ruby-dev
Clone repo
$ cd /opt
$ sudo git clone https://github.com/rapid7/metasploit-framework.git
$ sudo chown -R `whoami` /opt/metasploit-framework
Set up symlinks
sudo bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'
Get the signing key
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable
Get RVM
curl -L https://get.rvm.io | bash -s stable
Configure terminal to use RVM's version of Ruby
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
cd /opt/metasploit-framework
rvm --install .ruby-version
Install Bundler
gem install bundler
Install Bundled Gems
$ cd /opt/metasploit-framework
$ bundle install
$ sudo -s
$ su postgres
$ createuser msf -P -S -R -D
$ <password>
$ createdb -O msf msf
$ exit
$ exit
sudo nano /opt/metasploit-framework/config/database.yml.example
# Add the following
production:
adapter: postgresql
database: msf
username: msf
password: <password>
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
- Setting Up a Metasploit Development Environment - https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment
- Installing Metasploit in Ubuntu - http://www.darkoperator.com/installing-metasploit-in-ubunt/