GO KALI FREE

Ettercap

Sniffing & Spoofing

Advancedhigh risk

Ettercap is a comprehensive suite for man-in-the-middle attacks. It features sniffing of live connections, content filtering, and active or passive dissection of many protocols.

Installation

sudo apt install ettercap-graphical

Basic Syntax

ettercap -G (GUI) or ettercap -T (text)

Quick Facts

Full Name
Ettercap
License
GPL v2
Written In
C
Platforms
Linux, macOS, BSD
Category
MITM Framework
Attack Types
ARP Poisoning, DNS Spoofing, Traffic Sniffing
First Release
2002
Interface
CLI + GUI (GTK)

Tool Overview

Ettercap is a classic man-in-the-middle attack framework that has been a staple of Kali Linux for decades. It supports active and passive sniffing, ARP poisoning, DNS spoofing, and content filtering through a plugin architecture.

Originally developed as a network sniffer with MITM capabilities, Ettercap grew into a comprehensive framework supporting multiple attack vectors. Its ability to intercept and modify traffic in real-time makes it valuable for penetration testing and security research.

While newer tools like Bettercap offer more features and better stability, Ettercap remains useful for its simplicity and well-documented attack methodologies. It is particularly valuable in training environments where its straightforward approach helps teach MITM concepts.

Common Commands

ettercap -GLaunch the GTK graphical interface
ettercap -CStart the ncurses text-menu interface
ettercap -T -q -i eth0Run the console text UI quietly on interface eth0
ettercap -T -M arp:remote /192.168.1.1/ /192.168.1.2-10/ARP-poison the gateway and a host range, sniffing remote traffic
ettercap -T -M arp /192.168.1.10/ /192.168.1.1/Full ARP MITM between a single victim and the gateway
ettercap -T -M arp:oneway /192.168.1.10/ /192.168.1.1/Poison only the victim (not the router) to avoid ARP watchers
ettercap -T -i eth0 -M arp:remote // //Poison every host on the LAN (empty targets expand to ANY)
ettercap -T -M arp:remote -P dns_spoof /192.168.1.10/ /192.168.1.1/Run a DNS spoofing MITM using the dns_spoof plugin
ettercap -T -M arp:remote /192.168.1.1/ /192.168.1.2-10/ -w capture.pcapWrite all sniffed traffic to a pcap file during the attack
ettercap -T -r capture.pcapOffline mode: replay and analyze a previously captured pcap
ettercap -T -q -M arp:remote -F filter.ef /192.168.1.10/ /192.168.1.1/Apply a compiled content filter to modify traffic on the fly
etterfilter filter.ecf -o filter.efCompile an etterfilter source script into a loadable .ef filter
ettercap -T -P listList all available Ettercap plugins
ettercap -T -M arp:remote -P arp_cop /192.168.1.1/ /192.168.1.2-10/Load the arp_cop plugin to report suspicious ARP activity
ettercap -T -u -M arp:remote /192.168.1.1/ /192.168.1.2-10/Unoffensive mode: MITM without forwarding packets itself

Step-by-Step Guide

  1. 1Open the graphical interface from your terminal
  2. 2Pick the network interface to bind to
  3. 3Perform a sweep to populate the host list
  4. 4Assign hosts to target groups for interception
  5. 5Activate the routing spoofing feature
  6. 6Commence the traffic interception
  7. 7Review the extracted data displayed in the interface
  8. 8Deactivate the spoofing to restore normal network flow

Warnings

Use Cases

ARP Poisoning

Redirect traffic between two hosts by forging ARP replies to intercept communications.

DNS Spoofing

Redirect DNS queries to malicious servers for credential harvesting or phishing attacks.

Traffic Sniffing

Passively capture and analyze network traffic between hosts on a switched network.

Content Filtering

Modify packets in transit to inject malicious content or strip security controls.

SSL Stripping

Downgrade HTTPS connections to HTTP to intercept encrypted traffic.

Protocol Dissection

Automatically decode and display captured protocol data for analysis.

SSH Credential Interception

Capture SSH session data and attempt to extract credentials from intercepted SSH connections using plugin-based attacks.

HTTPS Interception

Intercept encrypted web traffic by combining ARP poisoning with SSL stripping to downgrade secure connections.

Packet Injection

Inject arbitrary packets into active network connections to modify data in transit or test network resilience.

Credential Harvesting

