home *** CD-ROM | disk | FTP | other *** search
-
- A Trivial Ethernet Analyzer
- Vance Morrison
-
-
- Very often a network administrator has to debug networking problems
- given only the raw symptoms of the problem (my program hangs). Trying
- to debug given such sparse information is difficult at best and impossible
- at worst. Often the ability to 'snoop' on the network and watch the
- packet dialog is VERY helpful. Basically I have written a program
- called 'analyzer' that watches packets go by on the network and prints
- them out in a human readable form. At present, this program only
- understands TCP/IP protocols (and not all of them), and for security
- reasons analyzer only prints what it understands. Thus at least at
- present, analyzer will not help with DECNET, XNS, ETHERTALK traffic.
-
- WHAT YOU NEED
-
- In addition to the analyzer.exe executable (available from
- accuvax.nwu.edu (129.105.49.1) in pub/pcroute/analyzer), you will also
- need a PC with a network card, as well as the clarkson packet driver for
- that card. The clarkson packet driver is a piece of software that allows
- analyzer.exe (as well as other programs) to access the network card in
- a device independent way. A driver exists for most of the common networking
- cards, and is available (among other places) sun.soe.clarkson.edu
- (128.153.12.3) in the directory 'pub/packet-drivers'. Note that some
- packet drivers do not support 'promiscuous' mode (in particular I know the
- ni5010 does not). In that case analyzer.exe will work, but will not be
- of much use (since it will only see packets destined for the itself and
- the broadcast address). I do know that the wd8003e driver DOES work.
-
- RUNNING THE SOFTWARE
-
- Before you can run analyzer.exe, you must first load the packet driver.
- This is usually just executing the driver command with arguments that
- tell it about the networking card. Note that analyzer.exe is pretty dumb
- and always expects the driver to be accessible though interrupt 60H. This
- is the default, and the driver will usually tell you where it installed
- itself, so if it is not 60H, analyzer.exe will not work.
-
- The syntax for the analyzer command is simple, namely.
-
- analyzer <ethernet address 1> <ethernet address 2> ...
-
- That is you simply run the command with the ethernet addresses that
- you are interested in seeing. Up to 10 addresses can be given. Analyzer
- will then ONLY print those packets whose source or destination match one
- of the given ethernet addresses. For example the command
-
- analyzer 0:0:C0:EF:12:34 FFFFFFFFFFFF
-
- will print only packets from the broadcast address or to/from the address
- 0:0:C0:EF:12:34. Notice that the colons in the ethernet addresses are
- optional.
-
- If not ethernet addresses are given then analyzer will try to print EVERY
- packet. If the network is at all busy, analyzer will not be able to keep
- up and packets will undoubtedly be lost, but sometimes you don't care.
- Analyzer does buffer 16 packets (at interrupt level), so even if you freeze
- the screen, analyzer will probably capture the next 16 packets correctly.
-
- To stop analyzer simply press the <ESC> key. Also you you want to place
- the data in a file instead of on the screen, simply redirect the output
- like in the following example.
-
- analyzer FFFFFFFFFFFF > analyzer.out
-
-
- FINDING OUT ETHERNET ADDRESSES
-
- You undoubtedly do not know the ethernet address of your hosts off the top
- of your head. If you have a unix system on you net, you can use the 'arp'
- command to display the IP - Ethernet address translation. Often, however,
- it is easier to simply to run analyzer without argument and then look at
- the packets. Each IP packet will have its source IP address as well as
- the source ethernet address in the packet and IF that IP host is on the
- local net, then you have just found out its ethernet address.
-
- SHORTCOMINGS
-
- Admittedly, analyzer is not a very flexible program. The philosophy here
- is that something is a LOT better than nothing, and once you have the
- output as ASCII output it can be filtered and beautified to your hearts
- content. For example, if you have a batch editor (like sed), you can
- do a global search an substitute to replace ethernet addresses with a
- more mnemonic one. Also, I did NOT what to spend a lot of time on this,
- analyzer in its present form is about 3 days work.
-
- SECURITY ISSUES
-
- In an ideal network, it shouldn't matter that a program like analyzer
- exists. However, life is not ideal, and passwords and other sensitive
- data are routinely sent in unencrypted form across nets. I have therefore
- gone to a little trouble to make analyzer 'safe'. It only prints out
- parts of packets that should not contain sensitive data. While this is
- not foolproof, I believe is does open any security loophole any wider
- than it already is (which is actually pretty wide).
-
- EXTENSIONS
-
- Usually I provide the source code to my work so that if anyone wants
- to make extensions they can do it themselves (and not bother me). In
- the case of analyzer, this would be particularly nice since analyzer
- does not print (in any form) what it does not know, and analyzer is
- a pretty ignorant program (:-). Unfortunately releasing source would
- be a security problem, since it would be VERY easy to modify analyzer
- to do mischief. Thus I propose a compromise. If analyzer does not
- print output packets that you want to see, simply write some C code
- that takes a pointer to that packet and prints it out. I have included
- the file 'ip.c' in the distribution to give you an example of how to
- do it. If you send this file to me, I will look it over for security
- holes, compile it, and send you an executable. This arrangement is
- less than perfect, but it will give you an option if you wish to exercise
- it.
-
- INFO ON NETWORKING PROTOCOLS
-
- In order to understand analyzers output, you need to understand the
- meanings of fields in the packets. Please don't ask me. For the
- beginner there are a variety of good books on TCP and networking in
- general. Douglas Comer's "internetworking with TCP/IP" is good for
- beginners to the TCP/IP world. After that, the RFC's are the place
- to look. They are available among other places nic.ddn.mil (10.1.1.51)
- and merit.edu (35.1.1.42).
-
- BUGS ETC
-
- Basically, I want to spend little/no time supporting analyzer. Thus
- if the bug requires debugging effort, or a non-trivial amount of time
- to fix, write it yourself. Thus if analyzer does not work with your
- particularly PC/packet-driver I don't want to hear about it. I don't
- mean to sound harsh, but there is only one of me, and many of you, and
- frankly I have better things to do. I released analyzer in the first
- place because I believe it will be useful to people.
-
- COPYRIGHT
-
- Please notice the copyright. This is shareware. You are allowed to
- use this software on a trial basis for one month. If after that time
- you find analyzer and wish to keep using it, send a $10 registration
- fee to the address below. If you send me an Internet E-mail address
- along with your registration fee, I will give you my E-mail address,
- and will notify you via E-mail of updates to analyzer. Just for your
- information, this fee will go toward a fund for purchasing LAN cards
- and other hardware I need in order to continue to write/debug neat
- code like analyzer.
-
- The above payment requirement expires AUGUST 1993. After that time
- you may use analyzer without registration.
-
-
- Vance Morrison
- 301 E. White St Apt 4.
- Champaign, Il. 61820
-