Jump to content
Aerosol

Install metasploit console

Recommended Posts

Posted

apt-get update && apt-get upgrade

then, we have to install the dependencies needed for msf

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

we have now to install the required ruby libraries for msf

gem install wirble pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundler

now, let`s install nmap, it is one of msf`s external tools for scanning.

mkdir ~/nmap;cd ~/nmap
svn co https://svn.nmap.org/nmap
cd nmap
./configure
make;make install;make clean

now with nmap installed, we can create an user and db for postgresql

su postgres

now, let`s create the user and the database that msf will use from database.yml.

createuser msf -P -S -R -D

createdb -O msf msf

now we can exit.

now, let`s download the latest metasploit and install it

cd /opt
git clone https://github.com/rapid7/metasploit-framework.git

cd metasploit-framework

now, let`s create links to the commands

bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'


ln -s /opt/metasploit-framework/armitage /usr/local/bin/armitage

from inside msf folder, run this

bundle install

to install the supported gem versions

create the database.yml in /opt/metasploit-framework/

nano /opt/metasploit-framework/database.yml

and paste this inside

production:
adapter: postgresql
database: msf
username: msf
password:
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5

oh and provide the password you entered earlier.

now, create and eviroment variable

echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml >> /etc/profile

source /etc/profile

we still have to install the pcaprub

cd /opt/metasploit-framework/external/pcaprub


ruby extconf.rb && make && make install

it is used in port scanning

run

msfconsole

Have fun with the great penetration testing tool!

~ Credits to neo.hapsis

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...