1ETTERCAP(8)                 System Manager's Manual                ETTERCAP(8)
2
3
4

NAME

6       ettercap  -  multipurpose  sniffer/content filter for man in the middle
7       attacks
8
9

***** IMPORTANT NOTE ******

11       Since ettercap NG (formerly 0.7.0), all the options have been  changed.
12       Even  the  target specification has been changed. Please read carefully
13       this man page.
14
15

SYNOPSIS

17       ettercap [OPTIONS] [TARGET1] [TARGET2]
18
19       If IPv6 is enabled:
20       TARGET is in the form MAC/IPs/IPv6/PORTs
21       Otherwise,
22       TARGET is in the form MAC/IPs/PORTs
23       where IPs and PORTs can be ranges (e.g. /192.168.0.1-30,40,50/20,22,25)
24

DESCRIPTION

26       Ettercap was born as a sniffer for switched  LAN  (and  obviously  even
27       "hubbed"  ones),  but during the development process it has gained more
28       and more features that have changed it to a powerful and flexible  tool
29       for  man-in-the-middle attacks.  It supports active and passive dissec‐
30       tion of many protocols (even ciphered ones) and includes many  features
31       for network and host analysis (such as OS fingerprint).
32
33       It has two main sniffing options:
34
35       UNIFIED, this method sniffs all the packets that pass on the cable. You
36       can choose to put or not the interface in promisc mode (-p option). The
37       packet  not  directed  to  the  host running ettercap will be forwarded
38       automatically using layer 3 routing. So  you  can  use  a  mitm  attack
39       launched  from a different tool and let ettercap modify the packets and
40       forward them for you.
41       The kernel ip_forwarding is always disabled by ettercap. This  is  done
42       to  prevent a forward of a packet twice (one by ettercap and one by the
43       kernel).  This is an invasive behaviour on gateways.  So  we  recommend
44       you  to  use  ettercap  on  the gateways ONLY with the UNOFFENSIVE MODE
45       ENABLED. Since ettercap listens only on one network interface,  launch‐
46       ing  it  on  the gateway in offensive mode will not allow packets to be
47       rerouted back from the second interface.
48
49       BRIDGED, it uses two network interfaces and forward  the  traffic  from
50       one  to the other while performing sniffing and content filtering. This
51       sniffing method is totally stealthy since there is no way to find  that
52       someone  is in the middle on the cable.  You can look at this method as
53       a mitm attack at layer 1. You will  be  in  the  middle  of  the  cable
54       between  two  entities.  Don't  use it on gateways or it will transform
55       your gateway into a bridge. HINT: you can  use  the  content  filtering
56       engine  to  drop  packets  that should not pass. This way ettercap will
57       work as an inline IPS ;)
58
59       You can also perform man in the middle attacks while using the  unified
60       sniffing.  You  can  choose  the  mitm attack that you prefer. The mitm
61       attack module is independent from the sniffing and  filtering  process,
62       so you can launch several attacks at the same time or use your own tool
63       for the attack. The crucial point is that the packets have to arrive to
64       ettercap  with the correct mac address and a different ip address (only
65       these packets will be forwarded).
66
67       The most relevant ettercap features are:
68
69       SSH1 support : you can sniff User and Pass, and even  the  data  of  an
70       SSH1 connection. ettercap is the first software capable to sniff an SSH
71       connection in FULL-DUPLEX
72
73       SSL support : you can sniff SSL secured data... a fake  certificate  is
74       presented to the client and the session is decrypted.
75
76       Characters  injection  in  an  established  connection : you can inject
77       characters to the server (emulating commands) or to the client (emulat‐
78       ing replies) maintaining the connection alive !!
79
80       Packet filtering/dropping: You can set up a filter script that searches
81       for a particular string (even hex)  in  the  TCP  or  UDP  payload  and
82       replace  it  with yours or drop the entire packet. The filtering engine
83       can match any field of the network protocols and  modify  whatever  you
84       want (see etterfilter(8)).
85
86       Remote  traffic  sniffing  through  tunnels and route mangling: You can
87       play with linux cooked interfaces or use the integrated plugin to sniff
88       tunneled  or  route-mangled remote connections and perform mitm attacks
89       on them.
90
91       Plug-ins support : You can create your own plugin using the  ettercap's
92       API.
93
94       Password  collector  for  :  TELNET,  FTP, POP, RLOGIN, SSH1, ICQ, SMB,
95       MySQL, HTTP, NNTP, X11, NAPSTER, IRC, RIP, BGP, SOCKS 5, IMAP  4,  VNC,
96       LDAP,  NFS, SNMP, HALF LIFE, QUAKE 3, MSN, YMSG (other protocols coming
97       soon...)
98
99       Passive OS fingerprint: you scan passively the lan (without sending any
100       packet)  and gather detailed info about the hosts in the LAN: Operating
101       System, running services, open  ports,  IP,  mac  address  and  network
102       adapter vendor.
103
104       Kill  a connection: from the connections list you can kill all the con‐
105       nections you want
106
107
108

TARGET SPECIFICATION

