Bettercap is a powerful cybersecurity tool used in network sniffing, spoofing, and security auditing. As an ethical hacker, penetration tester, or cybersecurity professional, Bettercap helps you test, intercept, and tamper with network traffic to identify vulnerabilities.
Packet sniffing, MITM attacks, password cracking, ARP spoofing, and live WiFi security testing are all possible using Bettercap. It is small, modular, and forward-looking in comparison to the older style of utilities such as Ettercap, and therefore a crucial addition to network security scans.
This article will walk you through installing Bettercap, sniffing and spoofing traffic, and using the core commands to derive advantage to your security experience. Whether you're testing your own network defense or performing an authorized penetration test
Setting Up BetterCap
Step 1: Install Bettercap
Ensure your system is updated before installing Bettercap. Open your terminal and type:
sudo apt-get update
sudo apt-get install bettercap
Step 2: Running Bettercap
To start Bettercap, simply open your terminal and type:
sudo bettercap
Key Features of Bettercap
Here are some key features of bettercap tool:
- Network Sniffing – Catches packets and examines live network traffic.
- Man-in-the-Middle (MITM) Attacks – Snoop and modifies network communications.
- Password Cracking & Credential Sniffing – Stolen login credentials from plaintext traffic.
- Wi-Fi Hacking & Deauthentication Attacks – Scans wireless vulnerabilities and deauthenticates devices from networks.
- HTTPS Downgrade Attacks – Downgrades HTTPS connections to HTTP, making them susceptible to eavesdropping.
- DNS & ARP Spoofing – Diverts network traffic for session hijacking and phishing attacks.
- Bluetooth & IoT Exploits – Exploits Bluetooth vulnerabilities and Internet of Things (IoT) security
Sniffing with Bettercap
Sniffing is the process of intercepting and logging traffic on a network. With Bettercap, you can capture data packets for analysis.
Step 1: Start Sniffing
To begin sniffing network traffic, enter the following command within the Bettercap session:
net.sniff onBettercap will start capturing and displaying all network traffic it intercepts.
Step 2: Filter Traffic
To focus on specific types of traffic, you can apply filters. For example, to capture only HTTP traffic, use:
net.sniff.filter ether proto 0x0800 and tcp port 80This command ensures that only HTTP traffic (which uses TCP port 80) is captured.
Note: To see the captured traffic, simply monitor the output in the Bettercap session. You can also log this traffic to a file for later analysis.
net.sniff.output /path/to/logfile.pcapReplace /path/to/logfile.pcap with your desired file path.

For more details refer the article Sniffing using bettercap in Linux
Spoofing with Bettercap
Spoofing tricks devices into thinking the attacker’s device is another device on the network. One common method is ARP spoofing.
Step 1: Enable ARP Spoofing
To start ARP spoofing, use the following command:
arp.spoof onThis command will initiate ARP spoofing, allowing you to intercept traffic between devices.
Step 2: Target Specific Devices
To target a specific device, you need to specify its IP address. For example, we have a target device with IP address 192.168.1.10, use:
set arp.spoof.targets 192.168.1.10arp.spoof on
Note: Once ARP spoofing is active, you can intercept and analyze traffic between the targeted device and the network. You can combine this with sniffing to capture sensitive data.
Bettercap Sniffing and Spoofing Options in Linux
Bettercap is a sophisticated network security utility utilized for network sniffing, spoofing, and attacks. It offers different modules to sniff network traffic, edit packets, and execute MITM attacks. A comprehensive table depicting Bettercap sniffing and spoofing features and their descriptions and usage is presented below.
| Option / Module | Description | Usage Command |
|---|---|---|
net.sniff | Captures packets on the network and logs HTTP/HTTPS credentials, requests, and other traffic. | net.sniff on |
net.sniff.verbose | Enables detailed packet logging for network sniffing. | set net.sniff.verbose true |
net.probe | Scans the local network for active hosts. | net.probe on |
net.show | Displays all discovered network hosts. | net.show |
arp.spoof | Launches an ARP spoofing attack to intercept network traffic between devices. | arp.spoof on |
arp.spoof.targets | Sets specific target IP(s) for ARP spoofing. | set arp.spoof.targets <IP>Example: set arp.spoof.targets 192.168.1.10 |
dns.spoof | Redirects domain requests to a fake IP address, useful for phishing attacks. | dns.spoof on |
dns.spoof.all | Spoofs all DNS requests instead of only the configured ones. | set dns.spoof.all true |
dns.spoof.domains | Defines specific domains to spoof. | set dns.spoof.domains example.com |
net.recon | Continuously discovers new devices connected to the network. | net.recon on |
wifi.show | Displays nearby WiFi networks and connected devices. | wifi.show |
wifi.assoc | Forces a device to associate with an access point. | set wifi.assoc <BSSID> |
wifi.deauth | Sends deauthentication packets to disconnect users from WiFi. | wifi.deauth on |
http.proxy | Intercepts and modifies HTTP traffic in real-time. | http.proxy on |
https.proxy | Intercepts HTTPS traffic using SSL stripping. | https.proxy on |
http.server | Hosts a fake HTTP server to capture credentials. | http.server on |
caplets.update | Updates all available Bettercap caplets (scripts). | caplets.update |
caplets.show | Lists all available caplets (Bettercap scripts). | caplets.show |
session.list | Shows all active sessions in Bettercap. | session.list |
quit | Exits Bettercap. | quit |
Also Read:
Conclusion
By following this article, you've learned how to use Bettercap for network sniffing and spoofing. These techniques are vital for understanding potential vulnerabilities in your network. Bettercap's versatility makes it an invaluable tool for security professionals. Remember, ethical use is paramount—always ensure you have permission before conducting any network tests.
Unauthorized use is illegal and can have serious consequences. Use these techniques to strengthen network security, identify weaknesses, and protect against real-world attacks. Understanding and practicing these methods responsibly will enhance your ability to secure networks and data.