Metasploit -- Setting Up Databases



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:


service postgresql start
 Following screenshot shows that postgresql service has been started.


Then we are going to make the database and initialize it by using following command:

msfdb init
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:

workspace -a workspace_name
The screenshot of preceding command is following:


To see all the commands for the workspace or the help, we can run following command:

workspace -h
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:

db_import path/to/nmapfile.xml
Metasploit -- Setting Up Databases Metasploit -- Setting Up Databases Reviewed by Kali Linux on February 23, 2019 Rating: 5

No comments:

Powered by Blogger.