Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What is the default login for BeEF?
By default, beef/beef is the login. Check out the documentation.
How do I configure integration with Metasploit?
- Enable MSF integration by changing
beef.extension.metasploit.enableto 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
ServerHostparameter is the same IP address as specified in
- Ensure that the IP address specified in
beef.extension.metasploit.callback_hostis the publicly accessible IP address for victim connections to Metasploit.
- Ensure that if
SSL=ywas supplied to Metasploit when starting msgrpc then
beef.extension.metasploit.sslis set to
How do I configure BeEF on a server behind NAT?
beef.http.public_portare set to the public WAN IP address and public WAN port respectively.
- Forward the public port (default 3000/tcp) from your border router to
<LAN IP>:3000of the BeEF server.
- 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?
Download ngrok, then tunnel your BeEF port (default:
$ ngrok http 3000
Specify the public domain name
beef.http.public and public port
public: "<your-id>.ngrok.io" # public hostname/IP address public_port: "80" # public port (experimental)
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_port respectively in
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
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 run
bundle install to install the updated packages.