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!

转载于:https://www.cnblogs.com/Savin/p/3642104.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值