Jump to content
Nytro

Guide to Installing Metasploit 4 and Armitage on Mac OSX Lion

Recommended Posts

Posted (edited)

Guide to Installing Metasploit 4 and Armitage on Mac OSX Lion

12-26-11

After many hours of trial and error, I have been able to put together a guide to getting Metasploit 4 and Armitage working properly on Mac OSX. I would also like to give a tremendous amount of credit to BrianCanFixIT @ Faulty Logic. His blog post on setting up Armitage helped me through the missing piece of getting the PostgreSQL database up and running properly.

[h=3]Prerequisites[/h]

  1. Install XCode (I am running v4.2)

[h=3]PostgreSQL Installation[/h]

  1. Download and Install PostgreSQL via the free GUI installer.
  2. Setup your root PostgreSQL password during installation.
  3. Launch the newly installed PGAdmin III application.
  4. Connect (double click) on the local PostgreSQL database and enter your root password when prompted.
  5. Under the PostgreSQL drop down, right click on “Login Roles”, and select “New Login Role”
  6. Set the role name to msfuser.

  7. Click on the definition tab, and set the password as msfpassword.
  8. Click OK to continue.
  9. Next, right click on the databases list, and select “New Database”.
  10. Set the name to metasploitdb, and set the owner to msfuser.
  11. Press OK, and we’re done. You can close PGAdmin.

[h=3]MacPorts[/h]

  1. Download and install MacPorts from http://www.macports.org/install.php
  2. Good Tip: add “/opt/local” to your spotlight privacy settings to avoid excessive compile times & unnecessary indexing by spotlight.
    (System Preferences->Spotlight->Privacy->”+”)
  3. Quit terminal & relaunch to accept new path settings added by MacPorts

[h=3]Install Ruby, RubyGems (PostgreSQL and MsgPack)[/h]

# Run as Root
sudo bash

# Update MacPorts
port selfupdate

#Install Ruby
port install ruby19 +nosuffix

# Install PostgreSQL gem connector (64bit Systems)
env ARCHFLAGS='-arch x86_64' gem install pg -- --with-opt-include=/Library/PostgreSQL/9.1/include/ --with-opt-lib=/Library/PostgreSQL/9.1/lib/

#Install Ruby Msgpack
port install msgpack

#Install the gem MSGPACK
gem install msgpack

# Add Ruby to your path
export PATH=/opt/msf3:$PATH

# Ensure that /opt/local/bin appears before /usr/bin, else edit ~/.bash_profile file and source it
echo $PATH

[h=3]Metasploit 4 Installation[/h]

# Download Metasploit via Subversion
sudo svn co https://www.metasploit.com/svn/framework3/trunk/ /opt/local/msf/

# Create a system link to the msf applications
# This is done because including it in your path configuration doesn't seem to work.

sudo ln -s /opt/local/msf/msf* /opt/local/bin

[h=3]Configure the Metasploit Database[/h]

# Create the configuration directory
sudo mkdir /opt/local/config

# Create/Edit the following file
sudo vi /opt/local/config/database.yml

# Include the following in your database.yml file

# These settings are for the database used by the Metasploit Framework
# unstable tree included in this installer, not the commercial editions.
#

production:
adapter: "postgresql"
database: "metasploitdb"
username: "msfuser"
password: "msfpassword"
port: 5432
host: "localhost"
pool: 256
timeout: 5</code>

[h=3]Running Metasploit and Armitage[/h]

# Include the database location in your config
export MSF_DATABASE_CONFIG=/opt/local/config/database.yml

# Launch Metasploit
sudo msfrpcd -U msfuser2 -P msfpassword2 -t Msg

# Launch Armitage
sudo armitage

[h=3]Enjoy![/h]

Sursa: http://www.nightlion.net/guides/2011/guide-to-installing-metasploit-4-and-armitage-on-mac-osx-lion/

Edited by Nytro

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...