The Temple of Fu

code, systems and games

Posts Tagged ‘metasploit slackware ruby postgres

Slackware 14 – Metasploit Install

leave a comment »

These are the notes as I recall from doing a Metasploit install, they may not be 100% but you are welcome to them.

Download a SlackBuild and the source, there was a build for 13.37

Move them to /usr/src
#mv framework.tar.gz /usr/src/
#mv /usr/src/

Extract the framework
#tar -xvf framework.tar.gz

Move the framework source into the extracted folder
#mv /usr/src/framework/

Allow execution
#cd /usr/src/framework
#chmdod +x framework.Slackbuild
#chmdod +x

From the Readme:
You will need “postgres” user and group before running the installer, if you
haven’t installed SlackBuilds PostgreSQL you should run these commands to be
compatible. Default database server listening port is 7175.:

#groupadd -g 209 postgres
#useradd -u 209 -g 209 -d /var/lib/pgsql postgres

Add something like to /etc/rc.d/rc.local to start the shipped PostgreSQL daemon:
# Start Metasploit Framework PostgreSQL
if [ -x /etc/rc.d/rc.framework-postgres ]; then
/etc/rc.d/rc.framework-postgres start

Add something like to /etc/rc.d/rc.local_shutdown to stop the service.:

# Stop Metasploit Framework PostgreSQL
if [ -x /etc/rc.d/rc.framework-postgres ]; then
/etc/rc.d/rc.framework-postgres stop

Build the package and then install it.
#installpkg /tmp/framework-4.0.0-x86_64-1_Sbo.tgz

Metasploit ships with its own bundles of Postgres and Ruby.

Note the database connection string
#cat /opt/framework-4.0.0/config/database.yml

Setup msfconsole to use framework shipped Ruby version.
#nano /opt/framework-4.0.0/msf3/msfconsole

Change top line to read:

Launch the console

Install postgres driver
msf> gem install pg -- --with-pg-config=/opt/framework-4.0.0/postgresql/bin/pg_config

Setup tables
msf>db_connect msf3:[password]@localhost:7175/msf3

Hope this helps!

Written by lordfu

April 1, 2013 at 1:21 pm