110       There is no concept of SOURCE nor DEST. The two targets are intended to
111       filter  traffic  coming from one to the other and vice-versa (since the
112       connection is bidirectional).
113
114       TARGET is in the form MAC/IPs/PORTs.
115       NOTE: If IPv6 is enabled, TARGET is in the form MAC/IPs/IPv6/PORTs.
116
117       If you want you can omit any of its parts and this  will  represent  an
118       ANY in that part.
119       e.g.
120       "//80" means ANY mac address, ANY ip and ONLY port 80
121       "/10.0.0.1/" means ANY mac address, ONLY ip 10.0.0.1 and ANY port
122
123       MAC must be unique and in the form 00:11:22:33:44:55
124
125       IPs is a range of IP in dotted notation. You can specify range with the
126       - (hyphen) and single ip with , (comma). You can also use ; (semicolon)
127       to indicate different ip addresses.
128       e.g.
129       "10.0.0.1-5;10.0.1.33"  expands  into  ip  10.0.0.1,  2,  3,  4,  5 and
130       10.0.1.33
131
132       PORTs is a range of PORTS. You can specify range with  the  -  (hyphen)
133       and single port with , (comma).
134       e.g.
135       "20-25,80,110" expands into ports 20, 21, 22, 23, 24, 25, 80 and 110
136
137       NOTE:
138       you  can  reverse the matching of the TARGET by adding the -R option to
139       the command line. So if you want to sniff ALL the traffic BUT  the  one
140       coming or going to 10.0.0.1 you can specify "./ettercap -R /10.0.0.1/"
141
142       NOTE:
143       TARGETs  are  also  responsible of the initial scan of the lan. You can
144       use them to restrict the scan to only a subset of the hosts in the net‐
145       mask.  The  result  of  the  merging  between  the  two targets will be
146       scanned. remember that not specifying a target means "no  target",  but
147       specifying "//" means "all the hosts in the subnet".
148

PRIVILEGES DROPPING

150       ettercap  needs  root  privileges to open the Link Layer sockets. After
151       the initialization phase, the root privs are  not  needed  anymore,  so
152       ettercap  drops  them  to  UID  = 65535 (nobody). Since ettercap has to
153       write (create) log files, it must be executed in a directory  with  the
154       right  permissions (e.g. /tmp/). If you want to drop privs to a differ‐
155       ent uid, you can export the environment variable EC_UID with the  value
156       of  the  uid you want to drop the privs to (e.g.  export EC_UID=500) or
157       set the correct parameter in the etter.conf file.
158
159
160

SSL MITM ATTACK

162       While performing the SSL mitm attack, ettercap substitutes the real ssl
163       certificate  with  its  own. The fake certificate is created on the fly
164       and all the fields are filled according to the real cert  presented  by
165       the server. Only the issuer is modified and signed with the private key
166       contained in the 'etter.ssl.crt' file. If you want to use  a  different
167       private  key  you  have to regenerate this file. To regenerate the cert
168       file use the following commands:
169
170       openssl genrsa -out etter.ssl.crt 1024
171       openssl req -new -key etter.ssl.crt -out tmp.csr
172       openssl x509 -req -days 1825 -in tmp.csr  -signkey  etter.ssl.crt  -out
173       tmp.new
174       cat tmp.new >> etter.ssl.crt
175       rm -f tmp.new tmp.csr
176
177       NOTE: SSL mitm is not available (for now) in bridged mode.
178
179       NOTE:  You  can use the --certificate/--private-key long options if you
180       want to specify a different file rather than the etter.ssl.crt file.
181
182
183

OPTIONS

