Showing posts with label web attack. Show all posts
Showing posts with label web attack. Show all posts

Wednesday 26 February 2020

BEEF Installation on Kali Linux


The following installation instructions are suitable for Linux based operating systems.
In theory, BeEF should work on any operating system which can run Ruby 2.5+ and NodeJS. However, only MacOS and Linux are officially supported.
You will not find MacOS installation instructions in this guide. They are currently high on the list of wiki tasks to be completed.

It's highly recommended that you use a Ruby Environment Manager when installing BeEF on Ubuntu, due to restricted permissions. Please note that you do not need to install Ruby as per the above instructions, if using Ruby Environment Manager.
In order to install BeEF and RVM you will need to install Git and Curl first, as they do not come out of the box with Ubuntu.
$ sudo apt-get install git
$ sudo apt-get install curl
To install RVM, firstly go to https://rvm.io/rvm/install and install the GPG keys. Then install RVM, without dependencies:
$ \curl -sSL https://get.rvm.io | bash -s -- --autolibs=install-packages 
Now install those dependencies as root while in the applications users $HOME directory:
$ sudo .rvm/bin/rvm requirements 
Now that the dependencies are installed we need to install the stable releases of both RVM and Ruby. As the application user enter:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
BeEF requires Ruby 2.5.x. Before navigating to the beef directory run:
$ rvm install "ruby-2.5.3"
Then simply reload your shell!
You can verify your installation of RVM and Ruby by running:
$ rvm -v
$ ruby -v
After following the above steps, simply clone the repository and install BeEF as per below.

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 and all the prerequisite Ruby gems.
If installation failed with rake not found error. Run below command.
gem install rake -v '13.0.1'
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