Automatically extract usernames and passwords from unencrypted protocols like HTTP, FTP, Telnet, and POP3 during MITM sessions.

Key Features

Related Tools

Bettercap

Sniffing & Spoofing

Wireshark

Sniffing & Spoofing

tcpdump

Sniffing & Spoofing

Burp Suite

Web Applications

mitmproxy

Sniffing & Spoofing

Responder

Sniffing & Spoofing

Frequently Asked Questions

What is Ettercap?

Ettercap is a comprehensive man-in-the-middle attack framework for Linux that enables ARP poisoning, DNS spoofing, traffic sniffing, and content filtering on local area networks. It supports both active and passive network analysis through a plugin-based architecture.

How does ARP poisoning work in Ettercap?

ARP poisoning works by sending forged ARP replies to hosts on a local network, associating your MAC address with the IP address of another host (typically the gateway). This causes traffic destined for that host to flow through your machine instead, enabling interception and modification.

Is Ettercap still relevant in 2026?

While Ettercap remains functional for basic MITM scenarios, Bettercap has largely superseded it with modern features, better stability, and active development. Ettercap is still valuable for training environments, legacy system testing, and situations where its specific plugin set is required.

What is the difference between Ettercap and Bettercap?

Bettercap is the modern successor to Ettercap with active development, better performance, and support for WiFi, Bluetooth, and BLE attacks. Ettercap is simpler and more established in training materials, but Bettercap is recommended for new engagements due to its modern architecture and larger feature set.

Can Ettercap intercept HTTPS traffic?

Ettercap can attempt SSL stripping to downgrade HTTPS connections to HTTP, but modern TLS with HSTS and certificate pinning will resist this attack. Ettercap cannot decrypt properly encrypted TLS traffic without the private key or a successful downgrade attack.

What plugins does Ettercap support?

Ettercap supports a range of plugins including dns_spoof for DNS spoofing, ssh劫持 for SSH interception, urlsnarf for URL logging, and various filter scripts. Plugins are loaded with the -P flag and configured in /etc/ettercap/ directory.

How do I set up DNS spoofing with Ettercap?

Enable DNS spoofing by launching Ettercap with -P dns_spoof during an ARP poisoning attack. Edit /etc/ettercap/etter.dns to define which domains resolve to which IP addresses. Use: ettercap -T -q -P dns_spoof -M arp:remote /target// /gateway//

Is Ettercap legal to use?

Ettercap itself is legal software. Using it for man-in-the-middle attacks on networks you own or have explicit written authorization to test is legal. Unauthorized MITM attacks violate computer fraud laws worldwide and can result in criminal prosecution.

Does Ettercap work on WiFi networks?

Ettercap can perform ARP poisoning on WiFi networks once you are connected to the network, but it cannot directly attack wireless protocols. For WiFi-specific attacks like deauthentication and handshake capture, use Bettercap or Aircrack-ng instead.

What are Ettercap filters?

Ettercap filters are compiled scripts that define rules for modifying packets in transit. They can inject content, strip headers, replace data, or drop specific packets. Filters are written using a C-like syntax and compiled with etterfilter before loading with the -F flag.

How do I capture credentials with Ettercap?

Ettercap automatically captures credentials from unencrypted protocols like HTTP, FTP, Telnet, and POP3 during ARP poisoning attacks. Enable unified sniffing mode and the tool will display cleartext credentials as they are transmitted between intercepted hosts.

Can Ettercap bypass switch port security?

Ettercap's ARP poisoning works by manipulating the ARP cache, not by bypassing switch port security directly. However, if a switch does not implement Dynamic ARP Inspection (DAI) or ARP rate limiting, Ettercap can poison the ARP tables of connected hosts to redirect traffic.

How do I install Ettercap on Kali Linux?

Ettercap is pre-installed on Kali Linux. Run sudo apt install ettercap-graphical for the GUI version or sudo apt install ettercap-text-only for the CLI-only version. On other distributions, install via package manager or build from the GitHub source repository.

What protocols can Ettercap dissect?

Ettercap can dissect HTTP, FTP, Telnet, SSH (partial), DNS, SMTP, POP3, IMAP, SMB, and many other common protocols. It automatically identifies and decodes captured traffic from these protocols to extract credentials, URLs, and session data.

How does Ettercap compare to MITMproxy?