185       Options that make sense together can generally  be  combined.  ettercap
186       will warn the user about unsupported option combinations.
187
188       SNIFFING AND ATTACK OPTIONS
189
190       ettercap  NG  has  a  new  unified  sniffing  method. This implies that
191       ip_forwarding in the kernel is always disabled and  the  forwarding  is
192       done  by  ettercap.  Every packet with destination mac address equal to
193       the host's mac address and destination ip address different for the one
194       bound  to  the  iface  will be forwarded by ettercap. Before forwarding
195       them, ettercap can content filter, sniff, log or drop them. It does not
196       matter  how these packets are hijacked, ettercap will process them. You
197       can even use external programs to hijack packet.
198       You have full control of what ettercap should receive. You can use  the
199       internal  mitm  attacks, set the interface in promisc mode, use plugins
200       or use every method you want.
201
202       IMPORTANT NOTE: if you run ettercap on a gateway, remember to re-enable
203       the  ip_forwarding after you have killed ettercap. Since ettercap drops
204       its privileges, it cannot restore the ip_forwarding for you.
205
206       -M, --mitm <METHOD:ARGS>
207              MITM attack
208              This option will activate the man in the middle attack. The mimt
209              attack  is totally independent from the sniffing. The aim of the
210              attack is to hijack packets and redirect them to  ettercap.  The
211              sniffing engine will forward them if necessary.
212              You  can choose the mitm attack that you prefer and also combine
213              some of them to perform different attacks at the same time.
214              If a mitm method requires some parameters you can  specify  them
215              after the colon.  (e.g.  -M dhcp:ip_pool,netmask,etc )
216
217              The following mitm attacks are available:
218
219              arp ([remote],[oneway])
220                     This method implements the ARP poisoning mitm attack. ARP
221                     requests/replies are sent to the victims to poison  their
222                     ARP  cache.  Once the cache has been poisoned the victims
223                     will send all packets to the attacker which, in turn, can
224                     modify and forward them to the real destination.
225
226                     In  silent  mode  (-z  option)  only  the first target is
227                     selected, if you want to poison multiple target in silent
228                     mode use the -j option to load a list from a file.
229
230                     You can select empty targets and they will be expanded as
231                     'ANY' (all the hosts in the  LAN).  The  target  list  is
232                     joined  with the hosts list (created by the arp scan) and
233                     the result is  used  to  determine  the  victims  of  the
234                     attack.
235
236                     The  parameter "remote" is optional and you have to spec‐
237                     ify it if you want to sniff remote ip address poisoning a
238                     gateway. Indeed if you specify a victim and the gw in the
239                     TARGETS, ettercap  will  sniff  only  connection  between
240                     them,  but  to  enable ettercap to sniff connections that
241                     pass thru the gw, you have to use this parameter.
242
243                     The parameter "oneway" will force ettercap to poison only
244                     from  TARGET1  to  TARGET2.  Useful if you want to poison
245                     only the client and not the router (where an arp  watcher
246                     can be in place).
247
248                     Example:
249
250                     the targets are: /10.0.0.1-5/ /10.0.0.15-20/
251                     and   the  host  list  is:  10.0.0.1  10.0.0.3  10.0.0.16
252                     10.0.0.18
253
254                     the associations between the victims will be:
255                     1 and 16, 1 and 18, 3 and 16, 3 and 18
256
257                     if the targets overlap each other, the  association  with
258                     identical ip address will be skipped.
259
260                     NOTE:  if  you manage to poison a client, you have to set
261                     correct routing table in the kernel specifying the GW. If
262                     your  routing  table  is  incorrect, the poisoned clients
263                     will not be able to navigate the Internet.
264
265
266
267              icmp (MAC/IP)
268                     This attack  implements  ICMP  redirection.  It  sends  a
269                     spoofed  icmp  redirect  message  to the hosts in the lan
270                     pretending to be a better route for internet. All connec‐
271                     tions  to  internet  will  be  redirected to the attacker
272                     which, in turn, will forward them to  the  real  gateway.
273                     The  resulting  attack  is  a  HALF-DUPLEX mitm. Only the
274                     client is redirected, since the gateway will  not  accept
275                     redirect  messages  for  a directly connected network. BE
276                     SURE TO NOT USE FILTERS THAT MODIFY THE  PAYLOAD  LENGTH.
277                     you  can  use  a filter to modify packets, but the length
278                     must be the  same  since  the  tcp  sequences  cannot  be
279                     updated in both ways.
280                     You  have  to pass as argument the MAC and the IP address
281                     of the real gateway for the lan.
282                     Obviously you have to be able to sniff all  the  traffic.
283                     If  you  are on a switch you have to use a different mitm
284                     attack such as arp poisoning.
285
286                     NOTE: to restrict the  redirection  to  a  given  target,
287                     specify it as a TARGET
288
289                     Example:
290
291                     -M icmp:00:11:22:33:44:55/10.0.0.1
292
293                     will  redirect  all  the  connections that pass thru that
294                     gateway.
295
296
297
298              dhcp (ip_pool/netmask/dns)
299                     This attack implements DHCP spoofing. It pretends to be a
300                     DHCP  server and tries to win the race condition with the
301                     real one to force the client  to  accept  the  attacker's
302                     reply.  This  way  ettercap  is able to manipulate the GW
303                     parameter and hijack all the outgoing  traffic  generated
304                     by the clients.
305                     The resulting attack is a HALF-DUPLEX mitm. So be sure to
306                     use appropriate filters (see above in the ICMP section).
307
308                     You have to pass the ip pool to be used, the netmask  and
309                     the  ip  of  the dns server.  Since ettercap tries to win
310                     the race with the real server, it DOES NOT CHECK  if  the
311                     ip is already assigned. You have to specify an ip pool of
312                     FREE addresses to be used. The ip pool has the same  form
313                     of the target specification.
314
315                     If  the  client  sends  a  dhcp request (suggesting an ip
316                     address) ettercap will ack on that ip and modify only the
317                     gw option. If the client makes a dhcp discovery, ettercap
318                     will use the first unused ip address of the list you have
319                     specified on command line. Every discovery consumes an ip
320                     address. When the list is over, ettercap  stops  offering
321                     new ip addresses and will reply only to dhcp requests.
322                     If  you  don't  want  to  offer  any ip address, but only
323                     change the router information of  dhcp  request/ack,  you
324                     can specify an empty ip_pool.
325
326                     BIG WARNING: if you specify a list of ip that are in use,
327                     you will mess your network! In general, use  this  attack
328                     carefully.  It  can really mess things up!  When you stop
329                     the attack, all the victims will be still convinced  that
330                     ettercap is the gateway until the lease expires...
331
332                     Example:
333
334                     -M dhcp:192.168.0.30,35,50-60/255.255.255.0/192.168.0.1
335                     reply to DHCP offer and request.
336
337                     -M dhcp:/255.255.255.0/192.168.0.1
338                     reply only to DHCP request.
339
340
341              port ([remote],[tree])
342                     This  attack  implements Port Stealing. This technique is
343                     useful to sniff in a switched environment when  ARP  poi‐
344                     soning  is not effective (for example where static mapped
345                     ARPs are used).
346
347                     It floods the LAN (based on  port_steal_delay  option  in
348                     etter.conf)  with  ARP  packets. If you don't specify the
349                     "tree"  option,  the  destination  MAC  address  of  each
350                     "stealing"  packet  is  the  same  as  the attacker's one
351                     (other NICs won't see  these  packets),  the  source  MAC
352                     address  will  be  one of the MACs in the host list. This
353                     process "steals" the switch port of each victim  host  in
354                     the  host  list.   Using  low delays, packets destined to
355                     "stolen" MAC addresses will be received by the  attacker,
356                     winning  the  race  condition  with  the real port owner.
357                     When the attacker receives packets for "stolen" hosts, it
358                     stops  the  flooding  process and performs an ARP request
359                     for the real destination of the packet.  When it receives
360                     the  ARP reply it's sure that the victim has "taken back"
361                     his port, so ettercap can re-send the packet to the  des‐
362                     tination as is.  Now we can re-start the flooding process
363                     waiting for new packets.
364
365                     If you use the "tree" option, the destination MAC address
366                     of  each  stealing  packet  will be a bogus one, so these
367                     packets will be propagated to other  switches  (not  only
368                     the directly connected one). This way you will be able to
369                     steal ports on other switches in the tree (if  any),  but
370                     you  will generate a huge amount of traffic (according to
371                     port_steal_delay).  The  "remote"  option  has  the  same
372                     meaning as in "arp" mitm method.
373
374                     When  you  stop  the  attack,  ettercap  will send an ARP
375                     request to each stolen  host  giving  back  their  switch
376                     ports.
377                     You can perform either HALF or FULL DUPLEX mitm according
378                     to target selection.
379
380                     NOTE: Use this mitm method only on ethernet switches. Use
381                     it  carefully, it could produce performances loss or gen‐
382                     eral havoc.
383
384                     NOTE: You can NOT use this method in only-mitm  mode  (-o
385                     flag),  because  it  hooks  the  sniffing engine, and you
386                     can't use interactive data injection.
387
388                     NOTE: It could be dangerous to use it in conjunction with
389                     other mitm methods.
390
391                     NOTE:  This  mitm method doesn't work on Solaris and Win‐
392                     dows because of the lipcap and libnet design and the lack
393                     of  certain  ioctl().   (We  will  feature this method on
394                     these OSes if someone will request it...)
395
396                     Example:
397
398                     The targets are: /10.0.0.1/ /10.0.0.15/
399                     You will intercept and visualize traffic between 10.0.0.1
400                     and  10.0.0.15,  but you will receive all the traffic for
401                     10.0.0.1 and 10.0.0.15 too.
402
403                     The target is: /10.0.0.1/
404                     You will intercept and  visualize  all  the  traffic  for
405                     10.0.0.1.
406
407
408
409
410
411              ndp ([remote],[oneway])
412                     NOTE:  This MITM method is only supported if IPv6 support
413                     has been enabled.
414
415                     This method implements the NDP poisoning attack which  is
416                     used  for  MITM  of IPv6 connections. ND requests/replies
417                     are sent to the victims to poison their  neighbor  cache.
418                     Once  the  cache  has been poisoned the victims will send
419                     all IPv6 packets to the attacker which, in turn, can mod‐
420                     ify and forward them to the real destination.
421
422                     In  silent  mode  (-z  option)  only  the first target is
423                     selected, if you want to poison multiple target in silent
424                     mode use the -j option to load a list from a file.
425
426                     You can select empty targets and they will be expanded as
427                     'ANY' (all the hosts in the  LAN).  The  target  list  is
428                     joined  with the hosts list (created by the arp scan) and
429                     the result is  used  to  determine  the  victims  of  the
430                     attack.
431
432                     The  parameter "remote" is optional and you have to spec‐
433                     ify it if you want to sniff remote ip address poisoning a
434                     gateway. Indeed if you specify a victim and the gw in the
435                     TARGETS, ettercap  will  sniff  only  connection  between
436                     them,  but  to  enable ettercap to sniff connections that
437                     pass thru the gw, you have to use this parameter.
438
439                     The parameter "oneway" will force ettercap to poison only
440                     from  TARGET1  to  TARGET2.  Useful if you want to poison
441                     only the client and not the router (where an arp  watcher
442                     can be in place).
443
444                     Example:
445
446                     Targets         are:         //fe80::260d:afff:fe6e:f378/
447                     //2001:db8::2:1/
448                     Ranges of IPv6 addresses are not yet supported.
449
450                     NOTE: if you manage to poison a client, you have  to  set
451                     correct routing table in the kernel specifying the GW. If
452                     your routing table is  incorrect,  the  poisoned  clients
453                     will not be able to navigate the Internet.
454
455                     NOTE:  in  IPv6  usually  the  link-local  address of the
456                     router is being used as the gateway address. Therefor you
457                     need  to  set the link-local address of the router as one
458                     target and the global-unicast address of  the  victim  as
459                     the  other  in  order  to  set up a successfull IPv6 MITM
460                     attack using NDP poisoning.
461
462
463       -o, --only-mitm
464              This options disables the sniffing thread and enables  only  the
465              mitm attack.  Useful if you want to use ettercap to perform mitm
466              attacks and another sniffer (such as  wireshark)  to  sniff  the
467              traffic.  Keep  in  mind  that  the packets are not forwarded by
468              ettercap. The kernel will be  responsible  for  the  forwarding.
469              Remember to activate the "ip forwarding" feature in your kernel.
470
471
472       -f, --pcapfilter <FILTER>
473              Set  a  capturing  filter in the pcap library. The format is the
474              same as tcpdump(1). Remember that this kind of filter  will  not
475              sniff  packets out of the wire, so if you want to perform a mitm
476              attack, ettercap will not be able to forward hijacked packets.
477              These filters are useful to decrease  the  network  load  impact
478              into ettercap decoding module.
479
480
481       -B, --bridge <IFACE>
482              BRIDGED sniffing
483              You  need two network interfaces. ettercap will forward form one
484              to the other all the traffic it sees. It is useful  for  man  in
485              the  middle  at the physical layer. It is totally stealthy since
486              it is passive and there is  no  way  for  an  user  to  see  the
487              attacker.
488              You can content filter all the traffic as you were a transparent
489              proxy for the "cable".
490
491
492
493       OFF LINE SNIFFING
494
495       -r, --read <FILE>
496              OFF LINE sniffing
497              With this option enabled, ettercap will  sniff  packets  from  a
498              pcap compatible file instead of capturing from the wire.
499              This  is  useful if you have a file dumped from tcpdump or wire‐
500              shark and you want to make an analysis (search for passwords  or
501              passive fingerprint) on it.
502              Obviously  you  cannot  use  "active" sniffing (arp poisoning or
503              bridging) while sniffing from a file.
504
505       -w, --write <FILE>
506              WRITE packet to a pcap file
507              This is useful if you have to use "active" sniffing (arp poison)
508              on  a switched LAN but you want to analyze the packets with tcp‐
509              dump or wireshark. You can use this option to dump  the  packets
510              to a file and then load it into your favourite application.
511
512              NOTE: dump file collect ALL the packets disregarding the TARGET.
513              This is done because you may want to log even protocols not sup‐
514              ported by ettercap, so you can analyze them with other tools.
515
516              TIP:  you  can use the -w option in conjunction with the -r one.
517              This way you will be able to filter the payload  of  the  dumped
518              packets  or  decrypt WEP-encrypted WiFi traffic and dump them to
519              another file.
520
521
522
523       USER INTERFACES OPTIONS
524
525       -T, --text
526              The text only interface, only printf ;)
527              It is quite interactive, press 'h' in every moment to  get  help
528              on what you can do.
529
530
531       -q, --quiet
532              Quiet  mode. It can be used only in conjunction with the console
533              interface. It does not print packet content. It is useful if you
534              want to convert pcap file to ettercap log files.
535
536              example:
537
538              ettercap -Tq -L dumpfile -r pcapfile
539
540
541       -s, --script <COMMANDS>
542              With this option you can feed ettercap with command as they were
543              typed on the keyboard by the user. This way you can use ettercap
544              within  your  favourite  scripts. There is a special command you
545              can issue thru this command: s(x). this command will sleep for x
546              seconds.
547
548              example:
549
550              ettercap -T -s 'lq'  will print the list of the hosts and exit
551              ettercap  -T  -s 's(300)olqq'  will collect the infos for 5 min‐
552              utes, print the list of the local profiles and exit
553
554
555
556       -C, --curses
557              Ncurses based GUI. See ettercap_curses(8) for  a  full  descrip‐
558              tion.
559
560
561
562       -G, --gtk
563              The nice GTK2 interface (thanks Daten...).
564
565
566
567       -D, --daemonize
568              Daemonize  ettercap.  This  option will detach ettercap from the
569              current controlling terminal and set it as  a  daemon.  You  can
570              combine  this feature with the "log" option to log all the traf‐
571              fic in the background. If the daemon fails for  any  reason,  it
572              will  create  the  file "./ettercap_daemonized.log" in which the
573              error caught by ettercap will be reported. Furthermore,  if  you
574              want  to  have  a  complete debug of the daemon process, you are
575              encouraged to recompile ettercap in debug mode.
576
577
578
579
580       GENERAL OPTIONS
581
582       -b, --broadcast
583              Tells Ettercap to process packets coming from Broadcast address.
584
585
586       -i, --iface <IFACE>
587              Use this <IFACE> instead of the default one. The  interface  can
588              be unconfigured (requires libnet >= 1.1.2), but in this case you
589              cannot use MITM attacks and you should set the unoffensive flag.
590
591
592       -I, --iflist
593              This option will print the list of all available network  inter‐
594              faces  that  can be used within ettercap. The option is particu‐
595              larly useful under windows where the name of  the  interface  is
596              not so obvious as under *nix.
597
598
599       -Y, --secondary <interface list>
600              Specify  a  list  of (or single) secondary interfaces to capture
601              packets from.
602
603
604       -A, --address <ADDRESS>
605              Use this <ADDRESS> instead of the one autodetected for the  cur‐
606              rent  iface. This option is useful if you have an interface with
607              multiple ip addresses.
608
609
610       -n, --netmask <NETMASK>
611              Use this <NETMASK> instead of the one associated with  the  cur‐
612              rent  iface.  This  option is useful if you have the NIC with an
613              associated netmask of class B and you want to scan (with the arp
614              scan) only a class C.
615
616
617       -R, --reversed
618              Reverse  the matching in the TARGET selection. It means not(TAR‐
619              GET). All but the selected TARGET.
620
621
622       -t, --proto <PROTO>
623              Sniff only PROTO packets (default is TCP + UDP).
624              This is useful if you want to select a port via the TARGET spec‐
625              ification but you want to differentiate between tcp or udp.
626              PROTO can be "tcp", "udp" or "all" for both.
627
628
629       -6, --ip6scan
630              Send  ICMPv6  probes  to discover active IPv6 nodes on the link.
631              This options sends a ping request to the  all-nodes  address  to
632              motivate  active  IPv6 hosts to respond. You should not use this
633              option if you try to hide yourself.  Therefore  this  option  is
634              optional.
635
636              NOTE:  This  option  is  only available if IPv6 support has been
637              enabled.
638
639
640       -z, --silent
641              Do not perform the initial ARP scan of the LAN.
642
643              NOTE: you will not have the hosts list, so  you  can't  use  the
644              multipoison  feature.   you can only select two hosts for an ARP
645              poisoning attack, specifying them through the TARGETs
646
647
648       -p, --nopromisc
649              Usually, ettercap will put the  interface  in  promisc  mode  to
650              sniff  all  the  traffic  on the wire. If you want to sniff only
651              your connections, use this flag to NOT enable the promisc mode.
652
653
654       -S, --nosslmitm
655              Usually, ettercap forges SSL certificates in order to  intercept
656              https traffic.  This option disables that behavior.
657
658
659       -u, --unoffensive
660              Every  time  ettercap  starts,  it disables ip forwarding in the
661              kernel and begins to forward packets itself. This option prevent
662              to  do  that,  so the responsibility of ip forwarding is left to
663              the kernel.
664              This options is useful if you  want  to  run  multiple  ettercap
665              instances.  You  will  have one instance (the one without the -u
666              option) forwarding the packets,  and  all  the  other  instances
667              doing their work without forwarding them. Otherwise you will get
668              packet duplicates.
669              It also disables the internal creation of the sessions for  each
670              connection.  It increases performances, but you will not be able
671              to modify packets on the fly.
672              If you want to use a mitm attack you  have  to  use  a  separate
673              instance.
674              You  have  to  use  this option if the interface is unconfigured
675              (without an ip address.)
676              This is also useful if you want to run ettercap on the  gateway.
677              It  will  not  disable  the forwarding and the gateway will cor‐
678              rectly route the packets.
679
680
681       -j, --load-hosts <FILENAME>
682              It can be used to load a hosts list from a file created  by  the
683              -k option. (see below)
684
685
686       -k, --save-hosts <FILENAME>
687              Saves  the hosts list to a file. Useful when you have many hosts
688              and you don't want to do an ARP storm at startup  any  time  you
689              use  ettercap.  Simply  use  this options and dump the list to a
690              file, then to load the information from it use the -j <filename>
691              option.
692
693
694       -P, --plugin <PLUGIN>
695              Run the selected PLUGIN. Many plugins need target specification,
696              use TARGET as always. Use multiple occurances of this  parameter
697              to select multiple plugins.
698              In console mode (-C option), standalone plugins are executed and
699              then the application exits. Hook plugins are activated  and  the
700              normal sniffing is performed.
701              To  have  a  list  of  the available external plugins use "list"
702              (without quotes) as plugin name (e.g. ./ettercap -P list).
703
704              NOTE: you can also activate plugins directly from the interfaces
705              (always press "h" to get the inline help)
706
707              More detailed info about plugins and about how to write your own
708              are found in the man page ettercap_plugin(8)
709
710
711       -F, --filter <FILE>
712              Load the filter from the file <FILE>. The filter  must  be  com‐
713              piled  with  etterfilter(8). The utility will compile the filter
714              script and produce an  ettercap-compliant  binary  filter  file.
715              Read  the  etterfilter(8) man page for the list of functions you
716              can use inside a filter script.  Any number of  filters  can  be
717              loaded  by  specifying  the  option  multiple times; packets are
718              passed through each filter in the order specified on the command
719              line.  You can also load a script without enabling it by append‐
720              ing :0 to the filename.
721              NOTE: these filters are different from those set with --pcapfil‐
722              ter.  An  ettercap filter is a content filter and can modify the
723              payload of a packet before forwarding it. Pcap filter  are  used
724              to capture only certain packets.
725              NOTE: you can use filters on pcapfile to modify them and save to
726              another file, but in this case you have to pay attention on what
727              you  are  doing,  since ettercap will not recalculate checksums,
728              nor split packets exceeding the mtu (snaplen) nor anything  like
729              that.
730
731
732       -W, --wifi-key <KEY>
733              You can specify a key to decrypt WiFi packets (WEP or WPA). Only
734              the  packets  decrypted  successfully  will  be  passed  to  the
735              decoders stack, the others will be skipped with a message.
736              The  parameter  has  the  following  syntax: type:bits:t:string.
737              Where 'type' can be: wep, wpa-pws or wpa-psk, 'bits' is the  bit
738              length  of  the  key  (64,  128  or 256), 't' is the type of the
739              string ('s' for string and 'p' for passphrase). 'string' can  be
740              a string or an escaped hex sequences.
741
742              example:
743              --wifi-key wep:128:p:secret
744              --wifi-key wep:128:s:ettercapwep0
745              --wifi-key 'wep:64:s:\x01\x02\x03\x04\x05'
746              --wifi-key wpa:pwd:ettercapwpa:ssid
747              --wifi-key wpa:psk:
748              663eb260e87cf389c6bd7331b28d82f5203b0cae4e315f9cbb7602f3236708a6
749
750
751
752       -a, --config <CONFIG>
753              Loads  an  alternative  config  file  instead  of the default in
754              /etc/etter.conf.  This is useful if you have many  preconfigured
755              files for different situations.
756
757       --certificate <FILE>
758              Tells Ettercap to use the specified certificate file for the SSL
759              MiTM attack.
760
761
762       --private-key <FILE>
763              Tells Ettercap to use the specified private key file for the SSL
764              MiTM attack.
765
766
767
768       VISUALIZATION OPTIONS
769
770
771       -e, --regex <REGEX>
772              Handle only packets that match the regex.
773              This option is useful in conjunction with -L. It logs only pack‐
774              ets that match the posix regex REGEX.
775              It impacts even the visualization of the sniffed packets. If  it
776              is set only packets matching the regex will be displayed.
777
778
779       -V, --visual <FORMAT>
780              Use  this option to set the visualization method for the packets
781              to be displayed.
782
783              FORMAT may be one of the following:
784
785
786
787              hex    Print the packets in hex format.
788
789                     example:
790
791                     the string  "HTTP/1.1 304 Not Modified"  becomes:
792
793                     0000: 4854 5450 2f31 2e31 2033 3034 204e  6f74   HTTP/1.1
794                     304 Not
795                     0010: 204d 6f64 6966 6965 64                    Modified
796
797
798              ascii  Print  only  "printable"  characters, the others are dis‐
799                     played as dots '.'
800
801
802              text   Print only the "printable" characters and skip  the  oth‐
803                     ers.
804
805
806              ebcdic Convert an EBCDIC text to ASCII.
807
808
809              html   Strip  all  the  html  tags from the text. A tag is every
810                     string between < and >.
811
812                     example:
813
814                     <title>This  is  the  title</title>,  but  the  following
815                     <string> will not be displayed.
816
817                     This  is  the  title,  but the following will not be dis‐
818                     played.
819
820
821              utf8   Print the packets in  UTF-8  format.  The  encoding  used
822                     while  performing  the  conversion  is  declared  in  the
823                     etter.conf(5) file.
824
825
826
827
828       -d, --dns
829              Resolve ip addresses into hostnames.
830
831              NOTE: this may seriously slow down ettercap while  logging  pas‐
832              sive  information.   Every  time a new host is found, a query to
833              the dns  is  performed.  Ettercap  keeps  a  cache  for  already
834              resolved  host  to  increase the speed, but new hosts need a new
835              query and the dns may take up to 2 or 3 seconds to  respond  for
836              an unknown host.
837
838              HINT: ettercap collects the dns replies it sniffs in the resolu‐
839              tion table, so even if you specify to not resolve the hostnames,
840              some  of  them will be resolved because the reply was previously
841              sniffed. think about it as a passive dns resolution for  free...
842              ;)
843
844
845       -E, --ext-headers
846              Print  extended  headers  for  every displayed packet. (e.g. mac
847              addresses)
848
849
850       -Q, --superquiet
851              Super quiet mode. Do not print users and passwords as  they  are
852              collected.  Only store them in the profiles. It can be useful to
853              run ettercap in text only mode but you don't want to be  flooded
854              with  dissectors messages. Useful when using plugins because the
855              sniffing process is always active, it will print  all  the  col‐
856              lected infos, with this option you can suppress these messages.
857              NOTE: this options automatically sets the -q option.
858
859              example:
860
861              ettercap -TzQP finger /192.168.0.1/22
862
863
864
865
866
867       LOGGING OPTIONS
868
869       -L, --log <LOGFILE>
870              Log  all  the packets to binary files. These files can be parsed
871              by etterlog(8) to extract human readable data. With this option,
872              all  packets  sniffed  by ettercap will be logged, together with
873              all the passive info (host info + user & pass) it  can  collect.
874              Given  a LOGFILE, ettercap will create LOGFILE.ecp (for packets)
875              and LOGFILE.eci (for the infos).
876
877              NOTE: if you specify this option on command line you don't  have
878              to  take  care of privileges since the log file is opened in the
879              startup phase (with high privs).  But  if  you  enable  the  log
880              option  while  ettercap  is already started, you have to be in a
881              directory where uid = 65535 or uid = EC_UID can write.
882
883              NOTE: the logfiles can be compressed with the deflate  algorithm
884              using the -c option.
885
886
887       -l, --log-info <LOGFILE>
888              Very  similar to -L but it logs only passive information + users
889              and passwords for each host. The file will be named LOGFILE.eci
890
891
892       -m, --log-msg <LOGFILE>
893              It stores in <LOGFILE> all the user messages printed  by  etter‐
894              cap.  This  can  be useful when you are using ettercap in daemon
895              mode or if you want to track down all the messages. Indeed, some
896              dissectors  print  messages  but their information is not stored
897              anywhere, so this is the only way to keep track of them.
898
899
900       -c, --compress
901              Compress the logfile with the gzip algorithm while it is dumped.
902              etterlog(8)  is  capable  of handling both compressed and uncom‐
903              pressed log files.
904
905
906       -o, --only-local
907              Stores profiles information belonging only to the LAN hosts.
908
909              NOTE: this option is effective only against  the  profiles  col‐
910              lected  in  memory.   While  logging to a file ALL the hosts are
911              logged. If you want to split them, use the  related  etterlog(8)
912              option.
913
914
915       -O, --only-remote
916              Stores profiles information belonging only to remote hosts.
917
918
919
920
921
922       STANDARD OPTIONS
923
924
925
926       -v, --version
927              Print the version and exit.
928
929
930       -h, --help
931              prints  the  help  screen  with a short summary of the available
932              options.
933
934
935
936
937

