How to launch Metasploit framework on Kali Linux 2020.x


/ * Custom CSS * / {
Text alignment: left;
} img {
The security deposit: 0 automatically 0 0;

How to launch Metasploit Framework on Kali Linux? Metasploit framework is a tool created by a Massachusetts-based security company Rapid7 Help security professionals perform penetration testing tasks and discover security vulnerabilities and IDS signature development. The Metasploit framework provides the infrastructure, content, and tools to perform extensive security audits and penetration testing.

Metasploit framework services

  • PostgreSQL database servicer-Metasploit is used to store data in the project.
  • Ruby on Rails
  • Metasploit service

Metasploit framework requirements

These are the minimum hardware requirements to run Metasploit Framework on any Linux machine.


/ * Custom CSS * / {
Text alignment: left;
} img {
The security deposit: 0 automatically 0 0;

  • CPU – 2 GHz + processor
  • RAM-4 GB of RAM available (8 GB recommended)
  • Disk space-1 GB of free disk space (50 GB recommended)

So let’s see how to run Metasploit Framework on Kali Linux Desktop distribution.

Metasploit framework running on Kali Linux 2020.x

These are the steps required to enable Metasploit to start on Kali Linux and run with database support.

Step 1: Start the PostgreSQL database server

The PostgreSQL database is installed but not started on Kali Linux. Use the following command to start the service.

sudo systemctl enable --now postgresql

Confirm that the service is started and set to run at startup.

$ systemctl status [email protected] 
● [email protected] - PostgreSQL Cluster 12-main
     Loaded: loaded (/lib/systemd/system/[email protected]; enabled-runtime; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/[email protected]
     Active: active (running) since Sun 2020-02-23 07:24:55 EST; 43s ago
    Process: 16154 ExecStartPre=/usr/share/kali-defaults/postgresql_reduce_shared_buffers 12/main (code=exited, status=0/SUCCESS)
    Process: 16156 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 12-main start (code=exited, status=0/SUCCESS)
   Main PID: 16184 (postgres)
      Tasks: 7 (limit: 2318)
     Memory: 28.6M
     CGroup: /system.slice/system-postgresql.slice/[email protected]
             ├─16184 /usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c config_file=/etc/postgresql/12/main/postgresql.conf
             ├─16186 postgres: 12/main: checkpointer
             ├─16187 postgres: 12/main: background writer
             ├─16188 postgres: 12/main: walwriter
             ├─16189 postgres: 12/main: autovacuum launcher
             ├─16190 postgres: 12/main: stats collector
             └─16191 postgres: 12/main: logical replication launcher

$ systemctl is-enabled postgresql

You can also verify that PostgreSQL is running by checking the output of the following command ant And make sure the port 5432 Listening.

$ sudo  ss -ant | grep 5432
LISTEN  0       244   *               
LISTEN  0       244                [::1]:5432              [::]:* 

Step 2: Initialize the Metasploit PostgreSQL database on Kali Linux

After the PostgreSQL database server is running, continue to initialize the Metasploit PostgreSQL database.

$ sudo msfdb init
[i] Database already started
[+] Creating database user 'msf'
[+] Creating databases 'msf'
[+] Creating databases 'msf_test'
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schema

This will create and initialize MSF database.

Step 3: Start msfconsole on Kali Linux

Now we have PostgreSQL The service is up and running, and the database is initialized. The last step required is to start msfconsole And verify the database with db_status command:

$ sudo msfconsole 
 -++SecKCoin++e.AMd`       `.-://///+hbove.913.ElsMNh+- 
 -~/.ssh/id_rsa.Des-                  `htN01UserWroteMe!- 
 :dopeAW.Noo                     :is:TЯiKC.sudo-.A: 
 :we're.all.alike'`                     The.PFYroy.No.D7: 
 :PLACEDRINKHERE!:                      yxp_cmdshell.Ab0: 
 :msf>exploit -j.                       :Ns.BOB&ALICEes7: 
 :---srwxrwx:-.`                        `MS146.52.No.Per: