Ultimate Ettercap Cheat Sheet
Ultimate Ettercap Cheat Sheet
A comprehensive suite for man-in-the-middle attacks, sniffing, and ARP poisoning.
1. Interface Modes
Ettercap can run in Text, Curses (GUI-like text), or GTK (Graphical) mode. All require root privileges.
Text Mode (-T)
Command line only. Best for scripts.
Curses Mode (-C)
Ncurses interface. Best for SSH sessions.
GTK Mode (-G)
Full Graphical User Interface.
2. Sniffing Modes
Define how Ettercap listens on the network.
Unified Sniffing (-M)
The standard Man-in-the-Middle mode. All traffic passes through your machine.
Bridged Sniffing (-B)
Use two interfaces to act as a physical bridge (transparent to the network).
3. Target Specification
Ettercap uses a specific syntax: /Target1/ /Target2/.
Target 1 is usually the victim, Target 2 is usually the Gateway (Router).
Target Syntax
Example: /192.168.1.10// targets a specific IP on all ports.
Specific Victim & Router
Poison the connection between Victim (1.10) and Router (1.1).
Global Attack (Dangerous)
Target everyone on the subnet (// //). This can crash the network.
4. MITM Attacks
The core functionality of Ettercap.
ARP Poisoning
Redirects traffic by spoofing ARP replies. remote sniffs remote connections.
DNS Spoofing
Redirects DNS requests (e.g., facebook.com -> malicious IP). Requires editing /etc/ettercap/etter.dns.
1. Edit the file:
# /etc/ettercap/etter.dns facebook.com A 192.168.1.5 *.google.com A 192.168.1.5
2. Run the attack (plugin):
DHCP Spoofing
Act as a rogue DHCP server.
5. Filters & Plugins
Using Plugins (-P)
Ettercap has built-in plugins for various tasks.
dns_spoof: Redirect DNS.repoison_arp: Force re-poisoning if the victim recovers.sslstrip: Downgrade HTTPS to HTTP.
Etterfilters (Advanced)
Scripts that modify traffic on the fly (e.g., replace images, change text). Steps:
1. Write filter (filter.ef):
if (ip.proto == TCP && tcp.src == 80) {
replace("img src=", "img src=\"http://hack.com/evil.jpg\" ");
msg("Image replaced.\n");
}
2. Compile filter:
3. Load filter (-F):
6. Logging & Visuals
Write to PCAP (-w)
Save traffic for Wireshark analysis.
Log User Info (-L)
Log only usernames and passwords discovered.
Quiet Mode (-q)
Don't print packet content, only print found credentials.

Post a Comment