MacOSPenetration Testing
Tutorial – Installing Metasploit on Mac OS X

Hi Fellows, Today we are going to Setup and Install Metasploit on MacOS, It is easy as installing on Linux and Windows Just you need to install additional files and configure it before setting up Metasploit.
1. Install Homebrew
Code:
/usr/bin/ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile source ~/.bash_profile
brew tap homebrew/versions
2. Install Nmap
Code:
brew install nmap
3. Install Ruby 2.1.X
Code:
brew install homebrew/versions/ruby21gem install bundler
4. Install PostgreSQL
Code:
brew install postgresql --without-ossp-uuid
5. Configure PostgreSQL
Code:
initdb /usr/local/var/postgresmkdir -p ~/Library/LaunchAgentscp /usr/local/Cellar/postgresql/9.4.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plistcreateuser msf -P -h localhostcreatedb -O msf msf -h localhost
6. Installing Metasploit Framework
Code:
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/profilesudo echo export MSF_DATABASE_CONFIG=/usr/local/share/metasploit-framework/config/database.yml >> /etc/profile bundle install vim /usr/local/share/metasploit-framework/config/database.yml
Add:
production: adapter: postgresql database: msf username: msf password: host: 127.0.0.1 port: 5432 pool: 75 timeout: 5
Code:
source /etc/profile source ~/.bash_profile
And now you can execute msfconsole.
Code:
sudo -E msfconsole
Hope this helped someone, let me know if you have any errors or questions.