home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 16 / hacker16 / 16_HACKER16.ISO / linux / tpm-security-server-1.2.1.iso / readme / ettercap-README < prev    next >
Encoding:
Text File  |  2004-01-27  |  38.0 KB  |  920 lines

  1. ============================================================================
  2.                                 ettercap 0.6.5                    2002-02-12
  3. ============================================================================
  4.  
  5.     Even if blessed with a feeble intelligence they are cruel and smart...
  6.  
  7.  
  8.        @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@
  9.        @@        @@@     @@@   @@      @@   @@ @@      @@   @@ @@   @@
  10.        @@@@@@    @@@     @@@   @@@@@@  @@@@@@  @@      @@@@@@@ @@@@@@
  11.        @@        @@@     @@@   @@      @@  @@  @@      @@   @@ @@
  12.        @@@@@@@   @@@     @@@   @@@@@@@ @@  @@@ @@@@@@@ @@   @@ @@
  13.  
  14.  
  15.                      Multi purpose sniffer/interceptor
  16.  
  17.  
  18.  
  19.          Required Libraries:              none ;)  (optionally ncurses)
  20.  
  21.          Optional Libraries:              openssl  (if you want ssh support)
  22.  
  23.          Installation:                    configure
  24.                                           make
  25.                                           make install
  26.  
  27.                          (optional)       make plug-ins
  28.                                           make plug-ins_install
  29.  
  30.       (if you are lazy, just run)         make complete_install
  31.  
  32. ============================================================================
  33.                                     INTRO
  34. ============================================================================
  35.  
  36. Kiddie:   A friend of mine told me that it is possible to sniff on a LAN...
  37.           so I bought a switch ;)
  38.  
  39. NaGoR:    mmhhh....
  40.  
  41. Kiddie:   Now my LAN is SECURE ! you can't sniff my packets... ah ah ah
  42.  
  43. NaGoR:    are you sure ? look at ettercap doing its work...
  44.  
  45. Kiddie:   Oh my god... it sniffs all my traffic !!
  46.           I will use only ciphered connections on my LAN, so ettercap can't
  47.           sniff them ! ah ah ah
  48.  
  49. NaGoR:    mmhhh....
  50.  
  51. Kiddie:   Now I'm using SSH.  My LAN is SECURE !
  52.  
  53. NaGoR:    are you sure ? look at ettercap doing its work...
  54.  
  55. Kiddie:   shit !!  grrrr...
  56.  
  57.  
  58.  "a false sense of security, is worse than insecurity"   -- Steve Gibson
  59.  
  60.  hey folks... wake up !  the net is NOT secure !!
  61.  
  62.  ettercap demonstrates that now is the time to encourage research on
  63.  internet protocols to make them more secure.
  64.  
  65.  
  66. ============================================================================
  67.                                    LICENSE
  68. ============================================================================
  69.  
  70.    GNU GENERAL PUBLIC LICENSE.
  71.  
  72.    see COPYING for details...
  73.  
  74.  
  75. ============================================================================
  76.                                    AUTHORS
  77. ============================================================================
  78.  
  79.    Alberto Ornaghi (ALoR) <alor@users.sourceforge.net>
  80.  
  81.    Marco Valleri (NaGA) <crwm@freemail.it>
  82.  
  83.  
  84. ============================================================================
  85.                               TABLE OF CONTENTS
  86. ============================================================================
  87.  
  88.  
  89.    1. DISCLAIMER............................................sez.  1
  90.  
  91.    2. INSTALLATION..........................................sez.  2
  92.  
  93.    3. HOW TO USE IT.........................................sez.  3
  94.  
  95.       3.1   ncurses interface
  96.       3.2   command line
  97.       3.3   working off-line
  98.  
  99.    4. TROUBLESHOOTING.......................................sez   4
  100.          common problems solved (READ THIS BEFORE MAIL US)
  101.  
  102.    5. TECHNICAL PAPER.......................................sez   5
  103.  
  104.       5.1   The host list
  105.       5.2   IP based sniffing
  106.       5.3   MAC based sniffing
  107.       5.4   ARP based sniffing
  108.          5.4.1    arp poisoning
  109.             5.4.1.1    public arp
  110.             5.4.1.2    smart public arp
  111.          5.4.2    characters injection
  112.          5.4.3    active protocol dissection
  113.          5.4.4    SSH1 man-in-the-middle
  114.          5.4.5    packet filtering
  115.       5.5   Passive scanning of the LAN
  116.          5.5.1   passive os fingerprint
  117.          5.5.2   open ports
  118.          5.5.3   gateways and routers
  119.  
  120.    6. PLUG-INS..............................................sez.  6
  121.  
  122.    7. USELESS INFORMATION...................................sez.  7
  123.  
  124.  
  125. ============================================================================
  126. 1>                               DISCLAIMER
  127. ============================================================================
  128.  
  129.  
  130.  This software is provided "as is" and without any expressed or implied
  131.  warranties, including, without limitation, the implied warranties of
  132.  merchantability and fitness for any particular purpose.
  133.  
  134.  
  135. ============================================================================
  136. 2>                              INSTALLATION
  137. ============================================================================
  138.  
  139.  The easiest way to compile ettercap is in the form:
  140.  
  141.     ./configure
  142.  
  143.     make
  144.  
  145.     make install
  146.  
  147.  Now you should be able to run ettercap (default location is
  148.  /usr/local/bin)
  149.  There are a lot of useful options in configure: try using --help.
  150.  
  151.  If you'd like to suid ettercap, thus enabling other users, and not only
  152.  root, to use the program, use --enable-suid before applying suid to
  153.  ettercap with chmod, otherwise it would drop the applied suid.
  154.  
  155.  If you have problems with plug-ins, disable them by using --disable-plugins
  156.  
  157.  If you have installed OpenSSL in a different DIR use --with-openssl=DIR
  158.  If you get an error linking OpenSSL with ettercap, try recompiling OpenSSL
  159.  with "Config shared && make && make install" (on my box it worked ;) )
  160.  
  161.  If you still have difficulties, send an e-mail message one of the authors
  162.  (alor@users.sourceforge.net or crwm@freemail.it).
  163.  The sourceforge ettercap homesite could also contain useful information,
  164.  latest bug fixes and updated versions (http://ettercap.sourceforge.net).
  165.  
  166.  Bug reports are welcome. Please report problems in the configure/make
  167.  process by including a copy of config.status, config.cache and config.log,
  168.  as well as the pertinent compiler diagnostics. If you have problems in the
  169.  program, please configure with --enable-debug and send also a copy of
  170.  ettercap_debug.log and a short description of your configuration
  171.  (eg. kernel and glibc version) when reporting a sigfault or other strange
  172.  behaviors.
  173.  
  174.  
  175. ============================================================================
  176. 3>                              HOW TO USE IT
  177. ============================================================================
  178.  
  179.  There are two main interfaces available, black and white text-mode and
  180.  a colored ncurses based character mode!
  181.  
  182. 3.1 NCURSES INTERFACE
  183.  
  184.  Let's start showing you the latter one:
  185.  If ettercap is invoked without options (see later on, for the command line
  186.  options) it will run the ncurses interface (a short delay to scan your LAN
  187.  may be noticed =).
  188.  The main window is divided in 3 subsections: top, middle and bottom.
  189.  In the top window there is the connection diagram, displaying the two
  190.  machines to sniff or to connect and operate to.
  191.  Below you will see the list of known hosts in the current LAN (with hub or
  192.  switch) that you can reach: select a couple to sniff them.
  193.  The two identical columns let you choose the said couple: select with the
  194.  arrow keys an entry representing an ip of an active machine ([enter] will
  195.  do this job =) on the left.
  196.  Then switch to the second column on the right with [tab], and move as usual
  197.  to select the second ip. This will represent the traffic route you would
  198.  like to sniff (and eventually connect/poison).
  199.  Obviously you cannot select the same source and destination, but you are in
  200.  any case forced to not select your IP.
  201.  In the bottom window, there is a sort of status bar, giving you additional
  202.  information about currently selected objects, current status and eventually
  203.  other important hints.
  204.  There are also a lot of other nifty options that are selectable at this
  205.  point, first of all the 'p' plug-in feature (these are separate features,
  206.  externally programmed in this project, covering a vast number of applications,
  207.  not displayable here: there is a special README-PLUGIN for this).
  208.  Or the ability to inspect with the 'c' key, if there is an other "evil"
  209.  program in your LAN running, and thus alerting you of possible data
  210.  interception.
  211.  But remember that throughout all the stages of the program YOU CAN ALWAYS
  212.  PRESS 'H' FOR HELP, and a nice help window will show up and list you the
  213.  currently available keys!
  214.  
  215.  These should be self-explanatory help windows, so there is
  216.  no need in reading this sections here, but.. in case.
  217.  You'll notice that the top window will update while selecting source and
  218.  destination ip, and finally show the current status scheme if you connect
  219.  or sniff (respectively pressing 'a' and 's' or 'm')
  220.  IP Based sniffing filters connections looking in the IP header for matching
  221.  IPs. This is the old style, classic method performed by most programs.
  222.  MAC Based sniffing filters connections looking in ETH header for matching
  223.  MACs. This is useful if you want to sniff connections from your local host
  224.  and a remote host through your gateway (simply selecting your host and your
  225.  gateway as source and destination).
  226.  Finally there is the connect option, as said, that lets you, if your
  227.  computer results connected to a switched LAN, poison the ARP cache
  228.  permitting you to sniff the traffic on your local net as if you where on
  229.  a network with an hub.
  230.  With this option you can specify one or two host. If you select only one
  231.  host you'll enter the PublicARP mode and you will overtake the selected IP
  232.  with yours.
  233.  If you specify both hosts you will enter the ARPBased Mode that allows you
  234.  to view all the bidirectional traffic between the two hosts.
  235.  
  236.  CONNECTIONS LIST:
  237.  
  238.  In any case, now you enter the second stage: the central window now
  239.  will list any active connections between the two sources IPs.
  240.  Eventually open connections will show up, and you can select them as usual,
  241.  allowing you to enter the third stage: the actual sniff! =)
  242.  In the meantime you can look at the status of the connections
  243.  (active, closed, etc) and see what type of traffic/port is used (ftp, ssh,
  244.  web, etc).
  245.  It is also possible to kill an active connection of any type.
  246.  If the application protocol is supported by ettercap you can see, in the
  247.  bottom window, some useful information about the highlighted connection,
  248.  such as USER and PASSWORD used for interactive sessions. (this information
  249.  can be dumped to a file simply hitting the 'l' key)
  250.  If you used ARPBased mode you can also start ACTIVE PROTOCOL DISSECTION,
  251.  that allows you to view particular ciphered protocols like ssh.
  252.  
  253.  PACKET FACTORY:
  254.  
  255.  with 'x' you can create your own packet from ethernet layer to application
  256.  level. By default the field of the packet factory form are filled with the
  257.  current highlighted connection properties. The same can be done in the host
  258.  list (the first interface) but now the field is not autocompleted if you
  259.  don't select a target host. All the field can be modified as you want and
  260.  for non supported protocol there is the possibility to build a raw header
  261.  made up of hex string.
  262.  example:  assume that we want to forge a RIP packet:
  263.       we fill the forms until UDP header (port 520) and in the payload we
  264.       write "\x01\x02\x00\x00\xFF\xFF\x00\x02here the pass"
  265.       we have built the RIP header by hex sequences...
  266.  
  267.  SNIFFING:
  268.  
  269.  Now assume you selected an active connection: two sub-windows appear in the
  270.  main one. They show source packets passing through your computer before
  271.  reaching the destination, you sniff traffic without them noticing it! There
  272.  are different visualization options here: the type of stream can be hex
  273.  ('x' key), ascii ('a' key) or text only ('t' key) that strips out all the
  274.  unreadable chars (useful with unicode protocols).
  275.  Some decoders needs the ACTIVE PROTOCOL DISSECTION to be ON.
  276.  You can also specify to suspend the stream of data (only prevents their
  277.  visualization, in reality they go forward in background) as a sort of
  278.  scroll-lock (press 's' key), for better data-analysis.
  279.  
  280.  Finally, there is also a very cool feature: INJECT.
  281.  
  282.  With the 'i' key you can also inject some chars in the traffic, choosing
  283.  the direction, being able to add commands to the stream (i.e. you could
  284.  sniff a telnet session and also being able to transmit some commands to the
  285.  machine connected to. Like "ls" or whatever you want, and they have
  286.  absolutely effect as if originated by the source! The same way you could
  287.  generate fake output on the originating machine, not responding to the real
  288.  output).
  289.  
  290.  NOTE: Injector supports escape sequences. you can perform multi-line
  291.        injection.
  292.  NOTE: remember to terminate your injection with \r\n if you want to inject
  293.        command to the server.
  294.  
  295.  Last, but not least, PACKET FILTERING:
  296.  
  297.  With the 'f' key a form is displayed asking you to set up a filter.
  298.  Pay attention on the active window, because source and dest filter are
  299.  different.
  300.  You can set up a filter that searchs for a particular string (even hex) in
  301.  the TCP or UDP payload and replace it with yours or drop the entire packet.
  302.  
  303.  Available commands while in the filtering form:
  304.  
  305.   F10 or ESC -- exit the form
  306.   ^N         -- go to next field          ^P    -- go to previous field
  307.   Home       -- go to first field         End   -- go to last field
  308.   ^L         -- go to field to left       ^R    -- go to field to right
  309.   ^U         -- move upward to field      ^D    -- move downward to field
  310.   ^W         -- go to next word           ^B    -- go to previous word
  311.   ^S         -- go to start of field      ^E    -- go to end of field
  312.   ^H         -- delete previous char      ^Y    -- delete line
  313.   ^G         -- delete current word       ^C    -- clear to end of line
  314.   ^K         -- clear to end of field     ^X    -- clear field
  315.   ^] or Ins  -- toggle insert mode
  316.  
  317.  For a detailed explanation for "how to filter a connection" see sect. 5.4.5
  318.  
  319.  LOGGING:
  320.  
  321.  There is also an option to log all these beautiful data streams to a file,
  322.  just press 'l', then read it down or pass it through to an automated script
  323.  filter with calm.
  324.  You can also set up a filter with the rule "Log" and only the packet
  325.  matching the criteria will be logged to the file.
  326.  
  327.  As you will notice, using the tool in visual mode will be simpler when
  328.  trying it on run than by reading these instructions.. help is also a good
  329.  resource to count on while operating (simply hit 'h').
  330.  
  331. 3.2 COMMAND LINE
  332.  
  333.  Well here there are two classic commands that will display help.
  334.  Launching ettercap with the --help switch and invoking our man page
  335.  (man ettercap ;).
  336.  
  337.  NOTE: Some features are available only from visual interface.
  338.        - Packet factory
  339.        - Injection
  340.  
  341.  Starting in non interactive mode (-N) there are also some features
  342.  available that are  bound to the interactive mode: you can activate
  343.  a little help line and change visualization mode on the fly
  344.  (between hex and ascii for example)
  345.  In the same way it is possible to set up a lot of options from the command
  346.  line and see them in interactive mode already set and started.
  347.  
  348.  Now there is also the possibility to shorten command usage, by specifying
  349.  one or more hosts to sniff (if you are in silent mode, also one or none is
  350.  possible by setting -z option: like sniffit that sniffs from everywhere =)
  351.  
  352.  Example:
  353.  
  354.   ettercap -Nsz  (sniff data from every ip)
  355.  
  356.   ettercap -NCsz  (collect only users and passwords from every ip)
  357.  
  358.   ettercap -NCsz ghibli meltemi (collect only from "ghibli" to "meltemi")
  359.  
  360.  NOTE: if you had started in interactive mode (without -N) it would have
  361.        been necessary to specify 'r' to refresh the ip host list if you
  362.        returned with 'q' to the first interface, since no list has been
  363.        generated at the beginning due to the -z option.
  364.        ex: ettercap -zs ghibli meltemi          or
  365.            ettercap -zm 00:A0:24:4C:00:F9 00:A0:24:36:00:C2
  366.  
  367.  Ok, that's all..
  368.  
  369.  
  370. 3.3  WORKING OFF-LINE
  371.  
  372.  If you want to analize a file saved with tcpdump or ethereal in the libpcap
  373.  format, you can use the Sprite plugin.
  374.  You can use it to recontruct the connections list, the password collecting
  375.  process or the Passive OS Fingerprint.
  376.  Simply you have to specify the file in the -T option and then use ettercap
  377.  as you were sniffing from the net.
  378.  
  379.  To save a tcpdump file for further analysis use the -Y option.
  380.  
  381. ============================================================================
  382. 4>                             TROUBLESHOOTING
  383. ============================================================================
  384.  
  385.  There are really a lot of things that could happen to you after installing
  386.  this proggy. Don't blame us in case of accidents or hours spent trying
  387.  to compile etc.. Until we reach a *very* stable version there
  388.  will be no troubleshooting section, which would be too large and infeasible
  389.  to write down and do the necessary spread out betatests.
  390.  But we'll do our best, try to compile on lots of machines, port it as much
  391.  as possible, and clean up everything. For now the main aspect was to write
  392.  down base ideas and see them work. When the main skeleton is completed
  393.  there will be a lot of fine tune.
  394.  
  395.  The best thing to do if you need support or help in compiling is to READ
  396.  THE FORUM ON ETTERCAP WEBSITE. Here you can find common solutions for many
  397.  problems.
  398.  
  399.  Then we will write down a sort of FAQ and a problem resolve list or todos
  400.  here in this section.
  401.  
  402. RPM VERSION:
  403.  
  404.  We'd like to know if you are experiencing any problems when
  405.  installing the rpm binary version of ettercap, including ncurses, which
  406.  can easily be miss-detected: simply try to add --nodeps to the rpm line.
  407.  
  408. COMPILING WITH OPENSSL:
  409.  
  410.  Ettercap needs the shared version of OpenSSL so if you experience a problem
  411.  linking ettercap try recompiling OpenSSL with:
  412.  
  413.  "config shared && make && make install"
  414.  
  415.  then edit the /etc/ld.so.conf and add the installed path.
  416.  then run "ldconfig"
  417.  
  418. START UP TOO SLOW:
  419.  
  420.  if the "Building host list for netmask 255.255.255.0, please wait..."
  421.  message is displayed for more than 5-10 seconds, probably your
  422.  gethostbyaddr() is too slow resolving domains, so try starting with -d
  423.  this option prevent the resolution of the IPs.
  424.  
  425.  
  426. ============================================================================
  427. 5>                             TECHNICAL PAPER
  428. ============================================================================
  429.  
  430.  
  431. 5.1   THE HOST LIST
  432.  
  433.  When ettercap starts it makes the list of the hosts that are on the lan.
  434.  Sending one ARP REQUEST for each ip in the lan (looking at the current ip
  435.  and netmask), it is possible to get the ARP REPLIES and than make the
  436.  list of the hosts that are responding on the lan. With this method even
  437.  windows hosts, reply to the call-for-reply (they don't reply on
  438.  broadcast-ping).
  439.  Be very careful if the netmask is a class B (255.255.0.0) because ettercap
  440.  will send 255*255 = 65025 arp requests, it takes more than a minute !! (the
  441.  default delay between two requests is 1 millisecond)
  442.  
  443.  
  444. 5.2   IP BASED SNIFFING
  445.  
  446.  This is the "old style" sniffing mode.
  447.  It puts the network interface in promisc mode and then sniffs all packets
  448.  matching the ip filter.
  449.  If you are using the ncurses interface, the ip filter is made up of: ip
  450.  source, port source, ip dest, port dest; in both the directions of the
  451.  connection.
  452.  Instead if using the command line, you can make a personalized ip filter.
  453.  You can specify only the source, only the dest or both. each with or
  454.  without an associated port.
  455.  
  456.    Examples:
  457.  
  458.      ettercap -N -s ghibli
  459.      ettercap -N -s ghibli:23
  460.  
  461.   the first will sniff all the connections to the host "ghibli"
  462.   the second only those which are on the port 23
  463.  
  464.      ettercap -N -s ghibli meltemi
  465.      ettercap -N -s ghibli:23  meltemi
  466.      ettercap -N -s ANY:23
  467.  
  468.   the first will sniff all the connections between "ghibli" and "meltemi"
  469.   the second only those which are on ghibli:23 coming from "meltemi"
  470.   the third ANY host but on port 23 (telnet)
  471.  
  472.  
  473. 5.3   MAC BASED SNIFFING
  474.  
  475.  It puts the network interface in promisc mode and then sniffs all the
  476.  packets that match the mac filter.
  477.  The mac filter is made up giving the IPs of the two hosts. Ettercap will
  478.  scan the host list and associates the correct mac address to the filter.
  479.  In this way specifying the gateway's ip and an host's ip, you will get
  480.  all the connections between the host and the Internet.
  481.  
  482.    Examples:
  483.  
  484.    assuming that "meltemi" is the gateway to internet.
  485.  
  486.      ettercap -N -m ghibli meltemi
  487.  
  488.    this will return all the connections that "ghibli" makes to remote hosts.
  489.  
  490.  
  491. 5.4   ARP BASED SNIFFING
  492.  
  493.  This method doesn't put the interface in promiscuous mode. It isn't
  494.  necessary because the packets will be sent to us! :) The switch will
  495.  forward the packets to us, so we have a good method for sniffing in
  496.  switched LANs.
  497.  Let's view how this is possible:
  498.  when you select this method, ettercap will poison the arp cache of the
  499.  two hosts, identifying itself as the other host respectively (see the
  500.  next section for this).
  501.  Once the arp caches are poisoned, the two hosts start the connection, but
  502.  their packets will be sent to us, and we will record them and, next,
  503.  forward them to the right side of the connection. So the connection is
  504.  transparent to the victims, not arguing that they are sniffed. The only
  505.  method to discover that there is a man-in-the-middle in your connection, is
  506.  to watch at the arp cache and check if there are two hosts with the same
  507.  mac address!
  508.  That is how we discover if there are others poisoning the arp cache
  509.  in our LAN, thus being warned, that our traffic is under control! =)
  510.  
  511.      HOST 1  - - - - - - - - - - - - - - - - - - - -> HOST 2
  512.    (poisoned)                                      (poisoned)
  513.        |                                               ^
  514.        |                                               |
  515.         ------------> ATTACKER HOST  ------------------
  516.                       ( ettercap )
  517.  
  518.  Legenda:
  519.              - - - ->   the logic connection
  520.              ------->   the real one
  521.  
  522.  Ok, cool! Though, how can I poison the arp cache ?
  523.  
  524.  
  525. 5.4.1    ARP POISONING
  526.  
  527.  The arp protocol has an intrinsic insecurity. In order to reduce the
  528.  traffic on the cable, it will insert an entry in the arp cache even if it
  529.  wasn't requested. In other words, EVERY arp reply that goes on the wire
  530.  will be inserted in the arp table.
  531.  So, we take advantage of this "feature", sending fake arp replies to the two
  532.  hosts we will sniff. In this reply we will tell that the mac address of the
  533.  second host is the one hard-coded on OUR ethernet card. This host will now
  534.  send packets that should go to the first host, to us, because he carries
  535.  our mac address.
  536.  The same process is done for the first host, in inverse manner, so we have
  537.  a perfect man-in-the-middle connection between the two hosts, legally
  538.  receiving their packets!!
  539.  
  540.    Example:
  541.  
  542.      HOST 1:  mac: 01:01:01:01:01:01         ATTACKER HOST:
  543.                ip: 192.168.0.1                    mac: 03:03:03:03:03:03
  544.                                                    ip: 192.168.0.3
  545.  
  546.      HOST 2:  mac: 02:02:02:02:02:02
  547.                ip: 192.168.0.2
  548.  
  549.  
  550.    we send arp replys to:
  551.  
  552.             HOST 1 telling that 192.168.0.2 is on 03:03:03:03:03:03
  553.             HOST 2 telling that 192.168.0.1 is on 03:03:03:03:03:03
  554.  
  555.    now they are poisoned !! they will send their packets to us !
  556.    then if receive packets from:
  557.  
  558.             HOST 1 we will forward to 02:02:02:02:02:02
  559.             HOST 2 we will forward to 01:01:01:01:01:01
  560.  
  561.    simple, isn't it ?
  562.  
  563.  *** LINUX KERNEL 2.4.x ISSUE ***
  564.  
  565.  In the latest release of the linux kernel we can find in :
  566.  /usr/src/linux/net/ipv4/arp.c
  567.  
  568.  /* Unsolicited ARP is not accepted by default.
  569.     It is possible, that this option should be enabled for some
  570.     devices (strip is candidate)
  571.  */
  572.  
  573.  these kernels uses a special neighbor system to prevent unsolicited arp
  574.  replies (what ettercap sends to the victim).
  575.  Oh shit is ettercap unuseful with that kernel ? the answer is NO !
  576.  let's view why... in the same source code we find:
  577.  
  578.  /*
  579.  *  Process entry.  The idea here is we want to send a reply if it is a
  580.  *  request for us or if it is a request for someone else that we hold
  581.  *  a proxy for.  We want to add an entry to our cache if it is a reply
  582.  *  to us or if it is a request for our address.
  583.  *  (The assumption for this last is that if someone is requesting our
  584.  *  address, they are probably intending to talk to us, so it saves time
  585.  *  if we cache their address.  Their address is also probably not in
  586.  *  our cache, since ours is not in their cache.)
  587.  *
  588.  *  Putting this another way, we only care about replies if they are to
  589.  *  us, in which case we add them to the cache.  For requests, we care
  590.  *  about those for us and those for our proxies.  We reply to both,
  591.  *  and in the case of requests for us we add the requester to the arp
  592.  *  cache.
  593.  */
  594.  
  595.  so, if the kernel receive a REQUEST it will cache the host...
  596.  what does that mean ? if ettercap sends spoofed REQUESTS instead of
  597.  REPLIES the kernel will cache them ? the answer is YES !!
  598.  
  599.  ettercap 0.6.0 and later has this new ARP REQUEST POISONING method.
  600.  it will alternate request and replies on poisoning because other OS doesn't
  601.  have this "feature"...
  602.  
  603.  
  604.  *** SOLARIS ISSUE ***
  605.  
  606.  Solaris will not cache a reply if it isn't already in the cache.
  607.  The trick is simple, before poisoning, ettercap sends a spoofed ICMP
  608.  ECHO_REQUSET to the host, it has to reply on it and it will make an arp
  609.  entry for the spoofed host. Then we can begin to poison as always, the
  610.  entry is now in the cache...
  611.  
  612.  
  613. 5.4.1.1    PUBLIC ARP
  614.  
  615.  In order to sniff from one target host to all others on a switched lan,
  616.  you have to use Publi ARP mode.
  617.  With this method ettercap sends broadcast ARP replies with the IP of the
  618.  victim and the mac of ettercap (poisoning the arp cache).
  619.  All the hosts will get this reply and add it to the cache so they will send
  620.  all the packet for the victim to ettercap.
  621.  But, there is a problem, even the victim will receive this reply and it
  622.  will notice a IP conflict (as exeriencing under win2k).
  623.  to solve this problem, SMART PUBLIC ARP was born...
  624.  
  625.  
  626. 5.4.1.2    SMART PUBLIC ARP
  627.  
  628.  With this method the replies are sent selectively to all the host but the
  629.  victim. in this way there are no IP conficts.
  630.  
  631.  NOTE: The poisoned hosts will be the ones in the list, so if you don't want
  632.  to poison a host, you can remove it from the list hitting 'd'
  633.  
  634.  NOTE: to do SMART ARP, ettercap needs to know the hosts list. so it is
  635.  better that you don't use the broadping startup (-b). however it is
  636.  impossible to do smart arp without the list in silent mode (-z).
  637.  ettercap automatically select the clever option, if it has the list, it will
  638.  use smart arp, if not, it uses the old public arp method.
  639.  
  640.  NOTE: with this method more arp replies are sent to the lan...
  641.  
  642.  
  643. 5.4.2    CHARACTERS INJECTION
  644.  
  645.  We have stated that the packets are for us...
  646.  And the packets will not be received by destination until we forward them.
  647.  But what happens if we change them?
  648.  Yes, they reach destination with our modifications.
  649.  We can modify, add, delete the content of these packets, by simply
  650.  recalculating the checksum and substituting them on the traffic.
  651.  But we can do also more: we can insert packets in the connection.
  652.  We forge our packets with the right sequence and acknowledgement number and
  653.  send them to the desired host. When the next packets will pass through us
  654.  we simply subtract or add the sequence number with the amount of data we
  655.  have injected till the connection is alive, preventing the connection to be
  656.  rejected (this until we close ettercap, who maintains sequence numbers
  657.  correct, after program exit, the connection must be RESET or all future
  658.  traffic would be rejected, blocking the source workstation network).
  659.  
  660.  NOTE: Injector supports escape sequences. you can make multi-line injection
  661.        eg: "this on line one \n this on line two \n and so on..."
  662.        eg: "this in hex mode: \x65\x6c\x6c\x65"
  663.        eg: "this in oct mode: \101\108\108\101"
  664.  
  665.  NOTE: remember to terminate your injection with \r\n if you want to inject
  666.        command to the server.
  667.  
  668.  
  669. 5.4.3 ACTIVE PROTOCOL DISSECTION (for ARPBASED mode)
  670.  
  671.  To view in strongly-ciphered streams you need to act straight on the stream
  672.  For example you need to change key-packets (man-in-the-middle technique).
  673.  In particular cases this will result in a fault of the protocol, so pay
  674.  attention using this feature.
  675.  The used method changes from protocol to protocol and is more difficult to
  676.  explain than to code it.
  677.  So I'm sorry but you have to examine the source code if you really want
  678.  to know how it works.
  679.  
  680.  
  681. 5.4.4 SSH1 MAN-IN-THE-MIDDLE
  682.  
  683.  When the connection starts (remember that we are the master-of-packets, all
  684.  packets go through ettercap) we substitute the server public key with one
  685.  generated on the fly and save it in a list so we can remember that this
  686.  server has been poisoned before.
  687.  Then the client send the packet containing the session key ciphered with
  688.  our key, so we are able to decipher it and sniff the real 3DES session key.
  689.  Now we encrypt the packet with the correct server public key and forward it
  690.  to the SSH daemon.
  691.  The connection is established normally, but we have the session key !!
  692.  Now we can decrypt all the traffic and sit down watching the stream !
  693.  The connection will remain active even if we exit from ettercap, because
  694.  ettercap doesn't proxy it (like dsniff). After the exchange of the keys,
  695.  ettercap is only a spectator... ;)
  696.  
  697.  
  698. 5.4.5 PACKET FILTERING
  699.  
  700.  Like character injection, we can modify the packets payload and replace
  701.  the right sequence and acknowledgement number if needed.
  702.  With the integrated filtering engine you can program your own filter chain
  703.  to make the best filter for your scopes.
  704.  A filter chain is a simple array of filter that can be viewed as a list of
  705.  instruction of a virtual machine. The entry point of the program is the
  706.  filter 0 (zero). You can specify a jump if the filter is true and a different
  707.  jump if the filter is false. A filter is considered true if  <protocol, source
  708.  port, dest port, payload> is (in logical AND) equal to the filter.
  709.  A NULL search string is always considered true. (NULL = 0 for the ports)
  710.  If the filter matches, it will do the action (Log, Replace or Drop) and
  711.  evaluate the right jump to be executed. So the "instruction pointer" will
  712.  change to the filter jumped to. When the value of a jump is blank the filter
  713.  chain is considered terminated and the packet is forwarded to the target host.
  714.  So you can set up a filter that search for a particular string (even hex)
  715.  in the TCP or UDP payload and replace it with yours or drop the entire
  716.  packet. You can use wildcard in the search string using the special
  717.  notation [n*] where n is the number of character to be matched.
  718.  e.g.
  719.  
  720.    suppose a data flow as follow:
  721.  
  722.       packet 1:   "var1=123&var2=400"
  723.       packet 2:   "var1=124&var2=420"
  724.       packet 3:   "var1=125&var2=460"
  725.       packet 4:   "var1=126&var2=540"
  726.       packet 5:   "var1=127&var2=700"
  727.       ...
  728.       ...
  729.  
  730.    we want to assign a value to the var1 disregarding the current value.
  731.    so we set up the filter as follow:
  732.  
  733.          Search:  "var1=[3*]"
  734.          Replace: "var1=000"
  735.  
  736.    this filter will produce this output:
  737.  
  738.       packet 1:   "var1=000&var2=400"
  739.       packet 2:   "var1=000&var2=420"
  740.       packet 3:   "var1=000&var2=460"
  741.       packet 4:   "var1=000&var2=540"
  742.       packet 5:   "var1=000&var2=700"
  743.       ...
  744.       ...
  745.  
  746.    and whenever a payload contains the "var1=" assignement it will modify it
  747.    to "var1=000"
  748.  
  749.  NOTE: you can only set up the wildcard at the end of the search string !!
  750.  e.g.
  751.          "var1=[5*]"             OK
  752.          "[4*]=123"              NOT PERMITTED
  753.          "var1=[3*]&pippo"       WILL BE TRANSLATED TO "var1=[3*]"
  754.          "var1=[3*]&var2=[3*]"   NOT PERMITTED
  755.                                  to do multiple filter set up a first filter
  756.                                  that makes the var1 replacement with the jump
  757.                                  to a second filter that makes the second.
  758.                                  i.e:  0 | var1=[3*] R var1=000  | => 1
  759.                                        1 | var2=[3*] R var2=111
  760.  
  761.  
  762.  You can search and replace even escaped strings like "\x72\x6f\x6f\x74".
  763.  
  764.  NOTE: the form automatically trims the trailing spaces of the strings, so
  765.        if you want to search for "ettercap ", you have to set a filter on
  766.        "ettercap\x20". "\x20" will be escaped with " ".
  767.        And if you want to search the magic word "[*]" you have to escape it.
  768.  
  769.  
  770. 5.5 PASSIVE SCANNING OF THE LAN
  771.  
  772.  This feature is very useful if you want to know the topology of the lan but
  773.  you don't want to send any packet on it. In this way the scan is done entirely
  774.  by sniffing packets and extracting useful information from them.
  775.  This scan will let you know the hosts in the lan (it watches ARP request), the
  776.  Operating System of the hosts (it uses passive os fingerprint... see next
  777.  section), the open ports of an host (looking the syn+ack packet), the gateway,
  778.  the routers or hosts atcing as a router (it watches ICMP messages).
  779.  As a passive method it is useless on a switched lan (because it can make a
  780.  topology only of the host that are conneting to you), but if you put it on a
  781.  gateway and let it run for hours or days, it will make a complete report of
  782.  the hosts in the lan.
  783.  
  784.  
  785. 5.5.1 PASSIVE OS FINGERPRINT
  786.  
  787.  The main idea is to analyze the passive information coming form an host
  788.  when it makes or receives connections with other hosts. This information
  789.  is enough to detect the OS and the running services of the host.
  790.  In this scenario, we look at SYN and SYN+ACK packet and collect some
  791.  interesting info from them:
  792.  Window Size: the TCP header field
  793.  MSS: the TCP option Maximum Segment Size (can be present or not)
  794.  TTL: the IP header field Time To Live (rounded to the next power of 2)
  795.  Window Scale: the TCP option indicating the Scale
  796.  SACK: the TCP option for the Selective ACK
  797.  NOP: if the TCP options contain a NOP
  798.  DF: the IP header field Don't Fragment
  799.  TIMESTAMP: if the TCP timestamp option is enabled
  800.  and obviously the type of the packet (syn or syn+ack)
  801.  
  802.  The database contains different fingerprints for each type of packet
  803.  because some OSes have different fingerprints from SYN to SYN+ACK.
  804.  Obviously the SYN fingerprint is more reliable, because the SYN+ACK is
  805.  influenced by the SYN (if a SYN doen't contain a SACK the SYN+ACK will not
  806.  have the SACK option even if the host support it). So while collecting
  807.  information off the lan, if we receive a SYN+ACK we mark the OS of that
  808.  host as temporary and when we receive a SYN we confirm that.
  809.  Fingerprint ending with an ":A" are less reliable... this is the reason
  810.  because some OS identification may change during the gathering process.
  811.  
  812.  The SYN+ACK packets are used also to discover the open ports of an host.
  813.  (see next section)
  814.  
  815.  The intersting thing is that firewalls, gateways and NAT are trasparent to
  816.  passive OS detection. So colleting info for the LAN will let you know info
  817.  even for remote host. Only proxies aren't trasparent because they make a
  818.  new connection to the target.
  819.  
  820.  Our fingerprint database has to be enlarged, so if you find a host with an
  821.  unknown fingerprint and you know for sure the OS of that host, please mail
  822.  us <alor@users.sourceforge.net> the fingerpring and the OS, we will insert
  823.  in the database.
  824.  
  825.  
  826. 5.5.2 OPEN PORTS
  827.  
  828.  Open ports are identified by looking for stn+ack packets.
  829.  If a syn+ack comes form a port, it is for sure open, except for the
  830.  channel command of FTP protocol, for that reason syn+ack going to port 20
  831.  are not used to indicate a open port.
  832.  For the udp ports the question is a little bit difficult because no syn or
  833.  ack packet are present in the udp protocol, so ettercap assumes that a udp
  834.  port < 1024 that sends packets is opened. We know that in this way we cannot
  835.  discover open ports > 1024 but they can be misdetected as open when a client
  836.  sends packet to a server.
  837.  
  838.  
  839. 5.5.3 GATEWAY AND ROUTERS
  840.  
  841.  The gateway is simply recognized looking at IP packet with a non local ip
  842.  ( checking the netmask ). If a non local IP is found, ettercap look at the
  843.  ethernet address (MAC) and store it as the gateway mac address, then it
  844.  search for it in the list and mark the corresponding ip as the gateway.
  845.  
  846.  Looking in the ICMP messages we can rely that if a host sends a
  847.  TTL-exceeded or a redirect messages it is a router or an host acting as it.
  848.  
  849.  
  850.  
  851. ============================================================================
  852. 6>                                 PLUG-INs
  853. ============================================================================
  854.  
  855.  
  856.  see README.PLUGINS
  857.  
  858.  For specific details about a particular plugins, some of them have a little
  859.  HOW-TO in their directory.
  860.  
  861. ============================================================================
  862. 7>                            USELESS INFORMATION
  863. ============================================================================
  864.  
  865.  
  866. Project started on :       2000-11-25
  867.  
  868. Last stable release :      0.6.4          Our software never has bugs.
  869.                                           It just develops random features.
  870.  
  871. Published on :             2002-02-12
  872.                                     whenever a code runs it's just obsolete
  873.  
  874.  
  875. Editor :                   vi, vim, gvim, mcedit, UltraEdit
  876.  
  877.  
  878. greetings to :             The IEEE 802.3  standard  :)
  879.                            ISO/OSI organization
  880.                            Andrew S.Tanenbaum
  881.                            Berkeley University
  882.  
  883.                            the SiLAB (university lab)
  884.                            JJ's corner PUB
  885.  
  886. ALoR greetings:            VMWare staff ;)
  887.                            elle (she knows for what...)
  888.                            Raptor & awgn
  889.                            My car hi-fi
  890.                            My New Car (Volkswagen Polo 1.4 TDi) wow !
  891.                            my grandfather (my encyclopedia)
  892.  
  893.  
  894. NaGA greetings:            Heineken Inc.
  895.                            My MP3 player
  896.                            N-Team
  897.                            MegaBug
  898.  
  899.  
  900. fucks to :                 tutte le tipe che se la menano ;)
  901.                            mcedit (it sucks!)
  902.  
  903.  
  904. Motto :                    Specialization is for insects, a human being
  905.                            should be able to do anything!
  906.  
  907. Who we are :               If you think you know us... YOU DON'T.
  908.                            If you don't know us... YOU WILL.
  909.  
  910. Shakespeare :              question = ( to ) ? be : !be;
  911.  
  912.  
  913. The Lord Of The (Token)Ring:
  914.     (the fellowship of the packet)
  915.  
  916.       "One Ring to link them all, One Ring to ping them,
  917.        one Ring to bring them all and in the darkness sniff them."
  918.  
  919. 0xABADC0DE==============================================================EC-2K
  920.