home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / freebsd / rootkit / sniffit.0.3.5 / README.FIRST < prev    next >
Encoding:
Text File  |  2002-05-27  |  27.3 KB  |  707 lines

  1. #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
  2. *                            Sniffit V.0.3.5                                  *
  3. *                          By Brecht Claerhout                                *
  4. #  This program is intended to demonstrate the unsafeness of TCP (currently)  #
  5. *                No illegal activities are encouraged!                        *
  6. #      Anyway, I'm not responsible for anything you do with it.               #
  7. *                                                                             *
  8. #  Sniffit grew a little upon it's original intentions and is now             #
  9. *  extended for network debugging (UDP, ICMP, netload, etc.)                  *
  10. #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
  11. *                          Libpcap library                                    *
  12. #      This product includes software developed by the Computer Systems       #
  13. *           Engineering Group at Lawrence Berkeley Laboratory.                *
  14. #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
  15.  
  16. 0. Introduction, and some stuff you should know.
  17.     crap, credits and compilation notes
  18. 1. Programmers notes
  19.     excuses for my incompetence
  20. 2. Use of the program
  21.     flags and examples
  22. 3. Extra info on use 
  23.         3.1 Running interactive mode
  24.     3.2 Forcing network devices   (*READ*)
  25.     3.3 Format of the config file
  26.     3.4 Loglevels
  27. 4. The output
  28.     4.1 Normal
  29.     4.2 Logfile
  30. 5. IMPORTANT NOTES, READ!
  31.     this also!
  32. 6. BUGFIXES
  33. 7. NEW STUFF
  34.     to keep track of what's in it
  35. ------------------------------------------------------------------------------
  36.  
  37. 0. Introduction, and some stuff you should know.
  38. ------------------------------------------------
  39.  
  40. 0.3.5... 
  41. You probably wonder where 0.3.4 has gone to, well that was a 
  42. beta-release. It was only shipped to the Beta-testers (a big thanks to 
  43. them for their valuable work.)
  44.  
  45. SO TO MAKE EVERYTHING CLEAR:
  46. Official versions jump from 0.3.3 to 0.3.5....
  47.  
  48. What did I do? 
  49. Upgraded libpcap, renewed the compilation process, and added some features.
  50. The interactive party of sniffit now includes packet generation. All 
  51. command line options having to do with packet selection now also work with 
  52. UDP packets.
  53. Fixed the external program triggering... (children stayed in memory.. 
  54. signalling problem)
  55. Improved portability of the code....
  56.  
  57. I use the libpcap library developped at Berkeley Laboratory, for easy 
  58. porting (Read the licence).
  59.  
  60. Credits go to (in order of apperance on the Sniffit scene): 
  61.     Wim Vandeputte <wvdputte@reptile.rug.ac.be>, 
  62.            best friend and UNIX guru, for support, testing and
  63.                    providing me with a WWW site.
  64.     Godmar Back, for fixing that kernel 1.2.X bug (Sniffit 0.1.X).
  65.     Peter Kooiman, of Paradigm Systems Technology for providing the
  66.                    facilities to port Sniffit, and for the endless testing
  67.                    (although he laughs this away with "no big deal, I
  68.                    don't need no credits").
  69.                    Without him, there would have been no ports at all.
  70.     Brooke Paul, for providing me with an SGI account.
  71.     Qing Long, for the bash/zsh libpcap/configure script.
  72.     Guy Gustavson, for giving me a FreeBSD account.
  73.     Woju <woju@freebsd.ee.ntu.edu.tw>, for the ncurses SunOS/FreeBSD fixing,
  74.                                        and for his other effords.
  75.     Amlan Saha <eng40607@nus.sg>, for adding Packet Generation to 
  76.                Sniffit, and adding other features (not implemented yet).
  77.                I'm sure that in the near future you will see more of his 
  78.                work in Sniffit.
  79.     everybody, who ever mailed me with sugestions help, etc...
  80.  
  81. Also a big thanks to my Beta testers (alphabetically, I hope)... 
  82.     Charles G Stuart      <charles.stuart@juno.com>         IRIX / RedHat LINUX
  83.     Patrick Schoppenhorst <pschoppe@thumper.indianapolis.sgi.com>          IRIX
  84.     Shahid Mahmood        <smahmood@hns.com>            Slackware LINUX / SunOS
  85.     Stephen Hillier       <shillier@tuns.ca>                       RedHat LINUX
  86.  
  87.     And many others who wish to be anonymous....
  88.     (you still can get your name in here if you not longer wish to stay 
  89.      anonymous ;)
  90.  
  91. This is free software, spread it if you want, but keep the package 
  92. complete and unmodified. Do not use any code from this package without 
  93. mentioning the source in your docs and advertisement. Do not use any of 
  94. this code in Commercial Software/Commercial Packages.
  95.  
  96.  
  97. Sugestions and comments can be sent to:
  98.   coder@reptile.rug.ac.be
  99.  
  100.   Brecht Claerhout
  101.   Meulebeeksestw. 51
  102.   8700 Tielt
  103.   Belgium
  104.  
  105. The original distribution program can be optained from (my site):
  106.   http://reptile.rug.ac.be/~coder/sniffit/sniffit.html
  107.  
  108. MIND YOU: this program is ran as root, and thus could easily contain
  109.           dangerous trojans. If you get it from the above site you can
  110.           safely compile and use it.
  111.           (no trojan versions are discovered yet.. it's just a warning)
  112.  
  113. Compiling:
  114.  
  115. Sniffit now uses autoconfig. So you just type 'configure' and then 'make' 
  116. (if configure made it without errors).
  117. Mind you, you can still modify some things in the 'sn_config.h' file, but 
  118. by default all sections that can be added on your system are added.
  119.  
  120. IMPORTANT NOTES:
  121.   1. This source code has only been tested with GNU versions of make/C 
  122.      compiler.
  123.   2. curses DOES NOT equal ncurses.  
  124.      (ncurses is available at your local sunsite mirror.)
  125.  
  126. Other stuff....
  127. make clean  : cleans all directories for a compiling from scratch
  128.  
  129. STANDARD DISCLAIMER:
  130. I am not responsible for any damage (hardware, software, emotional, 
  131. physical, economical, sexual, ...) caused by this program, or by any part of 
  132. this package. By using this package you fully agree to these terms, if 
  133. you don't then remove it at once.
  134. The author however states that he has done everything within his effort 
  135. to make this program as functional and safe as possible.
  136.  
  137.  
  138. 1. Programmers notes
  139. --------------------
  140.  
  141. No more excuses ..... I think I used the easiest solution, probably 
  142. somewhere some guru is now laughing with my lack of programming skill, 
  143. but the hell with it, it works (most of the time, here....  ;)
  144.  
  145. Still I note the use of shared memory, with Linux you should take extra 
  146. care when recompiling your kernel! Answer YES to 'System V IPC 
  147. (CONFIG_SYSVIPC) [y]'.
  148.  
  149. 2. Use of the program
  150. ---------------------
  151.  
  152. (The man pages have detailed info on what parameters you can mix)
  153. (* indicates New Features)
  154.  
  155. Options:
  156. ONE of these is required!
  157.   -v             Show version and exit (just added because it's such a
  158.                  wide spread option)
  159.  
  160.   -t <IP nr/name>   tells the sniffer to check out packets GOING TO <IP>
  161. * -s <IP nr/name>   tells the sniffer to check out packets COMMING FROM <IP>
  162. *                   You can use the '@' wildcard (only IP NUMBERS of course).
  163. *                   e.g. -t 199.145.@
  164. *                        -t 199.14@
  165. *                   mind you -t @ is also a valid option.
  166.   -i                Interactive mode, overrides all other options
  167.   -c <file>         Use <file> as a config file for Sniffit
  168.                     See 3.3 for format of the config file.
  169.  
  170. * NOTE: -t or -s only apply to TCP and UDP  packages, ICMP, IP packages 
  171. *       are ALL interpreted.
  172. *       Also, any selection on ports, -p only applies to TCP, UDP packages.
  173.  
  174. Parameters for all modes:
  175.   -F <device> force sniffit to use a network device 
  176.           (READ 3.2 ON THIS SUBJECT, IMPORTANT)
  177.   -n          Turn  of  IP  checksum  checking. This can show you
  178.               bogus packets.  (mind you ARP, RARP,  other  non-IP
  179.               packets  will  show  up bogus too) (compatible with
  180.               ALL options)
  181. * -N          Disables all functions that Sniffit has build in, usefull 
  182. *             for wanting to run ONLY a plugin
  183.  
  184. Parameters for not running in -i:
  185.   -b           does both -t and -s, doesn't mather what function you used 
  186.                (-t or -s)
  187.   -d           Dump mode, shows the packets on the screen in bytes (not 
  188.                like tcpdump). For test purposes. (numbers are hex)
  189.   -a           same of '-d' but outputs ASCII. 
  190.   -x           Prints extended info on TCP packets (SEQ numbers, ACK, Flags)
  191.            Like SEQ, ACK, the flags, etc... (works wit '-a', '-d', '-s', 
  192.            '-t', '-b' or on its own.)
  193.                (Mind you it is always shown on stdout, so not logged when 
  194.                using '-t', '-s', '-b' without another parameter)
  195.   -A <char>    When in logging mode, all non-printable chars will be 
  196.                replaced by <char>. (see note below 4.The output)
  197.   -P protocol  specify the protocols examined (default TCP)
  198.            possible options currently are: IP, TCP, ICMP, UDP
  199.            They can be combined.
  200.   -p <port>    Logs connections on port <port>, 0 means all ports, default 
  201.                is 0 (all), look out with that on loaded nets!
  202.   -l <length>  Ammount of information to log (default 300 bytes). 
  203.                Length 0 logs everything. (look out with diskspace when 
  204.                logging everything!)
  205. * -M <Plugin>  Activate Plugin nr. <Plugin>, for a list on all plugins 
  206. *              compiled in your version, just type 'sniffit'.
  207. *              Read all about Plugins in the PLUGIN-HOWTO (READ IT!)
  208.  
  209. Parameters with -i:
  210.   -D <device>  All logging output will be send to that device.
  211.                It's cool to get the same IRC screen as the guy y'r 
  212.                sniffing upon ;-)
  213.  
  214. Parameters with -c:
  215.   -L <loglevel> enable logging with <loglevel> as loglevel
  216.                 currenly the following loglevels are supported:
  217.                 1     : Raw level
  218.                 10,12 : Normal level
  219.                 (see '2. The Output' for more info)
  220.  
  221.  
  222. Some examples:
  223.   Imagine the following setup: 2 hosts on a subnet, one is running the 
  224.   sniffer (sniffit.com), the otherone is 66.66.66.7 (target.com).
  225.     1. You want to test if the sniffer is working:
  226.        sniffit:~/# sniffit -d -p 7 -t 66.66.66.7
  227.        and in another window:
  228.        sniffit:~/$ telnet target.com 7
  229.        you should see the sniffer giving you packets as you telnet to 
  230.        the 'echo' service. 
  231.     2. I want to log some passwords from people on 66.66.66.7:
  232.        sniffit:~/# sniffit -p 23 -t 66.66.66.7
  233.     3. Root of target.com tells me he gets strange ftp connections and 
  234.        wants to find out the commands typed:
  235.        sniffit:~/# sniffit -p 21 -l 0 -t 66.66.66.7
  236.     4. You want to read all incomming and outgoing mail on target.com:
  237.        sniffit:~/# sniffit -p 25 -l 0 -b -t 66.66.66.7 &
  238.        or
  239.        sniffit:~/# sniffit -p 25 -l 0 -b -s 66.66.66.7 &
  240.     5. You want to use the menu based interface.
  241.        sniffit:~/# sniffit -i
  242.     6. Something is really wrong and you want to see the Control Messages
  243.        with error codes.
  244.        sniffit:~/# sniffit -P icmp -b -s 66.66.66.7
  245.     7. Go wild on scrolling the screen.
  246.        sniffit:~/# sniffit -P ip -P icmp -P tcp -p 0 -b -a -d -x -s 
  247.                    66.66.66.7
  248.        witch is the same as
  249.        sniffit:~/# sniffit -P ipicmptcp -p 0 -b -a -d -x -s 66.66.66.7
  250.     8. Log passwords in that way you can read them with 'more 66*'
  251.        sniffit:~/# sniffit -p 23 -A . -t 66.66.66.7
  252.        or
  253.        sniffit:~/# sniffit -p 23 -A ^ -t dummy.net
  254.     9. This could go on for ever..............
  255.  
  256.  
  257.  
  258. 3. Extra info on use 
  259. -------------------- 
  260.  
  261. 3.1 Running interactive mode
  262. ----------------------------
  263. When running in interactive mode:
  264.  
  265. UP or 'k' : self explanatory
  266. DOWN or j': self explanatory
  267. F1 or '1' : Enter a host (enter 'all' for no mask) for packet filtering 
  268.             (host that sends the packets)
  269. F2 or '2' : Enter a host (enter 'all' for no mask) for packet filtering.
  270.             (host that receives the packets)
  271. F3 or '3' : Enter a port (enter '0' for no mask) for packet filtering.
  272.             (host that sends the packets)
  273. F4 or '4' : Enter a port (enter '0' for no mask) for packet filtering.
  274.             (host that receives the packets)
  275. F5 or '5' : Start a program 'sniffit_key5' with arguments
  276.             <from IP> <from port> <to IP> <to port>
  277.         If the program doesn't exist, nothing is done. Sniffit should 
  278.         be in the same path as sniffit was STARTED FROM (not necessarely 
  279.         the path sniffit is stored in) 
  280.         This is usefull for interactive connection killing or extra 
  281.         monitoring. A little shell script can always transform the 
  282.             arguments given and pass them on to other programs.
  283. F6 or '6' : Same as F5 or '5', but with program 'sniffit_key6'
  284. F7 or '7' : Same as F5 or '5', but with program 'sniffit_key7'
  285. F8 or '8' : Same as F5 or '5', but with program 'sniffit_key8'
  286. ENTER     : a window will pop up and log the connection, or the connection 
  287.             output will be send at a chosen device if you used the '-D' 
  288.             option.
  289. 'q'       : When in logging mode, stop logging. Otherwise, quit.
  290. 'n'       : Toggle netstatistics. These are sampled at 3 secs, look in 
  291.             the config.h file to change this (could be needed if y'r 
  292.             computer is slow).
  293. * 'g'     : Generate Packets!
  294. *           Sniffit is now able to generate some trafic load. Currently 
  295. *           this is a 'underdevelloped' feature with very few options, 
  296. *           but it will be expanded a lot
  297. *        Currently only UDP packets are generated. When pressing 'G' 
  298. *           you will be asked the source/dest IP/port and how much packets 
  299. *           are needed to be transmitted.
  300. *           Packets contain the line: "This Packet was fired with Sniffit!"  
  301. 'r'       : Reset.. clears all current connections from memory and restarts. 
  302.  
  303.  
  304. 3.2 Forcing network devices   (*READ*)
  305. --------------------------------------
  306.  
  307. NOTE: the correct name (for sniffit) of a device can be found by running 
  308.       'ifconfig'
  309.  
  310. When forcing network devices, sniffit tries to find out what device it is. 
  311. If sniffit recognises the name, everything is okay. 
  312. If it does not recognise the name it will set the variable 
  313. FORCED_HEAD_LENGHTH to the ethernet headlength. The ethernet headlength 
  314. is the length in bytes of an ethernet packet hearder. 
  315. So if you have to force a non-ethernet device, that is not recognised by 
  316. sniffit, make sure you change that headlength correctly in the 'config.h' file.
  317.  
  318. The -F option was added, because I noticed devicenames can differ from 
  319. system to system, and because some ppl have multiple devices present.
  320. When having problems with this option, please think twice before you mail me.
  321.  
  322. * e.g: sniffit -F eth1 -t foobar.com -dx
  323. *
  324. * Notice you don't have to add /dev/ (some ppl mentioned me this was not 
  325. * completely clear).
  326.  
  327. 3.3 Format of the config file
  328. -----------------------------
  329.  
  330. The configfile should have lines with the following format:
  331. <field1> <field2> <field3> <field4> [<field5>]
  332. (seperators are spaces (any number of), NO TABS!!!)
  333.  
  334. Lines that don't match this pattern are discarded, so standard unix
  335. comments '#' can be used in this file... (this also means that if you
  336. have a typo there, Sniffit won't report it but just discard the line)
  337.  
  338. (read this list, even if you don't get it at first, it will become clear
  339. in the examples)
  340.  
  341. <field1> can be:
  342.    select      : Sniffit will look for packets that match the following
  343.                  description (other fields)
  344.    deselect    : Sniffit will ignore packets that match the description
  345.    logfile     : change the logfile name to <field2> instead of the
  346.                  default 'sniffit.log'
  347.  
  348. <field2> can be:
  349.    from        : Packets FROM the host matching the following desc. are
  350.                  considered
  351.    to          : similar, Packets TO the....
  352.    both        : similar, Packets FROM or TO the....
  353.    a filename  : as an argument of 'logfile' in <field1>
  354.  
  355. <field3> can be:
  356.    host        : The (de)selection criteria involves a hostname.
  357.    port        : similar, ... a portnumber
  358.    mhosts      : The (de)selection criteria involves multiple-hosts, like
  359.                  with the wildcars in 0.3.0, but without the 'x'
  360.  
  361. <field4> can be:
  362.    either a hostname, a portnumber or a numbet-dot partial notatiion
  363.    indicating multiple hosts depending on <field3>
  364.  
  365. <field5> can be:
  366.    a portnumber, if <field3> was 'host' or 'mhosts'
  367.  
  368.  
  369.   Maybe it would have been wise to mention explicitely, that the config-file
  370.   currently only works with TCP packets.
  371.  
  372. examples:
  373.  
  374. 1. Look at this configuration file:
  375.         select from host 100.100.12.2
  376.         select from host 100.100.12.3 1400
  377.         select to host coder.sniffit.com
  378.         select both port 23
  379.     This file would cause Sniffit to give you the packets:
  380.         a) Send by host 100.100.12.2
  381.         b) Send by host 100.100.12.3 from port 1400
  382.         c) Send to coder.sniffit.com
  383.         d) All packets on our subnet going to or comming from a telnet port.
  384.  
  385. 2. another example:
  386.         select both mhosts 100.100.12.
  387.         deselect both port 80
  388.         select both host enemy.sniffit.com
  389.     This file would cause Sniffit to give you the packets:
  390.         a) Send by hosts '100.100.12.*'
  391.         b) EXCEPT the WWW packets
  392.         c) BUT showing the WWW packets concerning enemy.sniffit.com
  393.  
  394.    The config file in interpreted SEQUENTIAL, so mixing up those lines
  395.    could have unwanted results e.g.:
  396.         select both mhosts 100.100.12.
  397.         select both host enemy.sniffit.org
  398.         deselect both port 80
  399.     This will give you the packets:
  400.         a) Send by hosts '100.100.12.*'
  401.         b) Send from/to enemy.sniffit.org
  402.         c) deselecting all WWW packets on the subnet
  403.    So if someone on enemy.sniffit.org is netscaping (assuming his 'target'
  404.    has his httpd installed on port 80), you would see the packets with
  405.    the first config file, BUT NOT with the second file, and that could
  406.    spoil y'r fun when he's surfing to some kinky page.
  407.  
  408. 3. Last usefull example:
  409.         select both mhosts 1
  410.         select both mhosts 2
  411.         deselect both mhosts 1 80
  412.         deselect both mhosts 2 80
  413.     This would show you all subnet trafic excluding WWW trafic
  414.    (concerning port 80.)
  415.  
  416. NOTE: Everything is DESELECTED by default, so an empty config file will
  417.       get you nothing.
  418.  
  419.  
  420. 3.4 Loglevels
  421. -------------
  422.  
  423. Levels are divided into groups (1-9, 10-29, ..??) and within each group,
  424. they 'add' features to the logging mode.
  425. e.g. loglevel 13, will do everything loglevel 12 does, and some
  426.      additional stuff...
  427.      (this for future development)
  428.  Raw (levels 1-9)
  429.   1 :   Log all SYN, FIN, RST packets. This will give you an overview of
  430.         all network (TCP) trafic in a 'RAW' way (a connection starting could
  431.         gives you at least 2 SYN packets, etc...).
  432.         Messages are:
  433.                 Connection initiated. (SYN)
  434.                 Connection ending. (FIN)
  435.                 Connection reset. (RST)
  436.  
  437. Normal (levels 10-29)
  438.   10:   Same as Raw level 1, but a bit more intelligent. Unless packets
  439.         are transmitted multiple times because of packet loss, you will
  440.         only get 1 notice of a connection starting or ending. (the packet id
  441.         will state the host that initiated the connection first)
  442.         Messages are:
  443.                 Connection initiated.
  444.                 Connection closed.
  445.  
  446.   12:  This option will spy on trafic concerning ports 21 and 23 on the
  447.        subnet. Yes indeed, FTP and TELNET. Sniffit will try to catch login
  448.        and passwords for these applications.
  449.  
  450.        FTP
  451.        Easy catching. Even multiple tries are registered.
  452.     
  453.        TELNET
  454.        A bit harder. We only try to catch the first attempt, so if
  455.        someone fails the first login, you will miss his password.
  456.        A '~' in the login and passwords fields can be a nonprintable
  457.        character (if in the beginning of a field, probably due to an early
  458.        start of registration) or a '~'.
  459.        This all makes it sound a little messy, but I 'testdrived' a lot and
  460.        was pleased with the results after adding some funky shit (if y'r
  461.        interested have a look at in function 'packethandler' in
  462.        sniffit.0.3.2.c)
  463.  
  464.  
  465. 4. The output
  466. -------------
  467.  
  468. 4.1 Normal
  469. ----------
  470.  
  471.  - IP header info (not logged, displayed):
  472.  
  473.    Examples:
  474.      
  475.      from 100.100.60.80 to 100.100.69.63
  476.      IP Packet precedence: Routine   (-T-)
  477.      FLAGS: -- --     Time to live (secs): 59
  478.      Protocol (6): TCP
  479.  
  480.      from 100.100.69.31 to 100.100.69.63
  481.      IP Packet precedence: Routine   (---)
  482.      FLAGS: -- --     Time to live (secs): 60
  483.      Protocol (17): UDP
  484.  
  485.      from 100.100.69.51 to 100.100.69.63
  486.      IP Packet precedence: Routine   (---)
  487.      FLAGS: -- --     Time to live (secs): 255
  488.      Protocol (1): ICMP
  489.  
  490.    explanation:
  491.  
  492.    Precedence can be: 
  493.      Routine, Priority, Immediate, Flash, Flash override, Critical, 
  494.      Internetwork Control, Network control
  495.    The Flags between brackets: (DTR) Delay-Throughput-reliability
  496.    FLAGS: DF MF    DF=Don't Fragment    MF=More Fragments      
  497.  
  498.  - TCP Packets (logged or displayed):
  499.  
  500.    The sniffer logs the data in ascii format. So when logging telnet 
  501.    connections, you will need to use 'joe' or something else that can 
  502.    support control chars (look for '-A <char>' below).
  503.    Telnet 'negotiates' (binary) in the beginning of every connection, and 
  504.    'catting' a output file, will most of the time show nothing (due to 
  505.    control chars).
  506.    Of course when logging mail, there are no problems.
  507.    The new '-A <char>' takes care of the control characters, that way you 
  508.    will be able to read the logfiles with 'more', 'vi', etc...
  509.  
  510.    -a and -d give you raw packets i.e. not unwrapped, on the screen 
  511.    (nothing is logged), -x gives you more info on the TCP package 
  512.    (everything is still logged unless using -a or -d mode), 
  513.    The flags are:
  514.       U: Urgent pointer significant 
  515.       A: Acknowledgement is signif (will be shown)
  516.       P: Push function
  517.       R: Reset the connection
  518.       S: Synchronizes sequence numbers
  519.       F: No more data from sender (end connection) 
  520.  
  521.   Filenames Created:
  522.   Imagine a subnet with the hosts 66.66.66.66 and 66.66.66.7, and we 
  523.   run a sniffer on the first.
  524.   The sniffer creates the following files:
  525.     When logging packets TO host 66.66.66.7 (-t 66.66.66.7) files like 
  526.     77.77.7.7.15000-66.66.66.7.23 are created, when the data CAME FROM 
  527.     host 77.77.7.7-15000 (with 15000 port used on 77.77.7.7 for that 
  528.     connection, and received on port 23 of 66.66.66.7)
  529.  
  530.     When logging packets FROM host 66.66.66.7 (-s 66.66.66.7) files 
  531.     like 66.66.66.7.15000-77.77.7.7-23 are created, when the data 
  532.     GOES TO host 77.77.7.7 (with 15000 port used on 66.66.66.7 for 
  533.     that connection)
  534.  
  535.  
  536. - ICMP Packets (not logged, displayed):
  537.  
  538.   On host 100.100.69.63 someone tried 'telnet 100.100.23.23'
  539.   Suppose this host is unreachable, this could be a possible output:
  540.  
  541.     ICMP message id: 100.100.69.254 > 100.100.69.63
  542.       ICMP type: Destination unreachable
  543.       Error: Host unreachable
  544.     ICMP message concerned following IP packet:
  545.     from 100.100.69.63 to 100.100.23.23
  546.     IP Packet precedence: Routine   (---)
  547.     FLAGS: -- --     Time to live (secs): 63
  548.     Protocol (6): TCP
  549.  
  550.  
  551. - UDP Packets (not logged, displayed)
  552.  
  553.   You get the package id. When using -d, -a you get the contence of the 
  554.   package. (pretty basic)
  555.  
  556.  
  557. 4.2 Logfile
  558. -----------
  559.  
  560. If you use a configfile (-c) and enable the Logging option a logfile is
  561. created. Unless you set 'logfile' in the config file, that file will be
  562. named 'sniffit.log'.
  563. It will contain lines with the following FIXED format:
  564. 1) Date                       - Connection id.: message
  565.    e.g. [Mon Aug 19 22:38:56 1996] - 100.100.10.10.1046-110.110.11.11.23:
  566.         Connection initiated.
  567.         (conn. init. on the same line as the rest)
  568.  
  569. 2) Except the starting line and the ending line of each session, they are:
  570.  
  571.    [Mon Aug 19 22:38:51 1996] - Sniffit session started.
  572.    [Mon Aug 19 22:39:44 1996] - Sniffit session ended.
  573.  
  574. 3) Lines containing other data (future versions), will NOT begin with '['
  575.    and will have also easily interpretable formats.
  576.    Other data is e.g. packet contence
  577.  
  578. I do this because I can imagine (when this is more expanded) that people
  579. will use their own parsers for these logfiles. Well, if you respect those 3
  580. rules, your parser will work on all future versions of Sniffit.
  581.  
  582.  
  583. 5. IMPORTANT NOTES, READ!
  584. -------------------------
  585.  
  586. First of all, some stuff people who use this program should already know, 
  587. if you don't, well here ya got it:
  588.  
  589. Some other notes:
  590.  
  591.   - Sniffers can only be run by ROOT
  592.   - Sniffers can only log packets that 'travel' on THEIR ethernetcable.
  593.     So there has to be some host on your subnet involved (either as 
  594.     sender or receiver).
  595.   - Working with '-d' or '-a' give you raw packets, they are still 
  596.     packed in IP, when logging to files, only send data is logged, 
  597.     the packets are 'unwrapped'.
  598.   - Sniffers can not be detected from the outside (look below for note on 
  599.     harddisk).
  600.     Some people pretend that tcp wrappers and stuff can detect sniffers, 
  601.     well that's bullshit. Sniffers are just 'sitting' on the line and 
  602.     reading what is passing anyway, they don't DO anything, they just watch.
  603.     They can be detected:
  604.       - In the processlist (ps -augwx)
  605.       - When the harddisklight flashes a lot, people can suspect something
  606.         Also harddisks can make a lot of noice, but these sympthomes are 
  607.         only payed attention to in hostile environments.
  608.    - (LINUX) Your KERNEL should support System V IPC. If you will use '-i'
  609.  
  610.  
  611. 6. BUGFIXES
  612. -----------
  613.  
  614. (PRIOR TO 0.2.0 - some are LINUX only)
  615.    - Kernel 1.2.(some) incompatibility should be fixed. (like 1.2.5)
  616.      (all credit for that to Godmar Back)
  617.    - logging connections with lots of data is okay too now.
  618.      'the integer that needed to be a long'-bug. 
  619.      It was an overflow prob.
  620.    - off course there are always minor ameliorations not worth mentioning
  621.  
  622. (SINCE 0.2.0)
  623.    - MAXCOUNT bug 
  624.    - interactive part lock-up bugs
  625.    - output format 
  626.  
  627. (SINCE 0.3.0)
  628.    - a wildcard bug
  629.    - a Makefile bug (nothing important)
  630.  
  631. (SINCE 0.3.1)
  632.    - a typo caused the screwing up of the wildcard option (0.3.1)
  633.    - 'select from host' didn't work...
  634.  
  635. (SINCE 0.3.2)
  636.    - a functions that had a parameter missing.
  637.    - all interactive mode problems.
  638.  
  639. (SINCE 0.3.3)
  640.    - Interactive mode, with non-color-modes.
  641.    - External program firing...
  642.  
  643. (SINCE 0.3.4)
  644.    - Interactive mode NON-IP packet detection.
  645.    - errorhandeling starting of external programs from interface
  646.    - various improvements for the porting (thx, beta-testers)
  647.  
  648. 7. NEW STUFF
  649. ------------
  650.  
  651. V.0.1.0
  652.    - First test of the ncurses interface (never use this version, it's 
  653.      megaslow)
  654.  
  655. V.0.1.1
  656.    - Added '-x' for extra information on TCP packets
  657.    - Added '-A <char>' for you 'password-horny-dudes' ;)  
  658.    - beginning of ICMP support ('-P <protocol>')
  659.    - First 'real' test for the interface
  660.  
  661. V.0.1.2
  662.    - IP debugging info
  663.    - UDP support
  664.    - extended ICMP info (almost complete....)
  665.    - logging on another terminal
  666.  
  667. V.0.2.0
  668.    - SUN port (I now hate SPARC's ;)
  669.  
  670. V.0.2.1
  671.    - SGI port
  672.  
  673. V.0.2.2
  674.    - Netload statistics (interactive part)
  675.    - Massive debugging of interactive part 
  676.  
  677. V.0.3.0
  678.    - Wildcards in non-interactive mode
  679.    - time-out in non interactive mode, so you won't stuff memory by 
  680.      connections that weren't closed like they're supposed to be. 
  681.    - Forcing the use of a snif device
  682.    - MTU changeble in config.h
  683.    - ppp use 
  684.  
  685. V.0.3.1
  686.    - Flexible network trafic selection with config file.
  687.  
  688. V.0.3.2
  689.    - IP checksum check
  690.    - First introduction of a logfile for monitoring
  691.    - Adding of loglevel: 1, 10, 12
  692.  
  693. V.0.3.3
  694.    - rewrite of some parts (big clean-up of interactive part)
  695.    - Auto adjusting to screen of interface
  696.    - Starting of external programs from interface
  697.  
  698. V.0.3.4 (Beta)/V.0.3.5
  699.    - Use of Autoconf
  700.    - Upgrade of Libpcap to 0.3
  701.    - Added Packet generation
  702.    - Added UDP selectivity
  703.    - Added "plugins"
  704.  
  705. ------------------------ Thx for using Sniffit(tm) ---------------------------
  706.  
  707.