EXAMPLES

939       Here are some examples of using ettercap.
940
941       ettercap -Tp
942
943              Use the console interface  and  do  not  put  the  interface  in
944              promisc mode. You will see only your traffic.
945
946
947       ettercap -Tzq
948
949              Use the console interface, do not ARP scan the net and be quiet.
950              The packet content will not be displayed,  but  user  and  pass‐
951              words, as well as other messages, will be displayed.
952
953
954       ettercap -T -j /tmp/victims -M arp /10.0.0.1-7/ /10.0.0.10-20/
955
956              Will  load  the  hosts list from /tmp/victims and perform an ARP
957              poisoning attack against the two target. The list will be joined
958              with  the  target and the resulting list is used for ARP poison‐
959              ing.
960
961
962       ettercap -T -M arp // //
963
964              Perform the ARP poisoning attack against all the  hosts  in  the
965              LAN. BE CAREFUL !!
966
967
968       ettercap -T -M arp:remote /192.168.1.1/ /192.168.1.2-10/
969
970              Perform  the  ARP  poisoning against the gateway and the host in
971              the lan between 2 and 10. The 'remote' option is  needed  to  be
972              able  to  sniff  the  remote  traffic the hosts make through the
973              gateway.
974
975
976       ettercap -Tzq //110
977
978              Sniff only the pop3 protocol from every hosts.
979
980
981       ettercap -Tzq /10.0.0.1/21,22,23
982
983              Sniff telnet, ftp and ssh connections to 10.0.0.1.
984
985
986       ettercap -P list
987
988              Prints the list of all available plugins
989
990
991

