Playing around with Metasploit Unleashed Tutorial – Metasploit Database
Categories Hacker Shit, Random Musings, Security Stuff, Stuff To Learn
So, I’m going through the Offensive Security Metasploit course, and I just ran into my first issue: the database. Each time I would try it I kept getting the issue that it was not connected, and I could not get it to connect. After a bit of searching, I found the solution below.
root@MyPhuckingLaptop:~# msfdb delete root@MyPhuckingLaptop:~# msfdb init Creating database user 'msf' Enter password for new role: Enter it again: Creating databases 'msf' and 'msf_test' Creating configuration file in /usr/share/metasploit-framework/config/database.yml Creating initial database schema root@MyPhuckingLaptop:~# cp /usr/share/metasploit-framework/config/database.yml /root/.msf4/ root@MyPhuckingLaptop:~# sudo service postgresql restart root@MyPhuckingLaptop:~# sudo msfconsole , , / \ ((__---,,,---__)) (_) O O (_)_________ \ _ / |\ o_o \ M S F | \ \ _____ | * ||| WW||| ||| ||| =[ metasploit v4.16.40-dev ] + -- --=[ 1741 exploits - 996 auxiliary - 301 post ] + -- --=[ 526 payloads - 40 encoders - 10 nops ] + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] msf > db_status [*] postgresql connected to msf msf >