Beef – The Browser Exploitation Framework

Browser Extension Framework
Browser Extension Framework

BeEF is short for The Browser Exploitation Framework. It is a penetration testing tool that focuses on the web browser.

Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors.

Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.

Requirements

  • Operating System: Mac OSX 10.5.0 or higher / modern Linux. Note: Windows is not supported.
  • Ruby: 3.0 or newer
  • SQLite: 3.x
  • Node.js: 10 or newer
  • The gems listed in the Gemfile: https://github.com/beefproject/beef/blob/master/Gemfile
  • Selenium is required on OSX: brew install selenium-server-standalone (See https://github.com/shvets/selenium)

The following installation instructions are suitable for Linux based operating systems.

In theory, BeEF should work on any operating system which can run Ruby 3.0+ and NodeJS. However, only MacOS and Linux are officially supported.

You will not find MacOS installation instructions in this guide.

Alternatively, running BeEF through Docker alleviates any host setup pains. Refer to the Docker Setup instructions.

Table of Contents

  • Prerequisites
  • Start BeEF
  • Testing
  • Updating
  • Prerequisites

Ruby

BeEF requires Ruby 3.0 (or newer). Refer to your operating system documentation for instructions to install the latest stable version of Ruby and Ruby Developer Tools.

If your operating system package manager does not support Ruby version 3.0 (or newer), you can add the brightbox ppa repository for the latest version of Ruby:

$ sudo apt-add-repository -y ppa:brightbox/ruby-ng

Alternatively, consider using a Ruby environment manager such as rbenv or rvm.

These are command line tools that allow for simple management of different Ruby environments.

Bundler

Bundler is essential for tracking and installing the correct gems in ruby projects.

$ gem install bundler

Source

Obtain application source code either by downloading the latest archive:

$ wget https://github.com/beefproject/beef/archive/master.zip

Or cloning the Git repository from GitHub:

$ git clone https://github.com/beefproject/beef

Installation

Once a suitable version of Ruby is installed, run the install script in the BeEF directory:

$ ./install

This script installs the required operating system packages, NodeJS, and all the prerequisite Ruby gems.

Upon successful installation, be sure to read the Configuration page on the wiki for important details on configuring and securing BeEF.

Start BeEF

To start BeEF, first change the username and password config.yaml and then simply run:

$ ./beef

Testing

If you want to install the test pre-requisites just run:

$ sudo apt-get install espeak lame
$ bundle install --with test

This will install the pre-requisite gems for tests.

If you want to run the test suit run:

$ bundle exec rake

Updating

Due to the fast-paced nature of web browser development and webappsec landscape, it’s best to regularly update BeEF to the latest version.

If you’re using BeEF from the GitHub repository, updating is as simple as:

$ ./update-beef

OR manually with

$ git pull
$ bundle install

Download Beef

Join Our Club

Enter your Email address to receive notifications | Join over Million Followers

Previous Article
Vulnerability Management

6 Benefits of Vulnerability Management

Next Article
Data Protection Rules

3 Seemingly Minor Ways a Business Can Breach Data Protection Rules

Related Posts
Total
0
Share