FILES

993       ~/.config/ettercap_gtk
994
995              Stores persistent information (e.g., window  placement)  between
996              sessions.
997
998
999

ORIGINAL AUTHORS

1001       Alberto Ornaghi (ALoR) <alor@users.sf.net>
1002       Marco Valleri (NaGA) <naga@antifork.org>
1003

PROJECT STEWARDS

1005       Emilio Escobar (exfil)  <eescobar@gmail.com>
1006       Eric Milam (Brav0Hax)  <jbrav.hax@gmail.com>
1007

OFFICIAL DEVELOPERS

1009       Mike Ryan (justfalter)  <falter@gmail.com>
1010       Gianfranco Costamagna (LocutusOfBorg)  <costamagnagianfranco@yahoo.it>
1011       Antonio Collarino (sniper)  <anto.collarino@gmail.com>
1012       Ryan Linn   <sussuro@happypacket.net>
1013       Jacob Baines   <baines.jacob@gmail.com>
1014

CONTRIBUTORS

1016       Dhiru Kholia (kholia)  <dhiru@openwall.com>
1017       Alexander Koeppe (koeppea)  <format_c@online.de>
1018       Martin Bos (PureHate)  <purehate@backtrack.com>
1019       Enrique Sanchez
1020       Gisle Vanem  <giva@bgnett.no>
1021       Johannes Bauer  <JohannesBauer@gmx.de>
1022       Daten (Bryan Schneiders)  <daten@dnetc.org>
1023
1024
1025

