Friday, June 8, 2012

BeEF up: Installing BeEF

We haven't forgotten about the BeEF in a Real World Pentest series. We're taking a break due to the new release, and getting you the stuff you need to use the tool we all know and love.
So, this week's post is about how to get up and running with BeEF.  

This one comes from our very own Ben Waugh.

Getting up and running with BeEF:

 The great things about BeEF are, the Console, GUI, and RESTful APIs are really easy to use; and the framework is well designed to make module development pretty self-explanatory. 

But, getting BeEF up and running seems to trip up people. This is partly because of our use of the latest Ruby framework and gems.

Hence, we have put together this quick guide to the most common ways to get BeEF up and running with the software it relies on using your OS!

This is what you'll need:
  • OSX 10.5.0 or higher, Modern Linux, Windows XP or higher
  • [Ruby]( 1.9.2 RVM or higher
  • [SQLite]( 3.x * The following GEMS:
    • bundler
    • thin
    • Sinatra
    • ANSI
    • TERM-ANSIcolor
    • dm-core
    • json
    • data_objects
    • dm-sqlite-adapter
    • parseconfig
    • erubis
    • dm-migrations
    • msfrpc-client
    • eventmachine
    • win32console (Windows Only)

Option 1: The Install Script (*nix only)
This is the easy way out. We have put together a quick script that will download and install BeEF's prerequisites and download the latest version of BeEF. The script installs RVM, Ruby 1.9, and the required Ruby gems. Be warned, this could affect other software using other versions of Ruby on your system or possibly break things. Use this option cautiously and at your own risk - don't say you were not warned!

To run the script on a *nix system just run;
If we are missing your OS or the script doesn't work let us know, and we'll try to update it to help other users.

Option 2: Manual Install
To take control of what you are installing or changing on your box, you can follow our install instructions. Which will take you through step by step how to install and configure on a clean system. 

As before, if we are missing your OS or these instructions don't work let us know, and we'll try to update these pages to help other users.

Option 3: Experimental Features
CDE Package
If you would like to run beef without installing or modifying Ruby you can generate a CDE package. Note: you'll will need a box with a similar OS running Beef with pre-requisites in order to initially generate the CDE Package (or a friend with Beef up and running :))

This package is created using Philip Guos CDE generation script, check it out here;

To generate the CDE file run rake CDE. Once generated you can run beef from the cde-package/cde-exec binary created.. ie. 
./cde-package/cde-exec cde-package/beef

Mac DMG Image
To package beef into a single DMG file you can run rake DMG. This will create a DMG image file suitable to distribute and install on Mac systems.


  1. hey i wonder one thing . . all videos it is shown 192.168.1.X and i want to use it globaly not in network. . . do i use my global ip adress ? and what about port forwardin g? thanx

  2. Hi everybody

    I Have to install BeEF on Centos. I am a really amateur and don't kno how to do this. Can someone help me?

    Thanks a lot for your anwer!

  3. I am security expert so I can recommend you if you lost your phone. It will help you to track your phone for free.

  4. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    Selenium with python Training in Electronic City

  5. A great software that helps you monitor activities for your phone. 12 inches weave hair

    Download latest cracks of mac & pc softwares. You can get full versions of latest games, softwares, applications and many tools.