1.2.3. Microsoft Windows ... 5 1.3. Where to get Ethereal? ... 6 1.4. A rose by any other name ... 7 1.5. A brief history of Ethereal ... 8 1.6. Development and maintenance of Ethereal ... 9 1.7. Reporting problems and getting help ...10 1.7.1.
Page 6
B. Protocols and Protocol Fields ... 162 C. Related command line tools ... 163 C.1. Introduction ... 163 C.2. tcpdump: Capturing with tcpdump for viewing with Ethereal ... 164 C.3. tethereal: Terminal-based Ethereal ... 165 C.4. capinfos: Print information about capture files ... 166...
Page 7
C.8.1. What is it? ... 176 C.8.2. Why do this? ... 176 C.8.3. How to use idl2eth ... 176 C.8.4. TODO ... 177 C.8.5. Limitations ... 178 C.8.6. Notes ... 178 D. This Document's License (GPL) ... 180 Ethereal User's Guide...
Preface 1. Foreword Ethereal is one of those programs that many network managers would love to be able to use, but they are often prevented from getting what they would like from Ethereal because of the lack of documentation. This document is part of an effort by the Ethereal team to improve the usability of Ethereal.
Ethereal Wiki at http://wiki.ethereal.com By reading this book, you will learn how to install Ethereal, how to use the basic elements of the graphical user interface (like the menu) and what's behind some of the advanced features that are maybe not that obvious at first sight. It will hopefully guide you around some common problems...
3. Acknowledgements The authors would like to thank the whole Ethereal team for their assistance. In particular, the au- thors would like to thank: • Gerald Combs, for initiating the Ethereal project and funding to do this documentation. • Guy Harris, for many helpful hints and a great deal of patience in reviewing this document.
This is a note! A note will point you to common mistakes and things that might not be obvious. This is a tip! Tips will be helpful for your everyday work using Ethereal. Preface Richard Sharpe with funds provided from the Ethereal Fund.
5. Where to get the latest copy of this document? The latest copy of this documentation can always be found at: #usersguide. Preface http:/ / www.ethereal.com/ docs/...
Preface 6. Providing feedback about this document Should you have any feedback about this document, please send them to the authors through ethere- al-dev[AT]ethereal.com. xiii...
Chapter 1. Introduction 1.1. What is Ethereal? Ethereal is a network packet analyzer. A network packet analyzer will try to capture network pack- ets and tries to display that packet data as detailed as possible. You could think of a network packet analyzer as a measuring device used to examine what's going on inside a network cable, just like a voltmeter is used by an electrician to examine what's going on inside an electric cable (but at a higher level, of course).
1.1.4. Import files from many other capture programs Ethereal can open packets captured from a large number of other capture programs. For a list of in- put formats see Section 5.2.2, “Input File 1.1.5.
In addition, all source code is freely available under the GPL. Because of that, it is very easy for people to add new protocols to Ethereal, either as plugins, or built into the source, and they often do! 1.1.8.
1.2. Platforms Ethereal runs on Ethereal currently runs on most UNIX platforms and various Windows platforms. It requires GTK+, GLib, libpcap and some other libraries in order to run. If a binary package is not available for your platform, you should download the source and try to build it.
• Windows 95 is no longer actively maintained by WinPcap, but still may work perfectly No experiences (fresh versions): • Windows XP 64-bit Edition • Windows Vista (aka Longhorn) Please provide your experiences about these fresh versions to: ethereal-dev[AT]ethereal.com. Introduction...
A new Ethereal version will typically become available every 4-8 weeks. If you want to be notified about new Ethereal releases, you should subscribe to the ethereal-an- nounce mailing list. You will find more details in Section 1.7.4, “Mailing...
William Shakespeare wrote: "A rose by any other name would smell as sweet." And so it is with Ethereal, as there appears to be two different ways that people pronounce the name. Some people pronounce it ether-real, while others pronounce it e-the-real, as in ghostly, insubstan- tial, etc.
So he started contributing dissectors and contributing patches. The list of people who have contributed to Ethereal has become very long since then, and almost all of them started with a protocol that they needed that Ethereal did not already handle. So they copied...
Ethereal Ethereal was initially developed by Gerald Combs. Ongoing development and maintenance of Eth- ereal is handled by the Ethereal team, a loose group of individuals who fix bugs and provide new functionality. There have also been a large number of people who have contributed protocol dissectors to Ethereal, and it is expected that this will continue.
1.7. Reporting problems and getting help If you have problems, or need help with Ethereal, there are several places that may be of interest to you (well, beside this guide of course). 1.7.1. Website You will find lot's of useful information on the Ethereal homepage at http://www.ethereal.com.
Ethereal. When reporting problems with Ethereal, it is helpful if you supply the following information: The version number of Ethereal and the dependent libraries linked with it, eg GTK+, etc. You can obtain this with the command ethereal -v.
The Windows distributions don't contain the symbol files (.pdb), because they are very large. For this reason it's not possible to create a meaningful backtrace file from it. You should report your crash just like other problems, using the mechanism described above. Introduction ethereal-dev[AT]ethereal.com mailing list.
Chapter 2. Building and Installing Ethereal 2.1. Introduction As with all things, there must be a beginning, and so it is with Ethereal. To use Ethereal, you must: • Obtain a binary package for your operating system, or • Obtain the source and build Ethereal for your operating system.
Once you have downloaded the relevant files, you can go on to the next step. Note! While you will find a number of binary packages available on the Ethereal web site, you might not find one for your platform, and they often tend to be several versions behind the current released version, as they are contributed by people who have the platforms they are built for.
2.3. Before you build Ethereal under UNIX Before you build Ethereal from sources, or install a binary package, you must ensure that you have the following other packages installed: • GTK+, The GIMP Tool Kit. You will also need Glib. Both can be obtained from •...
Page 31
Building and Installing Ethereal “Building and installing libpcap” support tcpdump, you might also want to download it from the Example 2.2. Building and installing libpcap gzip -dc libpcap-0.8.3.tar.Z | tar xvf - <much output removed> cd libpcap_0_8_3 ./configure <much output removed>...
Page 32
If you are using a version of RedHat later than 6.2, the required RPMs have most likely changed. Simply use the correct RPMs from your distribution. Under Debian you can install Ethereal using apt-get. apt-get will handle any dependency issues for you.
2.4. Building Ethereal from source under UNIX Use the following general steps if you are building Ethereal from source under a UNIX operating system: Unpack the source from its gzip'd tar file. If you are using Linux, or your version of UNIX uses GNU tar, you can use the following command: tar zxvf ethereal-0.10.12-tar.gz...
Page 34
Building and Installing Ethereal Once you have installed Ethereal with make install above, you should be able to run it by entering ethereal.
Ethereal binary package, while under Tru64 UNIX (formerly Digital UNIX) you would use setld. 2.5.1. Installing from rpm's under RedHat and alike Use the following command to install the Ethereal RPM that you have downloaded from the Ethere- al web site: rpm -ivh ethereal-0.10.5-0.2.2.i386.rpm...
This can be resolved by downloading a recent version of sed from ory.fsf.org/GNU/sed.html. If you cannot determine what the problems are, send mail to the ethereal-dev mailing list explain- ing your problem, and including the output from config.log and anything else you think is rel- evant, like a trace of the make stage.
It is recommended to use the binary installer for Windows, until you want to start developing Ether- eal on the Windows platform. For further information how to build Ethereal for Windows from the sources, have a look at the De- velopment Wiki: http://wiki.ethereal.com/Development...
Ethereal installer, so you don't need to download and install two separate packages any longer! 2.8.1.1. Command line options You can simply start the Ethereal installer without any command line parameters, it will show you the usual interactive installer. There are some command line parameters available: •...
• Etheral GTK1 - Ethereal is a GUI network protocol analyzer. • Etheral GTK2 - Ethereal is a GUI network protocol analyzer (using the modern GTK2 GUI toolkit, recommended). • GTK-Wimp - GTKWimp is the GTK2 windows impersonator (native Win32 look and feel, re- commended).
Windows systems, including 9x/Me/NT4.0/2000/XP. 2.8.3. Update Ethereal From time to time you may want to update your installed Ethereal to a more recent version. If you join Ethereal's announce mailing list, you will be informed about new Ethereal versions, see tion 1.7.4, “Mailing Lists”...
2.8.6. Uninstall WinPcap You can uninstall WinPcap independantly of Ethereal, using the "WinPcap" entry in the "Add or Remove Programs" of the Control Panel. Note! After uninstallation of WinPcap you can't capture anything with Ethereal. It might be a good idea to reboot Windows afterwards.
Chapter 3. User Interface 3.1. Introduction By now you have installed Ethereal and are most likely keen to get started capturing your first pack- ets. In the next chapters we will explore: • How the Ethereal user interface works •...
Note! In the following chapters, a lot of screenshots from Ethereal will be shown. As Ethere- al runs on many different platforms and there are different versions of the underlying GUI toolkit (GTK 1.x / 2.x) used, your screen might look different from the provided screenshots.
(how to do this will be described later). Figure 3.1. The Main window Ethereal's main window consist of parts that are commonly known from many other GUI programs. The menu (see Section 3.4, “The...
Page 46
User Interface current program state and the captured data. Tip! The layout of the main window can be customized by changing preference settings. Section 9.5, “Preferences” for details!
3.4. The Menu The Ethereal menu sits on top of the Ethereal window. An example is shown in Menu”. Note! Menu items will be greyed out if the corresponding feature isn't available. For ex- ample, you cannot save a capture file if you didn't capture or load any data before.
3.5. The "File" menu The Ethereal file menu contains the fields shown in Figure 3.3. The "File" Menu Table 3.1. File menu items Menu Item Accelerator Open... Ctrl+O Open Recent Merge... Close Ctrl+W ------ User Interface Table 3.1, “File menu...
Page 49
This menu item allows you to export all, or some, of the packets in the capture file to a plain ASCII text file. It pops up the Ethereal Export dia- log box (which is discussed further in Plain Text File"...
Page 50
Section 5.6.5, “The "Export as PDML File" dialog This menu item allows you to export the currently selected bytes in the packet bytes pane to a binary file. It pops up the Ethereal Export dialog box (which is discussed further in packet bytes"...
3.6. The "Edit" menu The Ethereal Edit menu contains the fields shown in Figure 3.4. The "Edit" Menu Table 3.2. Edit menu items Menu Item Accelerator Find Packet... Ctrl+F Find Next Ctrl+N Find Previous Ctrl+B ------ Time Reference Ctrl+T > Set Time Ref-...
Page 52
This menu item brings up a dialog box that allows you to set preferences for many parameters that control Ethereal. You can also save your prefer- ences so Ethereal will use them the next time you start it. More detail is provided in Section 9.5,...
3.7. The "View" menu The Ethereal View menu contains the fields shown in Figure 3.5. The "View" Menu Table 3.3. View menu items Menu Item Accelerator Main Toolbar Filter Toolbar Statusbar ------ Packet List Packet Details User Interface Table 3.3, “View menu...
Page 54
The fields "Time of Day", "Date and Time of Day", "Seconds Since Beginning of Capture" and "Seconds Since Previous Packet" are mutually exclusive. Selecting this tells Ethereal to display the time stamps in date and time of day format, see Section 6.9, “Time display formats and time...
Page 55
This menu item expands the currently selected subtree in the packet de- tails tree. Ethereal keeps a list of all the protocol subtrees that are expanded, and uses it to ensure that the correct subtrees are expanded when you display a packet.
3.8. The "Go" menu The Ethereal Go menu contains the fields shown in Figure 3.6. The "Go" Menu Table 3.4. Go menu items Menu Item Accelerator Back Alt+Left Forward Alt+Right Go to Packet... Ctrl-G Go to Corres- ponding Packet ------...
Page 57
Menu Item Accelerator Last Packet User Interface Description Jump to the last packet of the capture file.
3.9. The "Capture" menu The Ethereal Capture menu contains the fields shown in Figure 3.7. The "Capture" Menu Table 3.5. Capture menu items Menu Item Accelerator Interfaces... Options... Ctrl+K Start Stop Ctrl+E Restart User Interface Table 3.5, “Capture menu Description...
Page 59
Menu Item Accelerator Capture Fil- ters... User Interface Description This menu item brings up a dialog box that allows you to create and edit capture filters. You can name filters, and you can save them for future use. More detail on this subject is provided in saving filters”...
3.10. The "Analyze" menu The Ethereal Analyze menu contains the fields shown in Figure 3.8. The "Analyze" Menu Table 3.6. Analyze menu items Menu Item Accelerator Display Fil- ters... Apply as Filter > ... Prepare a Fil- ter > ...
Page 61
This menu item allows the user to enable/disable protocol dissectors, see Section 9.4.1, “The "Enabled Protocols" dialog box” This menu item allows the user to force Ethereal to decode certain pack- ets as a particular protocol, see Section 9.4.2, “User Specified Decodes”...
3.11. The "Statistics" menu The Ethereal Statistics menu contains the fields shown in Figure 3.9. The "Statistics" Menu All menu items will bring up a new window showing specific statistical information. Table 3.7. Statistics menu items Menu Item Accelerator Summary...
Page 63
Menu Item Accelerator ------ Conversation List Endpoint List Service sponse Time ------ ANSI H.225... ISUP Message Types MTP3 SCTP VoIP Calls... WAP-WSP... ------ BOOTP-DHCP HTTP ISUP Messages ONC-RPC Pro- grams Stream Graph User Interface Description Display a list of conversations, obsoleted by the combined window of Conversations above, see Section 8.5.3, “The protocol specific "Conversa- tion List"...
This menu item starts a Web browser showing the chosen webpage from: http://www.ethereal.com. This menu item brings up an information window that provides some in- formation on Ethereal, such as the plugins, the used folders, ... items”.
Page 65
User Interface Note! Calling a Web browser might be unsupported in your version of Ethereal. If this is the case, the corresponding menu items will be hidden. Note! If calling a Web browser fails on your machine, maybe because just nothing happens or the browser is started but no page is shown, have a look at the webbrowser setting in the preferences dialog.
3.13. The "Main" toolbar The main toolbar provides quick access to frequently used items from the menu. This toolbar cannot be customized by the user, but it can be hidden using the View menu, if the space on the screen is needed to show even more packet data.
Page 67
This item allows you to reload the current capture file. This item allows you to print all (or some of) the packets in the capture file. It pops up the Ethereal Print dialog box (which is discussed further in packets”).
Page 68
This item brings up a dialog box that allows you to set prefer- ences for many parameters that control Ethereal. You can also save your preferences so Ethereal will use them the next time you start it. More detail is provided in “Preferences”...
3.14. The "Filter" toolbar The filter toolbar lets you quickly edit and apply display filters. More information on display filters is available in Section 6.2, “Filtering packets while Figure 3.12. The "Filter" toolbar • The leftmost button labeled "Filter:" can be clicked to bring up the filter construction dialog, de- scribed in Figure 6.8, “The "Capture Filters"...
"Packet Details" and "Packet Bytes" panes. While dissecting a packet, Ethereal will place information from the protocol dissectors into the columns. As higher level protocols might overwrite information from lower levels, you will typic- ally see the information from the highest possible level only.
[SEQ/ACK analysis] fields of the TCP protocol. • Links If Ethereal detected a relationship to another packet in the capture file, it will generate a link to that packet. Links are underlined and displayed in blue. If double-clicked, Ethereal jumps to the corresponding packet.
"Packet Bytes" pane”. Depending on the packet data, sometimes more than one page is available, e.g. when Ethereal has reassembled some packets into a single chunk of data, see this case there are some additional tabs shown at the bottom of the pane to let you select the page you want to see.
Figure 3.17. The initial Statusbar This statusbar is shown while no capture file is loaded, e.g. when Ethereal is started. Figure 3.18. The Statusbar with a loaded capture file The left side shows information about the capture file, its name, its size and the elapsed time while it was being captured.
Chapter 4. Capturing Live Network Data 4.1. Introduction Capturing live network data is one of the major features of Ethereal. The Ethereal capture engine provides the following features: • Capture from different kinds of network hardware (Ethernet, Token Ring, ATM, ...).
4.2. Prerequisites Setting up Ethereal to capture packets for the first time can be tricky. Tip! A comprehensive guide "How To setup a Capture" is available at: tp://wiki.ethereal.com/CaptureSetup. Here are some common pitfalls: • You need to have root / Administrator privileges to start a live capture.
" Capture Start" menu / toolbar item. The capture process will start immediately. • If you already know the name of the capture interface, you can start Ethereal from the command line and use the following: ethereal -i eth0 -k This will start Ethereal capturing on interface eth0, more details can be found at: “Start Ethereal from the command...
4.4. The "Capture Interfaces" dialog box When you select "Interfaces..." from the Capture menu, Ethereal pops up the "Capture Interfaces" dialog box as shown in Warning! As the "Capture Interfaces" dialog is showing live captured data, it is consuming a lot of system ressources.
4.5. The "Capture Options" dialog box When you select Start... from the Capture menu (or use the corresponding item in the "Main" tool- bar), Ethereal pops up the "Capture Options" dialog box as shown in tions" dialog box”. Figure 4.2. The "Capture Options" dialog box...
Page 80
Limit each packet to n bytes on interfaces that Ethereal has found on the system. It is a drop-down list, so simply click on the button on the right hand side and select the interface you want. It defaults to the first non-loopback interface that supports capturing, and if there are none, the first loopback interface.
It defaults to empty, or no filter. You can also click on the button labelled Capture Filter, and Ethereal will bring up the Capture Filters dialog box and al- low you to create and/or select a filter. Please see “Defining and saving filters”...
If you do not spe- live cap- cify this, Ethereal simply adds new packets onto the end of the list, but does not scroll ture the packet list pane. This option is greyed out if "Update list of packets in real time"...
While capturing, the underlying libpcap capturing engine will grab the packets from the network card and keep the packet data in a (relatively) small kernel buffer. This data is read by Ethereal and saved into the capture file(s) the user specified.
Page 84
Capturing Live Network Data Multiple files, continuous Multiple files, ring buffer new capture file to a specific folder, choose this mode. Like the "Single named file" mode, but a new file is created and used, after reaching one of the multiple file switch condi- tions (one of the "Next file every ..."...
Capturing Live Network Data 4.7. Link-layer header type In the usual case, you won't have to choose this link-layer header type. The following paragraphs describe the exceptional cases, where selecting this type is possible, so you will have a guide what to do: If you are capturing on an 802.11 device on some versions of BSD, this might offer a choice of "Eth- ernet"...
You enter the capture filter into the Filter field of the Ethereal Capture Options dialog box, as shown Figure 4.2, “The "Capture Options" dialog tcpdump capture filter language. See the expression option at the tcpdump manual page for details: http://www.tcpdump.org/tcpdump_man.html.
Page 87
Capturing Live Network Data gateway host <host> [src|dst] net <net> [{mask <mask>}|{len <len>}] [tcp|udp] [src|dst] port <port> less|greater <length> ip|ether proto <protocol> ether|ip broadcast|multicast <expr> relop <expr> You can optionally include the keyword src|dst between the keywords ether and host to specify that you are only inter- ested in source or destination addresses.
4.9. While a Capture is running ... While a capture is running, the following dialog box is shown: Figure 4.3. The "Capture Info" dialog box This dialog box will inform you about the number of captured packets and the time since the capture was started.
Note! The Capture Info dialog box might be hidden, if the option "Hide capture info dialog" is used. Using the menu item "Capture/ Using the toolbar item " Pressing the accelerator keys: Ctrl+E. The capture will be automatically stopped, if one of the Stop Conditions is exceeded, e.g. the maximum amount of data was captured.
Chapter 5. File Input / Output and Printing 5.1. Introduction This chapter will describe input and output of capture data. • Open/Import capture files in various capture file formats • Save/Export capture files in various capture file formats • Merge capture files together •...
5.2. Open capture files Ethereal can read in previously saved capture files. To read them, simply select the menu or toolbar item: "File/ Open". Ethereal will then pop up the File Open dialog box, which is discussed in more detail in Section 5.2.1, “The "Open Capture File"...
Specify a display filter with the Filter button and filter field. This filter will be used when open- ing the new file. Clicking on the Filter button causes Ethereal to pop up the Filters dialog box (which is discussed further in Specify which name resolution is to be performed for all packets by clicking on one of the "En-...
Page 94
File Input / Output and Printing The following file formats from other capture tools can be opened by Ethereal: • libpcap, tcpdump and various other tools using tcpdump's capture format • Sun snoop and atmsnoop • Shomiti/Finisar Surveyor captures •...
“The "Save Capture File As" dialog box” Note Ethereal uses the open dialog box from the version of the GTK+ toolkit that it's using. This dialog was completely redesigned in the GTK version 2.4. Depending on the in- stalled GTK version, your dialog box might look different. However, as the functional- ity remains almost the same, much of this description will work with your version of Ethereal.
Page 96
File Input / Output and Printing With this dialog box, you can perform the following actions: Type in the name of the file you wish to save the captured packets in, as a standard file name in your file system. Select the directory to save the file into.
Use "Browse for other folders" to browse files and folders in your file system. Click on the Save button to accept your selected file and save to it. If Ethereal has a problem saving the captured packets to the file you specified, it will display an error dialog box. After clicking OK on this error dialog box, you can try again.
• Use drag-and-drop to drop multiple files on the main window. Ethereal will try to merge the packets in chronological order from the dropped files into a newly created temporary file. If you drop only a single file, it will simply replace a (maybe) existing one.
Page 99
File Input / Output and Printing Prepend packets to existing file Merge packets chronologically Append packets to existing file All other controls will work the same way as in the "Open Capture File" dialog box, see tion 5.2.1, “The "Open Capture File" dialog Prepend the packets from the selected file before the currently loaded packets.
This will only work, if all the files of the file set are located in the same directory. As it can become tedious to work with a file set by hand, Ethereal provides some features in the "File" menu to handle these file sets in a more convenient way: •...
5.6. Exporting data Ethereal provides several ways and formats to export packet data. This section describes general ways to export data from Ethereal. Note! There are more specialized functions to export specific data, which will be described at the appropriate places.
Tip! You can easily convert PostScript files to PDF files using ghostscript. For example: export to a file named foo.ps and then call: ps2pdf foo.ps Figure 5.5. The "Export as PostScript File" dialog box • Export to file: frame chooses the file to export the packet data to. •...
PDML file specification is available at: The PDML specification is not officially released and Ethereal's implementation of it is still in an early beta state, so please expect changes in future Ethereal versions. Figure 5.7. The "Export as PDML File" dialog box File Input / Output and Printing Section 5.8, “The Packet Range...
• Export to file: frame chooses the file to export the packet data to. • The Packet Range frame is described in There's no such thing as a packet details frame for PDML export, as the packet format is defined by the PDML specification.
Page 105
File Input / Output and Printing • Name: the filename to export the packet data to. • The Save in folder: field lets you select the folder to save to (from some predefined folders). • Browse for other folders provides a flexible way to choose a folder.
5.7. Printing packets To print packets, select the "Print..." menu item from the File menu. When you do this, Ethereal pops up the Print dialog box as shown in 5.7.1. The "Print" dialog box Figure 5.9. The "Print" dialog box...
Page 107
File Input / Output and Printing • Print command specifies that a command be used for printing. This field specifies the command to use for printing. It is typically lpr. You would change it to specify a particular queue if you need to print to a queue other than the default.
5.8. The Packet Range frame The packet range frame is a part of various output related dialog boxes. It provides options to select which packets should be processed by the output function. Figure 5.10. The "Packet Range" frame If the Captured button is set (default), all packets from the selected rule will be processed. If the Displayed button is set, only the currently displayed packets are taken into account to the selected rule.
5.9. The Packet Format frame The packet format frame is a part of various output related dialog boxes. It provides options to select which parts of a packet should be used for the output function. Figure 5.11. The "Packet Format" frame •...
Figure 6.1. Ethereal with a TCP packet selected for viewing You can also select and view packets the same way, while Ethereal is capturing, if you selected "Up- date list of packets in real time" in the Ethereal Capture Preferences dialog box.
Page 112
Expand all subtrees in all packets in the capture. View Ethereal keeps a list of all the protocol subtrees that are expanded, and uses it to ensure that the correct subtrees are expanded when you display a packet. This menu item collapses the tree view of all packets in the capture list.
Page 113
Item tail Decode As... Print... Show Packet in New Window Resolve name Corres- ponding Packet Copy Export Selected Packet Bytes... Figure 6.3. Pop-up menu of "Packet List" pane Working with captured packets Menu Description “Preferences”. Analyze File Print (the selected) packet(s). View Display the selected packet in another window.
Page 114
Working with captured packets Mark Packet (toggle) Time Reference Apply as Filter Prepare a Filter Follow TCP Stream Decode As... Print... Show Packet in New Window Figure 6.4. Pop-up menu of "Packet Details" pane This menu item is the same as the Edit menu item of the same name.
Page 115
This menu item expands all subtrees in all packets in the cap- ture. Ethereal keeps a list of all the protocol subtrees that are ex- panded, and uses it to ensure that the correct subtrees are ex- panded when you display a packet. This menu item collapses the tree view of all packets in the capture list.
Page 116
Working with captured packets Copy Export Selected Packet Bytes... Copy the selected packet data to the clipboard (XXX - in which format). This menu item is the same as the File menu item of the same name. It allows you to export raw packet bytes to a binary file.
... and a lot more! To select packets based on protocol type, simply type the protocol you are interested in in the Filter: field in the filter toolbar of the Ethereal window and press enter to initiate the filter. “Filtering on the TCP protocol”...
Page 118
You can filter on any protocol that Ethereal understands. You can also filter on any field that a dis- sector adds to the tree view, but only if the dissector has added an abbreviation for the field. A list of such fields is available in the Ethereal in the Add Expression...
6.3. Building display filter expressions Ethereal provides a simple but powerful display filter language that you can build quite complex fil- ter expressions with. You can compare values in packets as well as combine expressions into more specific expressions. The following sections provide more information on doing this.
IPX network number String (text) Double-precision floating point number 6.3.3. Combining expressions You can combine filter expressions in Ethereal using the logical operators shown in “Display Filter Logical Operations” Working with captured packets Table 6.3, “Display Filter Field Types” Example You can express integers in decimal, octal, or hexa- decimal.
Page 121
[...] Substring Operator Ethereal allows you to select subsequences of a sequence in rather elaborate ways. After a label you can place a pair of brackets [] containing a comma separated list of range specifiers. eth.src[0:3] == 00:00:83 The example above uses the n:m format to specify a single range.
This is equivalent to n:1. eth.src[0:3,1-2,:4,4:,2] == 00:00:83:00:83:00:00:83:00:20:20:83 Ethereal allows you to string together single ranges in a comma separated list to form compound ranges as shown above. 6.3.4. A common mistake Warning! Using the != operator on combined expressions like: eth.addr, ip.addr, tcp.port,...
When you are accustomed to Ethereal's filtering system and know what labels you wish to use in your filters it can be very quick to simply type a filter string. However if you are new to Ethereal or are working with a slightly unfamiliar protocol it can be very confusing to try to figure out what to type.
Page 124
Working with captured packets Value You may enter an appropriate value in the Value text box. The Value will also indicate the type of value for the field name you have selected (like character string). Predefined values Some of the protocol fields have predefined values available, much like enum's in C.
6.5. Defining and saving filters You can define filters with Ethereal and give them labels for later use. This can save time in remem- bering and retyping some of the more complex filters you use. To define a new filter or edit an existing one, select the Capture Filters... menu item from the Cap- ture menu or the Display Filters...
Page 126
Working with captured packets This button adds a new filter to the list of filters. The currently entered values from Filter name and Filter string will be used. If any of these fields are empty, it will be set to "new". Delete This button deletes the selected filter.
You can easily find packets once you have captured some packets or have read in a previously saved capture file. Simply select the Find Packet... menu item from the Edit menu. Ethereal will pop up the dialog box shown in 6.6.1.
You can choose the direction to be searched for: • Search upwards in the packet list (decreasing packet numbers). • Down Search downwards in the packet list (increasing packet numbers). 6.6.2. The "Find Next" command "Find Next" will continue searching with the same options like in the last "Find Packet" run. 6.6.3.
6.7.3. The "Go to Packet" dialog box Figure 6.10. The "Go To Packet" dialog box This dialog box will let you enter a packet number. When you press OK, Ethereal will jump to that packet. 6.7.4. The "Go to Corresponding Packet" command If a protocol field is selected which points to another packet in the capture file, this command will jump to that packet.
6.8. Marking packets You can mark packets in the "Packet List" pane. A marked packet will be shown with black back- ground, regardless of the coloring rules set. Marking a packet can be useful to find it later while ana- lyzing in a large capture file.
Find Next Find the next time referenced packet in the "Packet List" pane. • Find Previous Find the previous time referenced packet in the "Packet List" pane. Figure 6.11. Ethereal showing a time referenced packet Working with captured packets Figure 3.5, “The "View"...
Page 132
Working with captured packets A time referenced packet will be marked with the string *REF* in the Time column (see packet number 10). All subsequent packets will show the time since the last time reference.
Perhaps you are looking for passwords in a Telnet stream, or you are trying to make sense of a data stream. If so, Ethereal's ability to follow a TCP stream will be useful to you. Simply select a TCP packet in the stream/connection you are interested in and then select the Follow TCP Stream menu item from the Ethereal Tools menu.
Page 136
You can then choose to view the data in one of the following formats: ASCII. In this view you see the data from each end in ASCII, but alternating according to when each end sent data. Unfortunately, non-printing characters do not print. EBCDIC.
For some of the network protocols Ethereal knows of, a mechanism is implemented to find, decode and display this chunks of data. Ethereal will try to find the corresponding packets of this chunk, and will show the combined data as additional pages in the "Packet Bytes" pane, see “The "Packet Bytes"...
(like the gethostname function) and/or evaluate from Ethereal specific configuration files. If there are both features available, Ethereal will first try the system services and then fall back to it's own configuration files. XXX - is this really true? For details about the config-...
The ADNS service will work a bit differently. It will also ask the DNS server, but it won't wait for the answer. It will just return to Ethereal in a very short amount of time. XXX - what does happen...
Chapter 8. Statistics 8.1. Introduction Ethereal provides a wide range of network statistics. These statistics range from general information about the loaded capture file (like the number of captured packets), to statistics about specific protocols (e.g. statistics about the number of HTTP re- quests and responses captured).
Statistics 8.2. The "Summary" window General statistics about the current capture file. Figure 8.1. The "Summary" window...
Page 143
• File general information about the capture file. • Time the timestamps when the first and the last packet were capturing (and the time between them). • Capture information from the time when the capture was done (only available if the packet data was captured from the network and not loaded from a file).
8.3. The "Protocol Hierarchy" window The protocol hierarchy of the captured packets. Figure 8.2. The "Protocol Hierarchy" window This is a tree of all the protocols in the capture. You can collapse or expand subtrees, by clicking on the plus / minus icons. By default, all trees are expanded. Each row contains the statistical values of one protocol.
Page 145
Statistics Note! Packets will usually contain multiple protocols, so more than one protocol will be counted for each packet. Example: In the screenshot IP has 99,17% and TCP 85,83% (which is together much more than 100%). Note! A single packet can contain the same protocol more than once. In this case, the pro- tocol is counted more than once.
8.4.1. What is an Endpoint? A network endpoint is the logical endpoint of separate protocol traffic of a specific protocol layer. The endpoint statistics of Ethereal will take the following endpoints into account: • Ethernet an Ethernet endpoint is identical to the Ethernet's MAC address.
For each supported protocol, a tab is shown in this window. The tab labels shows the number of en- dpoints captured (e.g. the tab label "Ethernet: 5" tells you that five ethernet endpoints have been captured). If no endpoints of a specific protocol were captured, the tab label will be grayed out (although the related page can still be selected).
8.5. Conversations Statistics of the captured conversations. 8.5.1. What is a Conversation? A network conversation is the traffic between two specific endpoints. For example, an IP conversa- tion is all the traffic between two IP addresses. The description of the known endpoint types can be found in Section 8.4.1, “What is an 8.5.2.
8.6. The "IO Graphs" window User configurable graph of the captured network packets. You can define up to five differently colored graphs. Figure 8.5. The "IO Graphs" window The user can configure the following things: • Graphs • Graph 1-5 enable the graph 1-5 (only graph 1 is enabled by default) •...
Page 150
• Unit the unit for the y direction (Packets/Tick, Bytes/Tick, Advanced...) • Scale the scale for the y unit (10,20,50,100,200,500,...) XXX - describe the Advanced feature. Statistics...
8.7. Service Response Time The service response time is the time between a request and the corresponding response. This in- formation is available for many protocols. Service response time statistics are currently available for the following protocols: • DCE-RPC • Fibre Channel •...
Page 152
Statistics Figure 8.7. The "DCE-RPC Statistic for ..." window Each row corresponds to a method of the interface selected (so the EPM interface in version 3 has 7 methods). For each method the number of calls, and the statistics of the SRT time is calculated.
Statistics 8.8. The protocol specific statistics windows The protocol specific statistics windows display detailed information of specific protocols and might be described in a later version of this document. Some of these statistics are described at the http://wiki.ethereal.com/Statistics pages.
Chapter 9. Customizing Ethereal 9.1. Introduction Ethereal's default behaviour will usually suit your needs pretty well. However, as you become more familiar with Ethereal, it can be customized in various ways to suit your needs even better. In this chapter we explore: •...
9.2. Start Ethereal from the command line You can start Ethereal from the command line, but it can also be started from most Window man- agers as well. In this section we will look at starting it from the command line.
Page 157
-i <capture interface> on the creation date and time. When the first capture file fills up, Ethereal will switch to writing to the next file, until it fills up the last file, at which point it'll discard the data in the first file (unless 0 is spe- cified, in which case, the number of files is unlimited) and start writing to that file and so on.
Page 158
It can be used with the -c option. It must be used in conjunction with the -i and -w options. This option provides the name of a capture file for Ethereal to read and display. This capture file can be in one of the formats Ethereal understands.
Page 159
• d delta, which specifies that timestamps are relative to the previous packet. The -v option requests Ethereal to print out its version in- formation and exit. This option sets the name of the savefile to be used when sav- ing a capture file.
You will find a lot of Coloring Rule examples at the Ethereal Wiki Coloring Rules page at http://wiki.ethereal.com/ColoringRules. To colorize packets, select the Coloring Rules... menu item from the View menu, Ethereal will pop up the "Coloring Rules" dialog box as shown in Figure 9.1.
Page 161
Once you have entered these values, you can choose a foreground and background color for packets that match the filter expression. Click on Foreground color... or Background color... to achieve this and Ethereal will pop up the Choose foreground/background color for protocol dialog box as shown in Figure 9.3, “The "Choose color"...
Page 162
Customizing Ethereal Figure 9.4, “Using color filters with Ethereal” shows an example of several color filters being used in Ethereal. You may not like the color choices, however, feel free to choose your own. Figure 9.4. Using color filters with Ethereal...
Each protocol has its own dissector, so dissecting a complete packet will typically involve several dissectors. As Ethereal tries to find the right dissector for each packet (using static "routes" and heuristics "guessing"), it might choose the wrong dissector in your specific case. For example, Eth- ereal won't know if you use a common protocol on an uncommon TCP port, e.g.
Page 164
Warning! You have to use the Save button to save your settings. The OK or Apply buttons will not save your changes permanently, so they will be lost when Ethereal is closed. You can choose from the following actions: Enable All Enable all protocols in the list.
Figure 9.6. The "Decode As" dialog box The content of this dialog box depends on the selected packet when it was opened. Warning! The user specified decodes can not be saved. If you quit Ethereal, these settings will be lost. Decode Decode packets the selected way.
Cancel Cancel the changes and close the dialog box. 9.4.3. Show User Specified Decodes This dialog box shows the currently active user specified decodes. Figure 9.7. The "Decode As: Show" dialog box OK Close this dialog box. Clear Removes all user specified decodes. Customizing Ethereal...
9.5. Preferences There are a number of preferences you can set. Simply select the Preferences... menu item from the Edit menu, and Ethereal will pop up the Preferences dialog box as shown in ences dialog box”, with the "User Interface" page as default. On the left side is a tree where you can select the page to be shown.
Appendix other) Files and Folders Ethereal uses a number of files and folders while it is running. Some of these reside in the personal configuration folder and are used to maintain information between runs of Ethereal, while some of them are maintained in system areas.
Page 171
Settings\<username>\Application Data (for further details, have a look at Section A.1.1, “Windows program folder, typically C:\Program Files\Ethereal Unix/Linux folders The /etc folder is the global Ethereal configuration folder. The folder actually used on your system may vary, maybe something like: /usr/local/etc. preferences/ethereal.conf recent cfilters...
Page 172
The settings from this file are read in at program start and written to disk when you press the Save button in the "En- abled Protocols" dialog box. When Ethereal is trying to translate Ethernet hardware ad- dresses to names, it consults the files listed in “Configuration files and folders overview”.
A.1. Windows folders Here you will find some details about the folders used in Ethereal on different Windows versions. As already mentioned, you can find the currently used folders in the About Ethereal dialog. A.1.1. Windows profiles Windows uses some special directories to store user configuration files in, named the user profile.
As Ethereal is using the correct places to store it's profile data, your settings will travel with you, if you logon to a different computer the next time.
Page 175
Configuration (and other) Files and Folders...
Appendix B. Protocols and Protocol Fields Ethereal distinguishes between protocols (e.g. tcp) and protocol fields (e.g. tcp.port). A comprehensive list of all protocols and protocol fields can be found at: tp://www.ethereal.com/docs/dfref/...
Appendix C. Related command line tools C.1. Introduction Beside the Ethereal GUI application, there are some command line tools, which can be helpful for doing some more specialized things. These tools will be described in this chapter.
C.2. tcpdump: Capturing with tcpdump for viewing with Ethereal There are occasions when you want to capture packets using tcpdump rather than ethereal, espe- cially when you want to do a remote capture and do not want the network load associated with run- ning Ethereal remotely (not to mention all the X traffic polluting your capture).
Related command line tools C.3. tethereal: Terminal-based Ethereal Tethereal is a terminal oriented version of ethereal designed for capturing and displaying packets when an interactive user interface isn't necessary or available. It supports the same options as ether- eal. For more information on tethereal, see the manual pages (man tethereal).
C.4. capinfos: capture files Included with Ethereal is a small utility called capinfos, which is a command-line utility to print in- formation about binary capture files. Example C.1. Help information available from capinfos $ capinfos -h Usage: capinfos [-t] [-c] [-s] [-d] [-u] [-a] [-e] [-y] [-i] [-z] [-h] <capfile>...
C.5. editcap: Edit capture files Included with Ethereal is a small utility called editcap, which is a command-line utility for working with capture files. Its main function is to remove packets from capture files, but it can also be used to convert capture files from one format to another, as well as print information about capture files.
Page 182
Related command line tools ieee-802-11-radiotap - IEEE 802.11 plus radiotap WLAN header ieee-802-11-avs - IEEE 802.11 plus AVS WLAN header linux-sll - Linux cooked-mode capture frelay - Frame Relay frelay-with-direction - Frame Relay with Directional Info chdlc - Cisco HDLC ios - Cisco IOS internal ltalk - Localtalk pflog-old - OpenBSD PF Firewall logs, pre-3.4...
Page 183
This option specifies the frame encapsulation type to use. It is mainly for converting funny captures to something that Ethereal can deal with. The default frame encapsulation type is the same as the input encapsulation. This option specifies the capture file format to write the out- put file in.
C.6. mergecap: Merging multiple capture files into one Mergecap is a program that combines multiple saved capture files into a single output file specified by the -w argument. Mergecap knows how to read libpcap capture files, including those of tcpdump. In addition, Mergecap can read capture files from snoop (including Shomiti) and atmsnoop, LanA- lyzer, Sniffer (compressed or uncompressed), Microsoft Network Monitor, AIX's iptrace, NetXray, Sniffer Pro, RADCOM's WAN/LAN analyzer, Lucent/Ascend router debug output, HP-UX's nettl,...
Page 185
- BACnet MS/TP default is the same as the first input file -F <capture type> capture file type to write: libpcap - libpcap (tcpdump, Ethereal, etc.) rh6_1libpcap - RedHat Linux 6.1 libpcap (tcpdump) suse6_3libpcap - SuSE Linux 6.3 libpcap (tcpdump)
Page 186
Related command line tools ngwsniffer_1_1 - Network Associates Sniffer (Windows-based) 1.1 ngwsniffer_2_0 - Network Associates Sniffer (Windows-based) 2.00x visual - Visual Networks traffic capture 5views - Accellent 5Views capture niobserverv9 - Network Instruments Observer version 9 default is libpcap Prints the version and options and exits. Causes mergecap to print a number of messages while it's working.
L3 and L4 headers before each packet. The user can elect to insert Ethernet headers, Ethernet and IP, or Ethernet, IP and UDP headers before each packet. This allows Ethereal or any other full- packet decoder to handle these dumps.
Page 188
Related command line tools where <input-filename> specifies input filename (use - for standard input) <output-filename> specifies output filename (use - for standard output) [options] are one or more of the following : Display this help message : Generate detailed debug of parser states -o hex|oct : Parse offsets as (h)ex or (o)ctal.
Page 189
For IP packets, instead of generating a fake Ethernet header you can also use -l 12 to indicate a raw IP packet to Ethereal. Note that -l 12 does not work for any non-IP Layer 3 packet (e.g. ARP), whereas generating a dummy Ethernet header with -e works for any sort of L3 packet.
I have also had comments/feedback that this tool would be good for say a CORBA class when teaching students what CORBA traffic looks like "on the wire". It is also COOL to work on a great Open Source project such as the case with "Ethereal" ( tp://www.ethereal.com C.8.3.
-p ./ -b ethereal_be echo.idl > packet-test-idl.c You may wish to comment out the register_giop_user_module() code and that will leave you with heuristic dissection. Copy the resulting C code to your ethereal src directory, edit the 2 make files to include the packet-test-idl.c cp packet-test-idl.c /dir/where/ethereal/lives/ edit Makefile.am...
Exception code not generated (yet), but can be added manually. Enums not converted to symbolic values (yet), but can be added manually. Add command line options etc More I am sure :-) C.8.5. Limitations See the TODO list inside packet-giop.c C.8.6.
Appendix D. This Document's License (GPL) As with the original licence and documentation distributed with Ethereal, this document is covered by the GNU General Public Licence (GNU GPL). If you haven't read the GPL before, please do so. It explains all the things that you are allowed to do with this code and documentation.
Page 195
This Document's License (GPL) patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0.
Page 196
This Document's License (GPL) Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
Page 197
This Document's License (GPL) these terms and conditions. restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not...
Page 198
This Document's License (GPL) FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Page 199
This Document's License (GPL) Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs.
Need help?
Do you have a question about the Ethereal and is the answer not in the manual?
Questions and answers