Skip to content

Installation

bcoles edited this page Apr 1, 2023 · 58 revisions

Introduction

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

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

Introducing BeEF | Configuration

Clone this wiki locally