Sniffing & Spoofingsnifferinterceptormitmarpsslpacketfilteringlogger

Ettercap

Ettercap is a multipurpose sniffer, interceptor, and logger for switched LANs supporting active and passive dissection of many protocols. It enables man-in-the-middle attacks, data injection, packet filtering, and comprehensive network analysis.

Description

Ettercap is designed for comprehensive network reconnaissance and manipulation on switched LANs. It supports active and passive dissection of numerous protocols, including encrypted ones, and offers features for network and host analysis. Users can perform data injection into established connections, filter packets on the fly (substitute or drop), and maintain connection synchronization. Available in multiple packages: ettercap-common for core files, ettercap-graphical for GUI, ettercap-text-only for console, and supporting tools like etterfilter and etterlog.

Common use cases include detecting switched LAN geometry, OS fingerprinting (active or passive), and sniffing in IP-based, MAC-based, ARP-based (full-duplex), or PublicARP-based (half-duplex) modes. It facilitates man-in-the-middle (MITM) attacks and is suitable for penetration testing environments like Kali Linux.

The toolset includes ettercap-pkexec for graphical root-privileged launching via PolicyKit, etterfilter for compiling content filters, and etterlog for analyzing log files. Installation requires sudo apt and dependencies like libpcap and libnet.

How It Works

Ettercap operates by placing the network interface in promiscuous mode (unless disabled) to capture traffic. It supports four sniffing modes: IP Based, MAC Based, ARP Based (full-duplex multi-sniffing), and PublicARP Based (half-duplex). For MITM, it uses methods like ARP poisoning to intercept traffic between targets. Protocol dissection occurs actively or passively, with capabilities for SSL certificate forging (unless disabled), packet filtering via scripts, data injection, and logging to pcap or custom formats. Plugins, LUA scripts, and filters extend functionality for visualization, regex matching, and host discovery. It detects LAN geometry and uses OS fingerprints for host identification.

Installation

bash
sudo apt install ettercap-common

Flags

-M, --mitm <METHOD:ARGS>perform a mitm attack
-o, --only-mitmdon't sniff, only perform the mitm attack
-T, --textuse text only GUI
-G, --gtkuse GTK+ GUI
-D, --daemondaemonize ettercap (no GUI)
-i, --iface <iface>use this network interface
-F, --filter <file>load the filter <file> (content filter)
-P, --plugin <plugin>launch this <plugin> - multiple occurance allowed
-w, --write <file>write sniffed data to pcapfile <file>
--lua-script <script1>,[<script2>,...]comma-separted list of LUA scripts

Examples

Display the help screen showing usage, options, and flags
ettercap -h
Start ettercap with the GTK GUI interface
ettercap -G
Start ettercap with root privileges and the GTK interface using pkexec launcher
ettercap-pkexec -G
Display help for etterfilter, the filter compiler
etterfilter -h
Display help for etterlog, the log analyzer
etterlog -h
Use text-only GUI mode
ettercap -T
Daemonize ettercap without GUI
ettercap -D
Updated 2026-04-16kali.org ↗