BetterCAP gives Kali Linux users a powerful MITM framework, but getting it installed correctly requires attention to your specific kernel version. This guide covers exactly how to install Bettercap on Kali Linux using multiple methods, ensuring you avoid common pitfalls. Whether you’re a beginner or an experienced pentester, you’ll find clear steps here.
Bettercap is a versatile tool for network attacks, monitoring, and HTTP/HTTPS manipulation. It’s a go-to for red teamers and security researchers. But if you rush the installation, you might face dependency errors or broken modules. Let’s fix that.
Prerequisites For Installing Bettercap On Kali Linux
Before you start, make sure your Kali Linux system is up to date. Open a terminal and run these commands:
sudo apt update
sudo apt upgrade -y
You also need a stable internet connection. Bettercap downloads additional dependencies during installation. Also, ensure you have at least 2GB of free disk space.
Check your kernel version with:
uname -r
This matters because some Bettercap features rely on kernel modules. Write down your kernel version for later reference.
How To Install Bettercap On Kali Linux
Now let’s get into the main methods. There are three reliable ways to install Bettercap on Kali Linux. Choose the one that fits your setup best.
Method 1: Install Bettercap Using APT (Recommended)
Kali Linux includes Bettercap in its default repositories. This is the simplest method. Run:
sudo apt install bettercap -y
After installation, verify it works:
bettercap -version
If you see a version number, you’re good. However, the APT version might be slightly outdated. For the latest features, consider the next method.
Method 2: Install Bettercap From GitHub Releases
This method gives you the newest release. First, remove any existing Bettercap installation:
sudo apt remove bettercap -y
Then download the latest Linux amd64 binary from the official GitHub releases page. Use wget:
wget https://github.com/bettercap/bettercap/releases/download/v2.33.0/bettercap_linux_amd64.zip
Unzip it:
unzip bettercap_linux_amd64.zip
Move the binary to a system path:
sudo mv bettercap /usr/local/bin/
Make it executable:
sudo chmod +x /usr/local/bin/bettercap
Test it:
bettercap -version
This method avoids dependency issues. But you need to manually update it later.
Method 3: Install Bettercap From Source Using Go
If you want absolute control, compile it yourself. First, install Go:
sudo apt install golang-go -y
Then clone the repository:
git clone https://github.com/bettercap/bettercap.git
cd bettercap
Build it:
make build
This takes a few minutes. After completion, install it:
sudo make install
Check the version:
bettercap -version
This method ensures you have the absolute latest code. But it requires more time and disk space.
Post-Installation Configuration
After installing Bettercap, you need to set up some dependencies. These are crucial for full functionality.
Install Required Dependencies
Bettercap needs libpcap and other libraries. Install them with:
sudo apt install libpcap-dev libusb-1.0-0-dev libnetfilter-queue-dev -y
For Wi-Fi attacks, install aircrack-ng:
sudo apt install aircrack-ng -y
Also install nmap for network discovery:
sudo apt install nmap -y
Configure Network Interface
Bettercap needs a network interface in monitor mode for some attacks. Put your interface into monitor mode:
sudo airmon-ng start wlan0
Replace wlan0 with your interface name. Check with iwconfig.
If you get errors, ensure no conflicting processes are running:
sudo airmon-ng check kill
Set Up Capabilities For Non-Root Usage
Running Bettercap as root is not ideal. Set capabilities to allow normal user execution:
sudo setcap cap_net_raw,cap_net_admin+eip /usr/local/bin/bettercap
Now you can run Bettercap without sudo for most features.
Common Installation Issues And Fixes
Even with careful steps, you might hit problems. Here are the most common ones.
Kernel Module Errors
Bettercap uses kernel modules like nfqueue and br_netfilter. If you see errors about missing modules, load them:
sudo modprobe nfqueue
sudo modprobe br_netfilter
To make them permanent, add them to /etc/modules:
echo "nfqueue" | sudo tee -a /etc/modules
echo "br_netfilter" | sudo tee -a /etc/modules
Go Compilation Errors
When compiling from source, you might get missing package errors. Install all Go dependencies:
go get -u ./...
If that fails, check your Go version:
go version
Bettercap requires Go 1.16 or later. Update if needed.
Binary Not Found After Installation
If you moved the binary but get “command not found”, check your PATH:
echo $PATH
Ensure /usr/local/bin is in the list. If not, add it to your .bashrc:
export PATH=$PATH:/usr/local/bin
Dependency Conflicts With APT
Sometimes APT installs an older version of libpcap. Uninstall it and install the development version:
sudo apt remove libpcap0.8
sudo apt install libpcap-dev
Verifying Bettercap Installation
After fixing any issues, verify everything works. Run a simple scan:
sudo bettercap -eval "net.probe on; sleep 5; net.show"
You should see a list of devices on your network. If you see errors, check the logs:
bettercap -debug
This shows detailed output. Look for missing modules or permission issues.
Test the HTTP proxy module:
sudo bettercap -eval "http.proxy on; http.proxy.script /usr/share/bettercap/scripts/hstshijack/hstshijack.js"
If it starts without errors, your installation is complete.
Updating Bettercap
Keeping Bettercap updated is important for new features and bug fixes. Here’s how.
Update Via APT
If you used APT, simply run:
sudo apt update
sudo apt upgrade bettercap -y
Update Via GitHub Release
Download the latest binary and replace the old one:
wget https://github.com/bettercap/bettercap/releases/latest/download/bettercap_linux_amd64.zip
unzip -o bettercap_linux_amd64.zip
sudo mv bettercap /usr/local/bin/
Update Via Source
Pull the latest code and rebuild:
cd bettercap
git pull
make build
sudo make install
Uninstalling Bettercap
If you need to remove Bettercap, follow these steps.
Remove APT Version
sudo apt remove bettercap -y
sudo apt autoremove -y
Remove Manual Installation
sudo rm /usr/local/bin/bettercap
Also remove any configuration files:
rm -rf ~/.config/bettercap
Frequently Asked Questions
Here are common questions about installing Bettercap on Kali Linux.
Can I Install Bettercap On Older Kali Versions?
Yes, but you might need to compile from source. Older repositories may have outdated packages. Use the GitHub release method for best results.
Why Does Bettercap Say “Module Not Found” After Installation?
This usually means missing kernel modules. Load them with modprobe as shown above. Also check that your kernel headers are installed.
Do I Need Root Access To Run Bettercap?
Not always. If you set capabilities correctly, you can run most features as a normal user. But some attacks still require root for raw socket access.
How Do I Install Bettercap On Kali Linux Without Internet?
Download the binary on another machine and transfer it via USB. Then follow the GitHub release method. You’ll also need to manually install dependencies.
Is Bettercap Pre-installed On Kali Linux?
No, it’s not pre-installed. But it’s available in the default repositories. You can install it with a single APT command.
Final Thoughts
Installing Bettercap on Kali Linux is straightforward once you understand the methods. The APT method is easiest for most users. The GitHub release method gives you the latest version. Compiling from source offers maximum control.
Remember to check your kernel version and install all dependencies. This prevents most errors. After installation, test the tool with a simple scan to confirm it works.
Bettercap is a powerful framework for network security testing. With it properly installed, you can perform MITM attacks, monitor traffic, and analyze protocols. Keep it updated to access new features and security patches.
If you encounter any issues, refer back to the troubleshooting section. The community is also active on GitHub and forums. Don’t hesitate to ask for help.
Now you know how to install Bettercap on Kali Linux. Go ahead and set it up. Your network testing toolkit just got a major upgrade.