Tag Archive for metasploit @en

Install Metasploit on Iphone

Schermata 2011-02-13 a 11.51.25.png

Before you install Metasploit on your Iphone, you need to install some commands (apt, wget, svn) and some programs (ruby,rubygems, phyton).

1) First of all install with Cydia the following commands:

– APT (APT 0.6 e APT 0.7)


2) Them, open Terminal to connect your Mac to your iPhone:

ssh [email protected] (IP address of the iPhone)

Move to the following directory:

# cd /private/var

Install Python:

# apt-get install python

Install Pyobjc:

# apt-get install pyobjc

(you’ll need of Pyobjc if you want to use SET “SocialEngineering Tools”)

3) The current version of Ruby (1.9.x) and Rubygems available on Cydia create errors with msfconsole therefore, if they are installed, you must remove them:

# apt-get remove ruby rubygems

Now install the precedent version:

#wget http://apt.saurik.com/dists/tangelo-0.9/main/binary-iphoneos-arm/debs/ruby_1.8.6-p111-5_iphoneos-arm.deb

#dpkg -i ruby_1.8.6-p111-5_iphoneos-arm.deb

#wget http://apt.saurik.com/dists/tangelo-0.9/main/binary-iphoneos-arm/debs/rubygems_1.2.0-3_iphoneos-arm.deb

#dpkg -i rubygems_1.2.0-3_iphoneos-arm.deb

#rm ruby*

When Cydia will show you a new version of ruby you don’t update it!

4) Install SVN:
# apt-get install subversion
and then updated it:
# svn update
5) Install METASPLOIT with:
# wget http://www.metasploit.com/releases/framework-3.7.2tar.bz2
# tar jxpf framework-3.7.2tar.bz2
# cd msf3


svn co https://www.metasploit.com/svn/framework3/trunk/

6) To run Metasploit type on Iphone:

# cd /trunk


The response times of the iPhone are not comparable with the Mac, so it is necessary to have a little patience, especially during the update.

Metasploit on OS X Mavericks

I show you the steps that I followed to install Metasploit on Mavericks, with some solutions that I have used to solve some mistakes that I encountered during the installation.

First of all download and install Command Line Tools (OSX 10.9):


Install Java Development Kit (JDK) from: from:http://www.oracle.com/technetwork/java/javase/downloads

Install “Homebrew” :

ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”

echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile

Install “NMAP”:

brew install nmap

Install “wget”:

brew install wget

Install “git”:

brew install git

To verify the version of gcc and g++ type:

gcc -v

g++ -v

If not present, install gcc:

brew tap homebrew/versions brew install gcc47 –use-gcc

Check with “brew doctor” that there are no problems:

brew doctor

If you get the following error:

Error: No such file or directory – /usr/local/Cellar


sudo mkdir /usr/local/Cellar

sudo chown -R `whoami` /usr/local

Then run:

brew update

Install “Ruby” version 1.9.3:

brew install homebrew/versions/ruby193

To check the version:

ruby -v

If you want to install “Ruby” with rvm you can proceed as follows:

curl -L get.rvm.io | bash rvm get head rvm requirements rvm install 1.9.3 rvm use 1.9.3 rvm default 1.9.3

If during compilation it’s presented to you an error about gcc4.7, you can try to solve it with:

CC=/usr/local/bin/gcc-4.2 rvm install 1.9.3 –enable-shared rvm use 1.9.3 –default

Install Ruby Msgpack:

port install msgpack

Install gem MSGPACK:

gem install msgpack

Set to use VNCViewer:

echo ‘#!/usr/bin/env bash’>> /usr/local/bin/vncviewer

echo open vnc://\$1 >> /usr/local/bin/vncviewer

chmod +x /usr/local/bin/vncviewer

Install the open source database “postgresql”:

brew install postgresql –without-ossp-uuid

Create a user with the name “MSF” (you will be prompted to enter and confirm a password, it will need us to configure the database):

createuser msf -P -h localhost

Create a database called msf:

createdb -O msf msf -h localhost

Install with “gem” other packages that will be used with MSF:

gem install pg sqlite3 msgpack activerecord redcarpet rspec simplecov yard bundler

Install “Metasploit”:

cd /usr/local/share/

git clone https://github.com/rapid7/metasploit-framework.git

cd metasploit-framework

for MSF in $(ls msf*); do ln -s /usr/local/share/metasploit-framework/$MSF /usr/local/bin/$MSF;done

sudo chmod go+w /etc/profile

sudo echo export MSF_DATABASE_CONFIG=/usr/local/share/metasploit-framework/database.yml >> /etc/profile

Go into the Metasploit directory and type:

sudo bundle install

Install Ruby gem:

gem install pg sqlite3 msgpack hpricot

Configure the database just created:

vim /usr/local/share/metasploit-framework/database.yml

Open with “vim” the file database.yml and type:


adapter: postgresql

database: msf

username: msf

password: (enter the password previously typed)


port: 5432


timeout: 5

Save and exit:

esc : wq


source /etc/profile

source ~/.bash_profile

Run Metasploit:

sudo msfconsole