Created
May 22, 2017 08:31
-
-
Save minkione/1dc1ab8d4f66d8d1c2c69282ee980ba9 to your computer and use it in GitHub Desktop.
Install metasploit on Debian 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Oracle Java 8 | |
apt-get install software-properties-common | |
add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" && apt-get update | |
apt-get install oracle-java8-installer | |
# Installing Dependencies | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev | |
# Installing a Proper Version of Ruby | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc | |
source ~/.bashrc | |
RUBYVERSION=$(wget https://raw.githubusercontent.com/rapid7/metasploit-framework/master/.ruby-version -q -O - ) | |
rvm install $RUBYVERSION | |
rvm use $RUBYVERSION --default | |
ruby -v | |
# Install latest Nmap | |
mkdir ~/Development | |
cd ~/Development | |
git clone https://github.com/nmap/nmap.git | |
cd nmap | |
./configure | |
make | |
make install | |
make clean | |
# Configuring Postgre SQL Server | |
su postgres | |
createuser msf -P -S -R -D | |
createdb -O msf msf | |
exit | |
exit | |
# Installing Metasploit Framework | |
cd /opt | |
sudo git clone https://github.com/rapid7/metasploit-framework.git | |
sudo chown -R `whoami` /opt/metasploit-framework | |
cd metasploit-framework | |
cd metasploit-framework | |
# If using RVM set the default gem set that is create when you navigate in to the folder | |
rvm --default use ruby-${RUByVERSION}@metasploit-framework | |
gem install bundler | |
bundle install | |
vim cd metasploit-framework | |
# If using RVM set the default gem set that is create when you navigate in to the folder | |
rvm --default use ruby-${RUByVERSION}@metasploit-framework | |
gem install bundler | |
bundle install | |
vim /opt/metasploit-framework/config/database.yml | |
*** | |
production: | |
adapter: postgresql | |
database: msf | |
username: msf | |
password: | |
host: 127.0.0.1 | |
port: 5432 | |
pool: 75 | |
timeout: 5 | |
*** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment