In our Kali Linux environment we need to set our databases before we use the database function in Metasploit.
To do that we need to start postgresql database server by using following command:
Following screenshot shows that postgresql service has been started.
Then we are going to make the database and initialize it by using following command:
After this is done, we can run msfconsole. Now we can make and manage workspaces in Metasploit. We can save all the data in Metasploit with category. Now we create new workspace using following command:
The screenshot of preceding command is following:
To see all the commands for the workspace or the help, we can run following command:
The screenshot is following:
Now we have our own database and workspace set up, now we can use various commands as we have seen in the help menu to interact with the database.
As an example, to import Nmap scan in our database we use following command: