BeEF (Browser Exploitation Framework) is a penetration testing tool that targets web browsers. It allows security professionals to exploit vulnerabilities in web browsers and gain control over a compromised system through hooked browsers.
2. Setting Up BeEF on Kali Linux
Step 1: Install BeEF
BeEF comes pre-installed in Kali Linux. If missing, install it manually:
sudoaptupdate&&sudoaptinstallbeef-xss
Step 2: Start BeEF
Launch BeEF by running:
sudobeef-xss
After starting, you should see an output like:
[*] Starting BeEF...
[*] Running on http://127.0.0.1:3000/ui/panel
Step 3: Access the BeEF Web Interface
Open a browser and navigate to:
Default credentials:
Username: beef
Password: beef
3. Hooking a Target Browser
To compromise a browser, inject the BeEF Hook JavaScript into a vulnerable website:
Replace your-ip with your attacker machine’s IP.
When a victim loads the page, their browser becomes hooked and appears in BeEF’s control panel.
4. Exploiting a Hooked Browser
Once a browser is hooked, BeEF provides various exploitation modules, including:
Stealing Cookies & Session DataCapturing KeystrokesInjecting Fake Login Pages (Phishing)Manipulating Web Pages in Real TimeExploiting Browser Vulnerabilities (e.g., outdated extensions)