Today I ran into some issues with my msf3 database that I have been using with Metasploit. I thought I would take a couple minutes and document how I rebuilt it. This will delete all the current entries and information stored in the msf3 database.
Verify the postgresql server is running or restart the server by executing '/etc/init.d/postgresql restart'
The metasploit framework when it is installed creates the following file that contains the msf3 username and random password that is generated:
cat /opt/metasploit/apps/pro/ui/config/database.yml
Gather from the file the password for the msf3 user or change it to one you would like to use.
Then switch to the postgres user in Kali linux by executing 'su - postgres'. You should see the prompt at that time 'postgres@machname:~$'
Execute 'psql' at the prompt to get into the postgres database. To view the databases execute '\list'.
Let's first reset the password of the msf3 account. Note if you reset the password update it in the database.yml file mentioned above.
Execute: ALTER USER msf3 WITH PASSWORD 'passwordindatabaseymlfile';
Remove the msf3 database by executing the 'drop database msf3;'
Recreate the database by executing: 'create database msf3 owner msf3;'
Then quit from postgres by executing \q.
Type exit to get out of the user postgres.
Then run the metasploit console and it will create the necessary tables for the database then you need to wait 2-5 minutes for it to create the cache that metasploit uses. This worked to recreate the msf3 database so now it works.
Twitter: @lokut
This blog is for educational purposes only. The opinions expressed in this blog are my own and do not reflect the views of my employers.
Subscribe to:
Post Comments (Atom)
Test Authentication from Linux Console using python3 pexpect
Working with the IT420 lab, you will discover that we need to discover a vulnerable user account. The following python3 script uses the pex...
-
Here is a quick walk through of GetBoo. The first item that I found was you can harvest the usernames of the existing users that are regist...
-
As I was glancing through the logs of my honeypots I spent some time to look at the following logs. In the past I have just overlooked them...
-
I thought I would work through a few of these web applications provided by OWASP on their broken web applications VM. The first one I th...
-
Today looking at the logs of the honeypots, I became curious based on the whois of the IP Addresses attempting to login to SSH which country...
-
Recently I was doing some scanning with a tool that is available on github called masscan. The tool allows you to configure a configuration...
No comments:
Post a Comment