Nytro Posted December 27, 2011 Report Posted December 27, 2011 (edited) Guide to Installing Metasploit 4 and Armitage on Mac OSX Lion12-26-11After 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] Install XCode (I am running v4.2) [h=3]PostgreSQL Installation[/h] Download and Install PostgreSQL via the free GUI installer.Setup your root PostgreSQL password during installation.Launch the newly installed PGAdmin III application.Connect (double click) on the local PostgreSQL database and enter your root password when prompted.Under the PostgreSQL drop down, right click on “Login Roles”, and select “New Login Role”Set the role name to msfuser.Click on the definition tab, and set the password as msfpassword.Click OK to continue.Next, right click on the databases list, and select “New Database”.Set the name to metasploitdb, and set the owner to msfuser.Press OK, and we’re done. You can close PGAdmin. [h=3]MacPorts[/h] Download and install MacPorts from http://www.macports.org/install.phpGood Tip: add “/opt/local” to your spotlight privacy settings to avoid excessive compile times & unnecessary indexing by spotlight.(System Preferences->Spotlight->Privacy->”+”)Quit terminal & relaunch to accept new path settings added by MacPorts [h=3]Install Ruby, RubyGems (PostgreSQL and MsgPack)[/h]# Run as Rootsudo bash# Update MacPortsport selfupdate#Install Rubyport 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 Msgpackport install msgpack#Install the gem MSGPACKgem install msgpack# Add Ruby to your pathexport PATH=/opt/msf3:$PATH# Ensure that /opt/local/bin appears before /usr/bin, else edit ~/.bash_profile file and source itecho $PATH[h=3]Metasploit 4 Installation[/h]# Download Metasploit via Subversionsudo 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 directorysudo 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 configexport MSF_DATABASE_CONFIG=/opt/local/config/database.yml# Launch Metasploitsudo msfrpcd -U msfuser2 -P msfpassword2 -t Msg# Launch Armitagesudo armitage[h=3]Enjoy![/h]Sursa: http://www.nightlion.net/guides/2011/guide-to-installing-metasploit-4-and-armitage-on-mac-osx-lion/ Edited December 27, 2011 by Nytro Quote