My favorites | Sign in
Project Home Downloads
Search
for
UsingTheLatestBeEFInBT5  
Using the latest BeEF in BT5
Updated Nov 13, 2011 by wade@bindshell.net

Introduction

On BackTrack 5 both the old BeEF (PHP) and BeEF (Ruby) have been added but as we're doing a lot of development with a new alpha release every month, the (incorrectly named) BeEF-ng version is not up-to-date. Required gems are also not installed by default. This document will discuss how to setup this functionality.

NOTE 1: A script has been published to automate the steps described in this guide.

NOTE 2: If you run tools that require ruby 1.8 you might find this script handy

Installing BeEF from trunk in BT5

Following the next steps you will be able to use use the latest BeEF on your pentests using BT5:

  1. rm -rf /pentest/web/beef-ng
  2. svn checkout http://beef.googlecode.com/svn/trunk/ /pentest/web/beef
  3. GEM PATHS defined in the Gem Environment are wrong, so: add export GEM_PATH=/var/lib/gems/1.9.2/gems and export GEM_HOME=/var/lib/gems/1.9.2/gems to /etc/profile
  4. source /etc/profile
  5. cd /pentest/web/beef, then run ruby install , and press 2 to list all the required gems
  6. install these required gems with gem install 'gem list from previous step'
  7. to see if everything went ok:
  8. 	root@bt:~# irb
    	irb(main):001:0> require 'rubygems'
    	=> false
    	irb(main):002:0> require 'dm-core'
    	=> true
    	irb(main):003:0> Gem.path
    	=> ["/var/lib/gems/1.9.2/gems"]
    	irb(main):004:0> quit
  9. Start BeEF with the default SQLite DB: ruby beef -x

Now BeEF is up-and-running and can be updated to the latest trunk version with the usual svn update command from the /pentest/web/beef directory.

Comment by jereinda...@gmail.com, Jul 6, 2011

PATH is not /var/lib/gems/1.9.2/gems but /var/lib/gems/1.9.2 in both cases.

Comment by linux...@gmail.com, Aug 13, 2011

nice

Comment by cristian...@gmail.com, Dec 12, 2011

enter the script, ad the path and still with core errors

Comment by rui...@wavefrontcg.com, Mar 20, 2012

Even with the update directories still getting "/pentest/web/beef/extensions/console/banners.rb:65:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError?)

from /pentest/web/beef/extensions/console/banners.rb:65:in `print_network_interfaces_count' from beef:94:in `<main>'"

Powered by Google Project Hosting