Ettercap focuses on network-level MITM attacks through ARP poisoning and packet manipulation, while mitmproxy is an HTTP-specific proxy for intercepting and modifying web traffic. Use Ettercap for network-wide MITM attacks, mitmproxy for detailed web application testing.

Can Ettercap capture HTTPS credentials?

Ettercap can attempt SSL stripping to downgrade HTTPS to HTTP, but modern TLS with HSTS resists this attack. For HTTPS credential capture, Ettercap needs a valid SSL certificate installed on the victim's browser (via social engineering) or must exploit specific TLS implementation flaws. Bettercap or mitmproxy are more effective for HTTPS interception scenarios.

How do I use Ettercap plugins effectively?

Load plugins with the -P flag: ettercap -T -q -P dns_spoof -M arp /target// /gateway//. Common plugins include dns_spoof (DNS spoofing), ssh劫持 (SSH interception), and urlsnarf (URL logging). Configure plugin behavior in /etc/ettercap/etter.conf. Combine multiple plugins by specifying them comma-separated: -P dns_spoof,urlsnarf.

What network defenses stop Ettercap attacks?

Dynamic ARP Inspection (DAI) on managed switches prevents ARP poisoning by validating ARP packets. Port security limits MAC addresses per port. Static ARP entries bypass ARP cache manipulation. VPN encryption protects traffic even during MITM. HTTPS with HSTS prevents SSL stripping. These defenses significantly reduce Ettercap's effectiveness on properly configured networks.

How do I restore ARP tables after using Ettercap?

Stop Ettercap gracefully with 'q' or Ctrl+C to restore ARP tables automatically. Ettercap sends correct ARP replies to poisoned hosts when shutting down. If Ettercap crashes, manually restore with: arping -U -I <interface> <gateway_ip> to send correct ARP announcements. Leaving poisoned ARP entries causes persistent network connectivity issues for victims.

Can Ettercap perform ARP poisoning on a switched network?

Yes, Ettercap's ARP poisoning works on switched networks by corrupting the ARP cache of target hosts, causing them to send traffic to your MAC address instead of the real gateway. This does not bypass the switch itself — it manipulates the ARP tables of end hosts. Managed switches with DAI can detect and block this technique.

How do I use Ettercap filters to modify HTTP traffic?

Create a filter script using etterfilter syntax: define filter to modify HTTP headers or inject content. Compile with etterfilter filter.ecf -o filter.ef, then load with Ettercap's -F flag. Common filter use cases include injecting JavaScript for XSS testing, modifying User-Agent strings, and injecting HTML into HTTP responses for phishing demonstrations.

Can Ettercap capture credentials from HTTPS connections?

Ettercap cannot directly decrypt HTTPS traffic without SSLstrip or a compromised CA certificate. Use sslstrip plugin to downgrade HTTPS to HTTP via SSL stripping. For modern HSTS-protected sites, this technique often fails. Combine Ettercap's ARP poisoning with bettercap's sslstrip2 for improved HTTPS interception, or use mitmproxy for comprehensive TLS interception.

How do I use Ettercap for network reconnaissance?

Start Ettercap in unified sniffing mode: ettercap -T -q -M arp:remote // // to discover all hosts on the network. Ettercap automatically identifies gateway addresses, active hosts, and running services. Use the hosts list (Shift+H) to view discovered targets. Combine with nmap for deeper service enumeration on discovered hosts before launching targeted MITM attacks.

What is the difference between Ettercap ARP poisoning and ICMP redirect?

ARP poisoning corrupts ARP caches to redirect Layer 2 traffic through your machine, working on any IP-based network. ICMP redirect is a Layer 3 technique that sends ICMP Type 5 messages telling hosts to use your machine as a router. ARP poisoning is more reliable and commonly used; ICMP redirect requires specific network configurations and is easily filtered by firewalls.

How do I use Ettercap in GUI mode for visual attacks?

Launch Ettercap's GTK interface: ettercap -G. The GUI provides visual host mapping, real-time packet visualization, and click-to-poison target selection. Select targets from the host list, choose the ARP poisoning method, and monitor intercepted traffic in the connections view. The GUI is ideal for training and demonstrations where visual feedback helps explain MITM concepts.

Tags

#sniffing-spoofing

Output Explanation

The tool presents intercepted data, notably highlighting compromised credentials from legacy protocols. It provides status updates confirming the successful redirection of network paths.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.