Complete OSX 10.10 Setup Guide: Metasploit, Armitage, w3af

Part 1: Initial Brew setup & Ruby Install with RVM

Brew update
Brew install wget curl

curl -L https://get.rvm.io | bash -s stable

Install GCC48

brew install homebrew/versions/gcc48

Install Ruby 1.9.3 with RVM

rvm pkg install readline
rvm install 1.9.3 --with-readline-dir=${HOME:-~}/.rvm/usr
rvm use 1.9.3 --default

Now double check our version of Ruby is 1.9.3

Ruby -v

Reboot

Please don’t forget to do reboot at this step.

Installing Important Ruby Gems

Here are some important Ruby Gems that you will need for various tools. You might as well install them now and get it out of the way.

Sudo gem install sqlite3 bundler therubyracer pg msgpack activerecord redcarpet rspec simplecov yard

Part 2: Setting up Python and w3af

Python setup with Homebrew

First we setup python.

Brew install python

w3af dependencies

Next, we install some w3af dependencies.

sudo pip install clamd==1.0.1 PyGithub==1.21.0 GitPython==0.3.2.RC1 nltk==2.0.4 chardet==2.1.1 pdfminer==20110515 futures==2.1.5 pyOpenSSL==0.13.1 lxml==2.3.2 scapy-real==2.2.0-dev guess-language==0.2 cluster==1.1.1b3 msgpack-python==0.2.4 python-ntlm==1.0.1 halberd==0.2.4 darts.util.lru==0.5 xdot==0.6

Install xQuarts

In order to install xQuarts, download the xQuarts installation DMG and follow the install instructions.

More Python dependencies

Now we install some more python dependencies..

brew install coq pygtk gtksourceview pygtksourceview
Brew install opam graphviz libglade

The pybloomfiltermmap dependency seems to give people the most trouble, which is why I like to install it separately.

sudo pip install pybloomfiltermmap==0.3.11 esmre==0.3.1 phply==0.9.1

Installing Scapy, libdnet and libpcap

These last three modules are critical and need to be manually compiled and installed.

wget scapy.net
unzip scapy-latest.zip
cd scapy-2.*
sudo python setup.py install
wget http://libdnet.googlecode.com/files/libdnet-1.12.tgz
tar xfz libdnet-1.12.tgz
./configure
make
sudo make install
cd python
sudo python setup.py install
wget http://dfn.dl.sourceforge.net/sourceforge/pylibpcap/pylibpcap-0.6.4.tar.gz
tar xfz pylibpcap-0.6.4.tar.gz
cd pylibpcap-0.6.4
sudo python setup.py install

Part 3: Installing Metasploit and Armitage

Carlos Perez, aka Darkoperator, has developed an excellent install script for installing Metasploit and Armitage on Mac OSX script.

wget https://raw.githubusercontent.com/darkoperator/MSF-Installer/master/msf_install.sh
chmod +x msf_installer.sh
./msfinstaller.sh

This script will check for dependencies and install everything you need to get Metasploit and Armitage up and running.

One Last Step

I’m not sure if this was related to a bug in the install script, but all of the metasploit dependencies didn’t get installed. In order to finish off the remaining dependencies, we need to run bundle install from the metasploit folder.

cd /usr/local/share/metasploit-framework
sudo bundle install

That’s it!

If you find this article useful, please follow us and share this article! If you have any questions, please leave a comment.

Comments

  • Jean-martin

    November 19, 2014 at 9:42 am

    Thx for the great article!

  • Faisal

    December 1, 2014 at 12:47 pm

    Typo Edit
    Part 2 > Installing Scapy, Libdnet And Libpcap > LINE 8 should be
    $ cd libdnet-1.12
    and wget scapy.net do not download scary it downloads index.html, so We need to manually download it!
    Part 3 > LINE 2 and LINE 3
    msf_install.sh

  • Juan Morales

    December 30, 2015 at 1:22 pm

    Help me in last step an error
    An error occurred while installing pg (0.18.3), and Bundler cannot continue.
    Make sure that `gem install pg -v ‘0.18.3’` succeeds before bundling.

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.