Install Metasploit on Kali Linux

The Metasploit Framework is a tool for pentesters, security researchers and system administrators. This article explains how to install it on Kali Linux.

The Metasploit Framework is already included in Kali Linux. So only a few steps are required to set it up. First of all start PostgreSQL.

$ service postgresql start
[ ok ] Starting PostgreSQL 9.1 database server: main.
$ service postgresql status
Running clusters: 9.1/main

Start the metasploit service and it will create all required database users and tables to use it as cache.

$ service metasploit start
Configuring Metasploit...
Creating metasploit database user 'msf3'...
Creating metasploit database 'msf3'...
insserv: warning: current start runlevel(s) (empty) of script `metasploit' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `metasploit' overrides LSB defaults (0 1 6).
[ ok ] Starting Metasploit rpc server: prosvc.
[ ok ] Starting Metasploit web server: thin.
[ ok ] Starting Metasploit worker: worker.

The cache will be generated in the background. This will take a few minutes but you can already start the Metasploit console.

$ msfconsole -L
[*] The initial module cache will be built in the background, this can take 2-5 minutes...
# cowsay++
 ____________
< metasploit >
 ------------
       \   ,__,
        \  (oo)____
           (__)    )\
              ||--|| *


Trouble managing data? List, sort, group, tag and search your pentest data
in Metasploit Pro -- learn more on http://rapid7.com/metasploit

       =[ metasploit v4.10.0-2014091001 [core:4.10.0.pre.2014091001 api:1.0.0]]
+ -- --=[ 1339 exploits - 736 auxiliary - 214 post        ]
+ -- --=[ 340 payloads - 35 encoders - 8 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > db_status
[*] postgresql connected to msf3
msf >

msf > search openssl
[!] Database not connected or cache not built, using slow search

After the cache has been built successfully the search will be much faster.

Related articles