Skip to content
bcoles edited this page Mar 31, 2023 · 21 revisions

What is the default login for BeEF?

BeEF is configured with default placeholder credentials of beef / beef.

However, BeEF will not start if configured with these credentials. The credentials must be changed in the configuration file config.yaml.

How do I configure integration with Metasploit?

Be sure to read the documentation (and here also), and take care especially of the following points :

  • Enable MSF integration by changing beef.extension.metasploit.enable to true in BeEF's main config.yaml file.
  • Ensure you load the msgrpc interface in Metasploit before starting BeEF: msf > load msgrpc ServerHost=127.0.0.1 Pass=abc123 SSL=y
  • Ensure that the IP address supplied to Metasploit with the ServerHost parameter is the same IP address as specified in beef.extension.metasploit.host
  • Ensure that the IP address specified in beef.extension.metasploit.callback_host is the publicly accessible IP address for victim connections to Metasploit.
  • Ensure that if SSL=y was supplied to Metasploit when starting msgrpc then beef.extension.metasploit.ssl is set to true.

Bundle install doesn't work

Run bundle install to install missing gems.

    cd /path/to/beef 
    gem install bundler 
    bundle install

If this doesn't work, try removing the Gemfile.lock file and install gems manually. For example, if you receive the error: An error occurred while installing XXXX (x.x.x), and Bundler cannot continue. try install the gem manually:

    gem install XXXX

How do I configure BeEF on a server behind NAT?

Forward the public port (default 3000/tcp) from your border router to the BeEF server (<LAN IP>:3000).

Check that your network configuration is working correctly by attempting to access the admin panel:

http://<your WAN IP address>:3000/ui/panel

If you cannot access the admin panel, then your network configuration is broken. BeEF does not have access to your router and cannot configure your network for you. You'll need to review your network configuration to ensure the port is forwarded correctly.

Once you've confirmed that port 3000 is accessible remotely, ensure beef.http.public and beef.http.public_port are set to the public WAN IP address and public WAN port respectively in config.yaml.

You must restart BeEF after making changes to the configuration file. These changes to the configuration file are used to generated the BeEF hook JavaScript file. Note that if you leave a hooked page open during configuration, you will need to refresh the hooked page after applying these changes for the browser to fetch the updated hook file.

Additionally, ports 61985/tcp and 61986/tcp must also be forwarded if web sockets are enabled for communicating with BeEF. Likewise, some BeEF extensions, such as IPEC and DNS, require additional ports to be forwarded. Review the associated config.yaml file for each extension and ensure the appropriate ports are forwarded.

How do I configure BeEF with ngrok?

Refer to https://github.com/beefproject/beef/wiki/Using-BeEF-With-NGROK

Can I use a domain name instead of IP address for the BeEF hook?

Yes! Simply specify the public domain name and port in beef.http.public.host and beef.http.public.port respectively in config.yaml.

How do I fix ArgumentError - invalid byte sequence in US-ASCII ?

Set the appropriate locale:

export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

How do I fix Could not find a JavaScript runtime ?

Install NodeJS.

Why does BeeF update fail?

If you're getting the error Your local changes to the following files would be overwritten by merge: Gemfile.lock it means BeEF's dependencies were recently updated.

To fix, run git checkout Gemfile.lock, then update BeEF, and finally run bundle install to install the updated packages.

Installation of BeEF on Raspbian

Error with package installation gcc9 using Rpi 3b+ and raspbian

You get an error executing install script from beef, about gcc9 packages that are not found.

Solution

You need at first to follow this steps but be careful, installing gcc9 not 10 https://solarianprogrammer.com/2017/12/08/raspberry-pi-raspbian-install-gcc-compile-cpp-17-programs/

Then, you will need to edit 'install' file and find where is using apt-get to install gcc9 and clear dev and lib packages.

That's all, beef will be on your RPi without problems 👍

Credit @f1se4

Clone this wiki locally