Run metasploit on Yosemite with ruby 2.1.4

msf_ruby

Once again I’ve been playing around with metasploit and ruby on Yosemite and as a result I can run metasploit with ruby 2.1.4.

All I have to say is that it has been quite tricky but at the end I’ve got it working!
Here is an explanation, step by step, of what needs to be done to achieve the goal:

Assuming Homebrew is already installed into the system, use the terminal to run the following commands:

# brew update
# brew install rbenv ruby-build
# rbenv install 2.1.4
# rbenv global 2.1.4

To be sure the above commands had worked as expected a check is necessary running:

# ruby -v

The output must be:

ruby 2.1.4p265

Once ruby is configured to use 2.1.4 version, metasploit needs to be updated running the following command:

# msfupdate

This command will take a while to be executed but at the will be possible to run metasploit with:

# msfconsole

Enjoy the new setup.

2 comments

  1. Thanks for the post! I would only add that it is probably best to accommodate the needs of people who prefer to install via source instead of defaulting to binary.

    That the most painless way on OS X to get dependency libs like libxml and libxslt is with the Xcode Command Line Tools. You can install them with `xcode-select –install`

    Also, some people may be maintaining newer versions of libs managed with Homebrew. If that’s the case, it is usually wise to do a `brew upgrade`. In fact, it’s a good practice to do that whenever you are installing a new major version of OS X anyway.

    Thanks for your interest in Metasploit for for helping to keep people running!

  2. Hi Trevor,

    Thanks for your comment/suggestion. I will write another post later on explaining how to install ruby from sources.

    Stay tuned.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.