SEE ALSO

1027       etter.conf(5) ettercap_curses(8) ettercap_plugins(8) etterlog(8) etter‐
1028       filter(8) ettercap-pkexec(8)
1029

AVAILABILITY

1031       https://github.com/Ettercap/ettercap/downloads
1032
1033

GIT

1035       git clone git://github.com/Ettercap/ettercap.git
1036       or
1037       git clone https://github.com/Ettercap/ettercap.git
1038
1039

BUGS

1041       Our software never has bugs.
1042       It just develops random features.   ;)
1043
1044       KNOWN-BUGS
1045
1046       - ettercap doesn't handle fragmented packets... only the first  segment
1047       will  be  displayed  by the sniffer. However all the fragments are cor‐
1048       rectly forwarded.
1049
1050       + please send bug-report, patches or suggestions to <ettercap-betatest‐
1051       ing@lists.sourceforge.net>  or visit https://github.com/Ettercap/etter
1052       cap/issues.
1053
1054       + to report a bug, follow the instructions in the README.BUGS file
1055
1056
1057

PHILOLOGICAL HISTORY

1059       "Even if blessed  with  a  feeble  intelligence,  they  are  cruel  and
1060       smart..."   this  is  the description of Ettercap, a monster of the RPG
1061       Advanced Dungeons & Dragon.
1062
1063       The name "ettercap" was chosen because it has an assonance with "ether‐
1064       cap"  which  means "ethernet capture" (what ettercap actually does) and
1065       also because such monsters have a powerful poison... and you know,  arp
1066       poisoning... ;)
1067
1068
1069

The Lord Of The (Token)Ring

1071       (the fellowship of the packet)
1072
1073       "One Ring to link them all, One Ring to ping them,
1074        one Ring to bring them all and in the darkness sniff them."
1075
1076
1077

Last words

1079       "Programming  today  is  a  race between software engineers striving to
1080       build bigger and better idiot-proof programs, and the  Universe  trying
1081       to  produce bigger and better idiots. So far, the Universe is winning."
1082       - Rich Cook
1083
1084
1085
1086ettercap 0.8.2                                                     ETTERCAP(8)
Impressum