running the Metasploit Framework
In accordance with the Kali Linux Network Service policy, Kali does not have a network service that is automatically started, including database services. So in order for Metasploit to run some necessary steps in a way that supports the database.
Activate the PostgreSQL service for Kali
Metasploit uses PostgreSQL as a database, so it must be run first.
Service PostgreSQL Start
You can usess-antOutput to verify that PostgreSQL is running, and then verify that Port 5432 is in the listening state.
State recv-q send-q Local address:port Peer address:port
LISTEN 0::: $:::*
LISTEN 0 *:22 *:*
LISTEN 0 127.0.0.1:5432 *:*
LISTEN 0:: 1:5432:::*
start the Kali Metasploit service
As PostgreSQL starts and runs, we then run the Metasploit service. The first run of the service creates a MSF3 database user and a database called MSF3. Also runs Metasploit RPC and the Web server it needs.
Service Metasploit Start
running Msfconsole in Kali
Now the PostgreSQL and Metasploit services are running and can runMsfconsole, and then useDb_statusThe command verifies the connectivity of the database.
Msfconsole
MSF > Db_status PostgreSQL connected to MSF3
MSF >
Configure Metasploit to run with system boot
If you want PostgreSQL and Metasploit to run at boot time, you can useUPDATE-RC.DEnable the service.
UPDATE-RC.D PostgreSQL Enable
UPDATE-RC.D Metasploit Enable
Kali Metasploit Framework Environment configuration