Browser Exploitation Framework Project – BeEF

Last Release: 11/25/2021     Last Commit: 09/02/2022

Browser Exploitation Framework Project – BeEF


The Browser Exploitation Framework (BeEF) is a powerful professional security tool. It is a penetration testing tool that focuses on the web browser.

BeEF - The Browser Exploitation Framework Project

BeEF: The Browser Exploitation Framework

Unlike other security frameworks, BeEF focuses on leveraging browser vulnerabilities to assess the security posture of a target. By using techniques similar to common drive-by malware, testers can assess the security of a target’s internal environment, bypassing the hardened perimeter.

The Browser Exploitation Framework contains numerous command modules that employ BeEF’s  powerful API, which represents the heart of BeEF’s effectiveness and efficiency.

BeEF comes pre-installed in various pentesting operating systems such as:

Extensions & Features:

  • Web UI
  • Console UI
  • Metasploit Integration
  • XSSRays
  • Modular structure
  • BeEF JavaScript Object

Module Features:

  • Interprocess communications & exploitation
  • History gathering and intelligence
  • Network recon
  • Host information gathering
  • Browser plugin detection
  • Persistence
  • Exploits



Since BeEF requires Ruby 2.3+, make sure you install the latest stable version. Ruby installation process depends on your OS.


$ sudo yum install ruby ruby-devel

Debian, and other distributions using Debian style packaging:

$ sudo apt-get install ruby-dev


$ sudo apt-get install ruby-all-dev

If your OS package manager doesn’t support Ruby 2.3+, for the latest version you can add the brightbox ppa repository:

$ sudo apt-add-repository -y ppa:brightbox/ruby-ng
Alternative: use a Ruby environment manager such as rbenv or rvmto to manager your Ruby versions.

BeEF Install

Download the latest version:

$ wget

Or simply clone it from Github repository:

$ git clone

Once you installed suitable Ruby version, you can install BeEF as follows:

$ ./install

BeEF Installation


To start BeEF, just run:

$ ./beef

Try to keep BeEF up to date. If you installed it through Github repository, for update simply run the following:

$ git pull

Jump to UI panel on http://localhost:3000/ui/authentication



Configure BeEF in the main config file config.yaml. First of all, change credentials for the Web UI. Old default credentials:


If you don’t change the password,  BeEF will generate a new random password for you, which you’ll see in terminal when you start the framework:

$ ./beef

[15:39:59][*] Browser Exploitation Framework (BeEF)
[15:39:59] | Twit: @beefproject
[15:39:59] | Site:
[15:39:59] | Blog:
[15:39:59] |_ Wiki:
[15:39:59][*] Project Creator: Wade Alcorn (@WadeAlcorn)
[15:39:59][*] BeEF is loading. Wait a few seconds...
[15:40:04][*] 8 extensions enabled.
[15:40:04][*] 302 modules enabled.
[15:40:04][*] 2 network interfaces were detected.
[15:40:04][*] running on network interface:
[15:40:04] | Hook URL:
[15:40:04] |_ UI URL:
[15:40:04][*] running on network interface:
[15:40:04] | Hook URL:
[15:40:04] |_ UI URL:
[15:40:04][!] Warning: Default username and weak password in use!
[15:40:04] |_ New password for this instance: af0c38cb69023b0f828fcdcbcc911e33 [15:40:04][*] RESTful API key: 5dfcc5f7f74485df44cf442a6c557404fee8edfc [15:40:04][*] HTTP Proxy: [15:40:04][*] BeEF server started (press control+c to stop)

Available Modules


  • Browser Fingerprinting
  • Detect: Firebug, Popup block, Unsafe ActiveX
  • Get Visited Domains
  • Detect Visited URL
  • Play Sound
  • Unhook
  • Webcam
  • Get Firefox/Chrome Extensions
  • Detect MS Office Version

Hooked Domain

  • AJAX Fingerprint
  • Alert Dialog
  • Deface Web Page
  • Get Cookie, Local Storage, Page HTML, Page Links
  • Get Session Storage, Stored Credentials
  • Replace HREFs (HTTPS)(TEL)
  • Create Alert Dialog
  • Create Prompt Dialog
  • Redirect Browser(Rickroll, iFrame)
  • Replace Content (Deface)
  • Replace Videos
  • iOS Address Bar Spoofing

Local Host

  • Windows Mail Client DoS
  • ActiveX Command Execution
  • Java Payload
  • Safari Launch App

Chrome Extensions

  • Execute On Tab
  • Get All Cookies
  • Grab Google Contacts
  • Inject BeEF
  • Screenshot
  • Send Gvoice SMS


  • Return Ascii Chars
  • Test Network Request
  • Test Returning Results


  • ColdFusion Directory Traversal Exploit
  • GlassFish WAR Upload XSRF
  • Jboss 6.0.0M1 JMX Deploy Exploit
  • Spring Framework Malicious Jar Exploit
  • VTiger CRM Upload Exploit
  • Zenoss 3.2.1 Add User CSRF
  • Zenoss 3.2.1 Daemon CSRF
  • boastMachine 3.1 Add User CSRF


  • Man-In-The-Browser
  • Confirm Close Tab
  • Create Foreground iFrame
  • Create Pop Under



  • 3COM OfficeConnect Command Execution
  • Asmax AR-804gu Command Execution
  • BT Home Hub CSRF
  • Cisco E2400 CSRF
  • Comtrend CT-5367 CSRF
  • Comtrend CT 5624 CSRF
  • D-Link DIR-615 Password Wipe
  • D-Link DSL500T CSRF
  • Huawei SmartAX MT880 CSRF
  • Virgin Superhub CSRF


  • AlienVault OSSIM 3.1 XSS
  • Cisco Collaboration Server 5 XSS
  • Serendipity <= 1.1.1 Add User CSRF

Social Engineering

  • Autocomplete Theft
  • Clickjacking
  • Clippy
  • Fake Evernote Web Clipper Login
  • Fake Flash Update, Fake LastPass
  • Google Phishing
  • Lcamtuf Download
  • Fake Notification Bar(Chrome, FF, IE)
  • Pretty Theft
  • Simple Hijacker
  • TabNabbing

See full list of available BeEF modules here.

Documentation Box
Download Box