Metasploit Database Setup on Kali
Out of the box, Metasploit's database does not come preconfigured, though it is simple to set up. This means that your searches for modules with be slow, and important information for your assessment project will not be saved properly.
Metasploit is designed for use with a postgresql, which is installed by default on Kali Linux. To start with, you'll want to start the postgresql service, and then set it to start automatically on boot:
/etc/init.d/postgresql start
update-rc.d postgresql enable
Now let's start up Metasploit, initialize the database and check on it's status:
msfconsole
msfdb init
db_status
If you see the database has no connection, just exit Metasploit, restart postgresql and start Metasploit again:
exit
/etc/init.d/postgresql restart
msfconsole
db_status
Excellent. This time db_status shows that the database is connected. Now we just need to rebuild the module cache:
db_rebuild_cache
The rebuild typically takes about 5 minutes. Once it's rebuilt, you can run a quick test by searching for a module. If you don't get an error about the database not being connected, then you should be good to go!
search psexec_psh
Metasploit is designed for use with a postgresql, which is installed by default on Kali Linux. To start with, you'll want to start the postgresql service, and then set it to start automatically on boot:
/etc/init.d/postgresql start
update-rc.d postgresql enable
Now let's start up Metasploit, initialize the database and check on it's status:
msfconsole
msfdb init
db_status
If you see the database has no connection, just exit Metasploit, restart postgresql and start Metasploit again:
exit
/etc/init.d/postgresql restart
msfconsole
db_status
Excellent. This time db_status shows that the database is connected. Now we just need to rebuild the module cache:
db_rebuild_cache
The rebuild typically takes about 5 minutes. Once it's rebuilt, you can run a quick test by searching for a module. If you don't get an error about the database not being connected, then you should be good to go!
search psexec_psh
Comments
Post a Comment