Metasploit: db_autopwn with PostgreSQL support

Since sqlite3 support was cut out in recent versions of Metasploit most of the tutorials won’t work anymore :)

In my copy of BackTrack5 PostgreSQL was NOT installed. To get it type

apt-get install postgresql

When it’s done you have to change the password of the postgres database admin. I used “toor” as password…simple isn’t it :)

sudo -u postgres psql
\password postgres
\q

After that we crate our database:

sudo -u postgres createdb -0 postgres autopwn

Then restart. Back in Metasploit fill your new created database with:

db_connect postgres:toor@127.0.0.1/autopwn

Well you might first need to start the proper driver and perhaps do some gem installs.

db_driver postgresql

Now Nmap your LAN and happy autopwning
Note: If you still get errors make sure you started Metasploit from the menu entry of the X console since this will make sure that all necessary variables are set.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">