Home | History | Annotate | Line # | Download | only in ipsd
      1 
      2 IP Scan Detetor.
      3 ----------------
      4 
      5 This program is designed to be a passive listener for TCP packets sent to
      6 the host.  It does not exercise the promiscous mode of interfaces.  For
      7 routing Unix boxes (and firewalls which route/proxy) this is sufficient to
      8 detect all packets going to/through them.
      9 
     10 Upon compiling, a predefined set of "sensitive" ports are configured into
     11 the program.  Any TCP packets which are seen sent to these ports are counted
     12 and the IP# of the sending host recorded, along with the time of the first
     13 packet to that port for that IP#.
     14 
     15 After a given number of "hits", it will write the current table of packets
     16 out to disk.  This number defaults to 10,000.
     17 
     18 To analyze the information written to disk, a sample program called "ipsdr"
     19 is used (should but doesn't implement a tree algorithm for storing data)
     20 which  reads all log files it recognises and totals up the number of ports
     21 each host hit.  By default, all ports have the same weighting (1).  Another
     22 group of passes is then made over this table using a netmask of 0xfffffffe,
     23 grouping all results which fall under the same resulting IP#.  This netmask
     24 is then shrunk back to 0, with a output for each level given.  This is aimed
     25 at detecting port scans done from different hosts on the same subnet (although
     26 I've not seen this done, if one was trying to do it obscurely...)
     27 
     28 Lastly, being passive means that no action is taken to stop port scans being
     29 done or discourage them.
     30 
     31 Darren
     32 darrenr (a] pobox.com
     33