The Temple of Fu

code, systems and games

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
$wget http://slackbuilds.org/slackbuilds/13.37/network/framework.tar.gz
$wget http://downloads.metasploit.com/data/releases/archive/framework-4.0.0-linux-x64-full.run

Move them to /usr/src
#mv framework.tar.gz /usr/src/
#mv framework-4.0.0-linux-x64-full.run /usr/src/

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

Move the framework source into the extracted folder
#mv framework-4.0.0-linux-x64-full.run /usr/src/framework/

Allow execution
#cd /usr/src/framework
#chmdod +x framework.Slackbuild
#chmdod +x framework-4.0.0-linux-x64-full.run

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
fi

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
fi

Build the package and then install it.
#./framework.Slackbuild
#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:
#!/opt/framework-4.0.0/ruby/bin/ruby

Launch the console
#/opt/framework-4.0.0/msf3/msfconsole

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!

Advertisements

Written by lordfu

April 1, 2013 at 1:21 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: