Mac 下安装Metasploit

This tutorial is a combination of a number of different guides that I’ve compiled on the subject of getting Metasploit to work on OSX. I have not been able to find any other site with a complete working solution, so I decided to write one myself. This has been tested on multiple environments from beginning to end. If you have any problems, please leave a comment and I will do my best to help you get things working.

1. XCODE & COMMAND LINE TOOLS

First, install XCode using the App Store. Xcode is a free download.

1.1. Manually Install The Command Line Tools.

XCode 5 does not give me the option to install the command line tools from the app, so we have to do it via command line.

 

2. INSTALL HOMEBREW, RUBY, AND RVM

For this tutorial, I ended up going with Homebrew. I’ve always used MacPorts in the past, but I keep hearing more and more about Homebrew and wanted to give it a try. It turned out to be pretty painless.

2.1. Install HomeBrew

Make sure to run your Brew Doctor as soon as Brew is installed to make sure everything is working properly

 

2.2. Install Git And Wget

 

2.2. Install RVM (Ruby Version Manager)

 

2.3. Install Ruby V1.9.3-P448

At the time of this tutorial, Metasploit requires package 448 of Ruby v1.9.3 in order to run properly, I’m sure that will change in the future, so please make sure to update your commands with the correct version number!!

That last line is especially important since XCode 5.1 will default to Ruby 2.x.

2.4. Reload Your Source Information

You will now be asked to reload your source information.

 

3. INSTALL VARIOUS PACKAGES AND DEPENDENCIES

There are a number of packages and dependencies that need to be installed in order to get everything running smoothly.

3.1. Nmap

First, we need to install Nmap.

 

3.2. GCC

Next we need to install GNU GCC. This may time some time since we are compiling the latest version from source.

3.3. Install PostgreSQL

Next, we need PostgreSQL.

3.4. Configure PostgreSQL

With PostgreSQL installed, we need to configure a few things. Don’t forget to make sure that the version numbers below match the ones that were installed.

3.5. Install Ruby Gems

We need a few Ruby Gems to get Metasploit running.

4. INSTALL AND CONFIGURE METASPLOIT

We’re almost done. Now we just need to setup MSF to run in our new environment.

4.1. Install MSF

4.2. Configure The MSF Database

Paste the following information into the database.ymp file:

4.3 Install Required MSF Bundles

Bundle Install

 

4.4. Create A Few Symlinks

We need to create symlinks of the metasploit executables in the /usr/bin/ folder, as a safeguard against Armitage not being able to find the MSF files.

5. LAUNCH METASPLOIT!

Now that we are done installing everything, let’s test Metasploit to make sure everything went smoothly.

If all goes well, you should see the Metasploit console!

6.ARMITAGE

It’s really unfortunate that Armitage no longer ships with the Metasploit Framework. Luckly this is a very short process

6.1. Download & Install

Click here to to download Armitage for OSX.

Armitage should be installed the same way you would install any other OSX app. Open the DMG file, and drag the application to your Applications folder.

6.2. Launching Armitage

For Mac OSX systems, there seems to be an issue with launching Armitage directly using the icon. In order to work around this, Armitage can be launched from the command line:

 

HAPPY HACKING!

Mac 下安装Metasploit,布布扣,bubuko.com

Mac 下安装Metasploit

上一篇:delphi的webBrowser操作HTML研究


下一篇:MVC日期格式化,后台使用Newtonsoft.Json序列化日期,前端使用”f”格式化日期