Aerosol Posted December 15, 2014 Report Posted December 15, 2014 apt-get update && apt-get upgradethen, we have to install the dependencies needed for msfapt-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.3we have now to install the required ruby libraries for msfgem install wirble pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundlernow, let`s install nmap, it is one of msf`s external tools for scanning.mkdir ~/nmap;cd ~/nmapsvn co https://svn.nmap.org/nmapcd nmap./configuremake;make install;make cleannow with nmap installed, we can create an user and db for postgresqlsu postgresnow, let`s create the user and the database that msf will use from database.yml.createuser msf -P -S -R -Dcreatedb -O msf msfnow we can exit.now, let`s download the latest metasploit and install itcd /optgit clone https://github.com/rapid7/metasploit-framework.gitcd metasploit-frameworknow, let`s create links to the commandsbash -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/armitagefrom inside msf folder, run thisbundle installto install the supported gem versionscreate the database.yml in /opt/metasploit-framework/nano /opt/metasploit-framework/database.ymland paste this insideproduction: adapter: postgresql database: msf username: msf password: host: 127.0.0.1 port: 5432 pool: 75 timeout: 5oh and provide the password you entered earlier.now, create and eviroment variableecho export MSF_DATABASE_CONFIG=/opt/metasploit-framework/database.yml >> /etc/profilesource /etc/profilewe still have to install the pcaprubcd /opt/metasploit-framework/external/pcaprubruby extconf.rb && make && make installit is used in port scanningrunmsfconsoleHave fun with the great penetration testing tool!~ Credits to neo.hapsis Quote