Browser exploitation framework

BeEF

BeEF, the Browser Exploitation Framework, is an open-source Ruby tool for taking control of web browsers. An operator injects a small JavaScript hook into a page, usually through an XSS flaw or social engineering, and any browser that loads the page is hooked: it beacons back to the BeEF server and the operator drives it from a web panel, running modules for keylogging, phishing, network reconnaissance, and credential theft against the victim's browser session. It is a standard penetration-testing tool, and like any browser C2 it works the same way for an intruder as for a tester.

BeEF targets the browser, not the host. The control sits in a hooked tab, so the lasting signal is the hook itself and the exposed BeEF installs operators leave behind in open directories. Hunt.io picks it up there, in AttackCapture.

Quick facts
  • Aliases: BeEF, BeEF-XSS, Browser Exploitation Framework
  • Type: browser exploitation and client-side C2 framework
  • Maintainer: the BeEF project, open source
  • Project: github.com/beefproject/beef (open-source tool source, referenced as text only, not linked)
  • Written in: Ruby, with a JavaScript hook
  • Default port: 3000, serving both the hook and the admin panel
  • Hook: /hook.js, which sets a BEEFHOOK session on the victim browser
  • Admin panel: /ui/panel, default credentials beef / beef
  • Dual-use tool
  • Browser C2
The hook

The hook, the panel, and port 3000

A BeEF server does two things on the same port. It serves the hook at /hook.js, the JavaScript that an operator plants in a target page, and it serves the admin panel at /ui/panel, where hooked browsers show up and modules are launched. By default both run on port 3000, the default login is beef / beef, and the hook sets a BEEFHOOK cookie on any browser that loads it.

Once a browser runs the hook, it polls the BeEF server for commands and returns results, so the victim's browser becomes the foothold rather than the machine. Operators often move the hook off port 3000 and serve it from a normal web port to blend in, which is exactly what the exposed instances show: the same hook.js turning up on ports 80, 81, 443, and 8081. The port moves, but the hook's contents do not, and that is what you fingerprint on.

Coverage

Where BeEF shows up in Hunt.io

Last updated on Nov 27, 2026.

Hunt.io tracks BeEF through AttackCapture, the open-directory index, where operators expose the BeEF install or the hook they serve. A search for the hook's internal object, BeefJS, returns the real artifacts rather than passing mentions in wordlists and tool catalogs.

AttackCapture hook artifacts (6): 80.78.30.89:80 (beef framework directory), 47.120.44.103:443 (hook.js), 47.120.38.173:8081 (hook.js), 56.228.31.24:80 (beef.js).

HuntSQL

Fingerprinting BeEF with AttackCapture

Hunt.io tracks the BeEF hook through the AttackCapture open-directory index. Searching for the hook's JavaScript object, BeefJS, avoids the noise that a plain "beef" search picks up and returns the real installs:

Output example:

AttackCapture code search for BeefJS returning the BeEF hook and client filesFigure 01. AttackCapture code search for BeefJS, returning the BeEF hook and client files, with the version string and the hook object visible in the snippets.

From a hit, pivot on the files that make up a BeEF install, like beef.js and the hook served under the framework's client path, and on the artifacts that travel with an operator box, such as tunneling tools and shell history.

In the wild

An exposed BeEF install in the wild

BeEF shows up less as a tracked campaign and more as the occasional operator box left open. One example was an open directory on 80.78.30.89:80, hosted on Materialism s.r.l. (AS39287) in Lund, Sweden, holding the full BeEF framework directory alongside the operator's own tooling.

The exposed installs show the same shape. A host indexed in AttackCapture serves the BeEF framework directory straight out of the open directory:

Hunt.io AttackCapture file manager for the 80.78.30.89 open directory showing the beef framework directoryFigure 02. The Hunt.io AttackCapture file manager for the exposed 80.78.30.89:80 directory, with the complete beef framework directory sitting next to tunneling and shell-history artifacts.

The directory held the complete beef framework tree with hundreds of files, including the client-side beef.js carrying the unrendered version template. Next to it were an ngrok tunneling directory and a shell history, the usual signs of an operator using the box rather than a clean install. That combination, the BeEF framework plus a tunneling tool and operator traces, is a stronger indicator than any single file.

Defense

Spotting a BeEF hook on your own estate

Because BeEF rides client-side code, you detect it where the hook runs and where it is served. On your own web properties, watch for a script tag pointing at a /hook.js you do not control, for the BEEFHOOK and BEEFSESSION cookies on client browsers, and for browsers making the steady polling requests a hook generates. A BeEF panel itself defaults to port 3000 with an admin page under /ui/panel, though operators often change the port, so treat the hook contents as the reliable fingerprint rather than the port.

Since the hook arrives through cross-site scripting, the root fix is the same as for XSS: validate and encode output, and deploy a content security policy strict enough that a browser will not load script from an attacker's host. For external hunting, use AttackCapture to find exposed hooks and BeEF installs, and apply the same infrastructure threat hunting you use when detecting C2 servers to pivot across the hosts that serve them.

Questions

Questions defenders ask about BeEF

Is BeEF malware?

No, BeEF is a legitimate browser-exploitation framework. It is a well-known, legitimate penetration-testing framework, and the same framework can be used by an attacker. What matters is context: a BeEF hook on a page you did not authorize is a client-side attack, whoever planted it.

What does BeEF actually do?

It hooks web browsers with a JavaScript payload and gives an operator a panel to run modules against them, including keylogging, phishing pages, social-engineering prompts, browser and network reconnaissance, and credential capture, all scoped to the victim's browser session.

How does the BeEF hook work?

The operator serves a script, hook.js, and gets it to run in a victim's browser through an XSS flaw or social engineering. The hooked browser then polls the BeEF server for commands and returns results until the tab is closed.

What port does BeEF use, and how do I spot a panel?

By default the server runs on port 3000, serving the hook at /hook.js and the admin panel at /ui/panel with default credentials beef / beef. Operators frequently change the port, so confirm on the hook contents and the panel paths rather than the port alone.

How do I protect against BeEF?

Fix the cross-site scripting that lets a hook run, enforce a strict content security policy so browsers will not load untrusted script, and change BeEF's own defaults if you run it for testing. Watching for the hook script and its cookies catches an active hook.

Who makes BeEF?

It is an open-source project maintained by the BeEF project community and has been a standard browser-exploitation tool for years.