home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / pcroute / analyzer / analyzer.doc.Z / analyzer.doc
Encoding:
Text File  |  1992-02-09  |  7.4 KB  |  155 lines

  1.  
  2.                     A Trivial Ethernet Analyzer
  3.                            Vance Morrison
  4.  
  5.  
  6.     Very often a network administrator has to debug networking problems
  7. given only the raw symptoms of the problem (my program hangs).  Trying
  8. to debug given such sparse information is difficult at best and impossible
  9. at worst.  Often the ability to 'snoop' on the network and watch the 
  10. packet dialog is VERY helpful.  Basically I have written a program
  11. called 'analyzer' that watches packets go by on the network and prints
  12. them out in a human readable form.   At present, this program only 
  13. understands TCP/IP protocols (and not all of them), and for security
  14. reasons analyzer only prints what it understands.  Thus at least at
  15. present, analyzer will not help with DECNET, XNS, ETHERTALK traffic.
  16.  
  17. WHAT YOU NEED
  18.  
  19.     In addition to the analyzer.exe executable (available from 
  20. accuvax.nwu.edu (129.105.49.1) in pub/pcroute/analyzer), you will also 
  21. need a PC with a network card, as well as the clarkson packet driver for 
  22. that  card.  The clarkson packet driver is a piece of software that allows
  23. analyzer.exe (as well as other programs) to access the network card in
  24. a device independent way.  A driver exists for most of the common networking
  25. cards, and is available (among other places)  sun.soe.clarkson.edu 
  26. (128.153.12.3) in the directory 'pub/packet-drivers'.  Note that some
  27. packet drivers do not support 'promiscuous' mode (in particular I know the
  28. ni5010 does not).  In that case analyzer.exe will work, but will not be
  29. of much use (since it will only see packets destined for the itself and
  30. the broadcast address).  I do know that the wd8003e driver DOES work.
  31.  
  32. RUNNING THE SOFTWARE
  33.  
  34.     Before you can run analyzer.exe, you must first load the packet driver.
  35. This is usually just executing the driver command with arguments that
  36. tell it about the networking card.  Note that analyzer.exe is pretty dumb
  37. and always expects the driver to be accessible though interrupt 60H.  This
  38. is the default, and the driver will usually tell you where it installed
  39. itself, so if it is not 60H, analyzer.exe will not work.
  40.  
  41.     The syntax for the analyzer command is simple, namely.
  42.  
  43.             analyzer <ethernet address 1> <ethernet address 2> ...
  44.  
  45.     That is you simply run the command with the ethernet addresses that
  46. you are interested in seeing.  Up to 10 addresses can be given.  Analyzer 
  47. will then ONLY print those packets whose source or destination match one 
  48. of the given ethernet addresses. For example the command
  49.  
  50.             analyzer 0:0:C0:EF:12:34  FFFFFFFFFFFF
  51.  
  52. will print only packets from the broadcast address or to/from the address
  53. 0:0:C0:EF:12:34.  Notice that the colons in the ethernet addresses are 
  54. optional.
  55.  
  56. If not ethernet addresses are given then analyzer will try to print EVERY
  57. packet.  If the network is at all busy, analyzer will not be able to keep
  58. up and packets will undoubtedly be lost, but sometimes you don't care.
  59. Analyzer does buffer 16 packets (at interrupt level), so even if you freeze
  60. the screen, analyzer will probably capture the next 16 packets correctly.
  61.  
  62. To stop analyzer simply press the <ESC> key.  Also you you want to place
  63. the data in a file instead of on the screen, simply redirect the output
  64. like in the following example.
  65.  
  66.             analyzer FFFFFFFFFFFF > analyzer.out
  67.  
  68.  
  69. FINDING OUT ETHERNET ADDRESSES
  70.  
  71. You undoubtedly do not know the ethernet address of your hosts off the top
  72. of your head.  If you have a unix system on you net, you can use the 'arp'
  73. command to display the IP - Ethernet address translation.  Often, however,
  74. it is easier to simply to run analyzer without argument and then look at
  75. the packets.  Each IP packet will have its source IP address as well as
  76. the source ethernet address in the packet and IF that IP host is on the 
  77. local net, then you have just found out its ethernet address.
  78.  
  79. SHORTCOMINGS
  80.  
  81. Admittedly, analyzer is not a very flexible program.  The philosophy here
  82. is that something is a LOT better than nothing, and once you have the
  83. output as ASCII output it can be filtered and beautified to your hearts
  84. content.  For example, if you have a batch editor (like sed), you can
  85. do a global search an substitute to replace ethernet addresses with a
  86. more mnemonic one.   Also, I did NOT what to spend a lot of time on this,
  87. analyzer in its present form is about 3 days work.
  88.  
  89. SECURITY ISSUES
  90.  
  91. In an ideal network, it shouldn't matter that a program like analyzer
  92. exists.  However, life is not ideal, and passwords and other sensitive
  93. data are routinely sent in unencrypted form across nets.    I have therefore
  94. gone to a little trouble to make analyzer 'safe'.  It only prints out
  95. parts of packets that should not contain sensitive data.   While this is
  96. not foolproof, I believe is does open any security loophole any wider
  97. than it already is (which is actually pretty wide).  
  98.  
  99. EXTENSIONS
  100.  
  101. Usually I provide the source code to my work so that if anyone wants
  102. to make extensions they can do it themselves (and not bother me).  In
  103. the case of analyzer, this would be particularly nice since analyzer
  104. does not print (in any form) what it does not know, and analyzer is
  105. a pretty ignorant program (:-).  Unfortunately releasing source would
  106. be a security problem, since it would be VERY easy to modify analyzer
  107. to do mischief.  Thus I propose a compromise.  If analyzer does not
  108. print output packets that you want to see, simply write some C code
  109. that takes a pointer to that packet and prints it out.  I have included
  110. the file 'ip.c' in the distribution to give you an example of how to
  111. do it.  If you send this file to me, I will look it over for security
  112. holes, compile it, and send you an executable.  This arrangement is
  113. less than perfect, but it will give you an option if you wish to exercise
  114. it.
  115.  
  116. INFO ON NETWORKING PROTOCOLS
  117.  
  118. In order to understand analyzers output, you need to understand the
  119. meanings of fields in the packets.  Please don't ask me.  For the
  120. beginner there are a variety of good books on TCP and networking in
  121. general.  Douglas Comer's "internetworking with TCP/IP" is good for
  122. beginners to the TCP/IP world.  After that, the RFC's are the place
  123. to look.  They are available among other places nic.ddn.mil (10.1.1.51)
  124. and merit.edu (35.1.1.42).  
  125.  
  126. BUGS ETC
  127.  
  128. Basically, I want to spend little/no time supporting analyzer.  Thus
  129. if the bug requires debugging effort, or a non-trivial amount of time
  130. to fix, write it yourself.  Thus if analyzer does not work with your
  131. particularly PC/packet-driver I don't want to hear about it.  I don't
  132. mean to sound harsh, but there is only one of me, and many of you, and
  133. frankly I have better things to do.  I released analyzer in the first
  134. place because I believe it will be useful to people.
  135.  
  136. COPYRIGHT
  137.  
  138. Please notice the copyright.  This is shareware.  You are allowed to
  139. use this software on a trial basis for one month.  If after that time
  140. you find analyzer and wish to keep using it, send a $10 registration
  141. fee to the address below.  If you send me an Internet E-mail address
  142. along with your registration fee, I will give you my E-mail address,
  143. and will notify you via E-mail of updates to analyzer.   Just for your
  144. information, this fee will go toward a fund for purchasing LAN cards
  145. and other hardware I need in order to continue to write/debug neat
  146. code like analyzer.  
  147.  
  148. The above payment requirement expires AUGUST 1993.  After that time
  149. you may use analyzer without registration. 
  150.  
  151.  
  152.                 Vance Morrison
  153.                 301 E. White St  Apt 4.
  154.                 Champaign, Il.  61820
  155.