Ethereal User's Guide V2.0.2 (16376) for Ethereal 0.10.
Ethereal User's Guide: V2.0.2 (16376) for Ethereal 0.10.12 by Richard Sharpe, Ed Warnicke, and Ulf Lamping Copyright © 2004-2005 Richard SharpeEd WarnickeUlf Lamping Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner.
Table of Contents Preface ............................................................................................................................. viii 1. Foreword .............................................................................................................. viii 2. Who should read this document? ................................................................................. ix 3. Acknowledgements ........................................................................................
Ethereal User's Guide 3.7. The "View" menu ...................................................................................................39 3.8. The "Go" menu ......................................................................................................42 3.9. The "Capture" menu ...............................................................................................44 3.10. The "Analyze" menu .............................................................................................
Ethereal User's Guide 6.6. Finding packets .................................................................................................... 113 6.6.1. The "Find Packet" dialog box ....................................................................... 113 6.6.2. The "Find Next" command .......................................................................... 114 6.6.3. The "Find Previous" command ..................................................................... 114 6.7. Go to a specific packet ...
Ethereal User's Guide C.5. editcap: Edit capture files ..................................................................................... 167 C.6. mergecap: Merging multiple capture files into one .................................................... 170 C.7. text2pcap: Converting ASCII hexdumps to network captures ...................................... 173 C.8. idl2eth: Creating dissectors from Corba IDL files ...................................................... 176 C.8.1. What is it? ................
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. We hope that you find it useful, and look forward to your comments.
Preface 2. Who should read this document? The intended audience of this book is anyone using Ethereal. This book will explain all the basics and also some of the advanced features that Ethereal provides. As Ethereal has become a very complex program since the early days, not every feature of Ethereal might be explained in this book. This book is not intended to explain network sniffing in general and it will not provide details about specific network protocols.
Preface 3. Acknowledgements The authors would like to thank the whole Ethereal team for their assistance. In particular, the authors 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. • Gilbert Ramirez, for general encouragement and helpful hints along the way.
Preface 4. About this document This book was originally developed by Richard Sharpe with funds provided from the Ethereal Fund. It was updated by Ed Warnicke and more recently redesigned and updated by Ulf Lamping. It is written in DocBook/XML. You will find some specially marked parts in this book: This is a warning! You should pay attention to a warning, as otherwise data loss might occur. This is a note! A note will point you to common mistakes and things that might not be obvious.
Preface 5. Where to get the latest copy of this document? The latest copy of this documentation can always be found at: http:/ / www.ethereal.com/ docs/ #usersguide.
Preface 6. Providing feedback about this document Should you have any feedback about this document, please send them to the authors through ethereal-dev[AT]ethereal.com.
Preface xiv
Chapter 1. Introduction 1.1. What is Ethereal? Ethereal is a network packet analyzer. A network packet analyzer will try to capture network packets 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).
Introduction Figure 1.1. Ethereal captures packets and allows you to examine their content. 1.1.3. Live capture from many different network media Despite its name, Ethereal can capture traffic from network media other than Ethernet. Which media types are supported, depends on many things like the operating system you are using. An overview of the supported media types can be found at: http://www.ethereal.com/media.html. 1.1.4.
Introduction license keys or fees or such. 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. What Ethereal is not Here are some things Ethereal does not provide: • Ethereal isn't an intrusion detection system. It will not warn you when someone does strange things on your network that he/she isn't allowed to do.
Introduction 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. Please report your experiences to ethereal-dev[AT]ethereal.com. Binary packages are available for at least the following platforms: 1.2.1.
Introduction 1.2.3. Microsoft Windows Maintained: • Windows Server 2003 / XP / 2000 / NT 4.0 • Windows Me / 98 Unsupported/Unmaintained (because lack of required libraries): • Windows CE • Windows NT / XP Embedded • 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 1.3. Where to get Ethereal? You can get the latest copy of the program from the Ethereal website: http://www.ethereal.com/download.html. The website allows you to choose from among several mirrors for downloading. 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-announce mailing list. You will find more details in Section 1.7.4, “Mailing Lists”.
Introduction 1.4. A rose by any other name 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, insubstantial, etc. You are welcome to call it what you like, as long as you find it useful. The FAQ gives the official pronunciation as "e-the-real".
Introduction 1.5. A brief history of Ethereal In late 1997, Gerald Combs needed a tool for tracking down networking problems and wanted to learn more about networking, so he started writing Ethereal as a way to solve both problems. Ethereal was initially released, after several pauses in development, in July 1998 as version 0.2.0. Within days, patches, bug reports, and words of encouragement started arriving, so Ethereal was on its way to success.
Introduction 1.6. Development and maintenance of Ethereal Ethereal was initially developed by Gerald Combs. Ongoing development and maintenance of Ethereal 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.
Introduction 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. 1.7.2. Wiki The Ethereal Wiki at http://wiki.ethereal.com provides a wide range of information related to Ethereal and packet capturing in general.
Introduction 1.7.5. Reporting Problems Note! Before reporting any problems, please make sure you have installed the latest version of Ethereal. When reporting problems with Ethereal, it is helpful if you supply the following information: 1. The version number of Ethereal and the dependent libraries linked with it, eg GTK+, etc. You can obtain this with the command ethereal -v. 2. Information about the platform you run Ethereal on. 3. A detailed description of your problem. 4.
Introduction backtrace is a gdb command. You should enter it verbatim after the first line shown above, but it will not be echoed. The ^D (Control-D, that is, press the Control key and the D key together) will cause gdb to exit. This will leave you with a file called bt.txt in the current directory. Include the file with your bug report. Note If you do not have gdb available, you will have to check out your operating system's debugger. You should mail the traceback to the ethereal-dev[AT]ethereal.
Introduction 13
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. Currently, only two or three Linux distributions ship Ethereal, and they are commonly shipping an out-of-date version.
Building and Installing Ethereal 2.2. Obtaining distributions the source and binary You can obtain both source and binary distributions from the Ethereal web site: http://www.ethereal.com. Simply select the download link, and then select either the source package or binary package of your choice from the mirror site closest to you.
Building and Installing Ethereal 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 www.gtk.org • libpcap, the packet capture software that Ethereal uses. You can obtain libpcap from www.tcpdump.org Depending on your system, you may be able to install these from binaries, e.g.
Building and Installing Ethereal “Building and installing libpcap” will assist in building it. Also, if your operating system does not support tcpdump, you might also want to download it from the tcpdump web site and install it. Example 2.2. Building and installing libpcap gzip -dc libpcap-0.8.3.tar.Z | tar xvf cd libpcap_0_8_3 .
Building and Installing Ethereal cd /mnt/cdrom/RedHat/RPMS rpm -ivh glib-1.2.6-3.i386.rpm rpm -ivh glib-devel-1.2.6-3.i386.rpm rpm -ivh gtk+-1.2.6-7.i386.rpm rpm -ivh gtk+-devel-1.2.6-7.i386.rpm rpm -ivh libpcap-0.4-19.i386.rpm Note 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. Example 2.
Building and Installing Ethereal 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: 1. 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 For other versions of UNIX, You will want to use the following commands: gzip -d ethereal-0.10.12-tar.gz tar xvf ethereal-0.10.
Building and Installing Ethereal Once you have installed Ethereal with make install above, you should be able to run it by entering ethereal.
Building and Installing Ethereal 2.5. Installing the binaries under UNIX In general, installing the binary under your version of UNIX will be specific to the installation methods used with your version of UNIX. For example, under AIX, you would use smit to install the Ethereal binary package, while under Tru64 UNIX (formerly Digital UNIX) you would use setld. 2.5.1.
Building and Installing Ethereal 2.6. Troubleshooting during the install on Unix A number of errors can occur during the installation process. Some hints on solving these are provided here. If the configure stage fails, you will need to find out why. You can check the file config.log in the source directory to find out what failed. The last few lines of this file should help in determining the problem.
Building and Installing Ethereal 2.7. Building from source under Windows It is recommended to use the binary installer for Windows, until you want to start developing Ethereal on the Windows platform. For further information how to build Ethereal for Windows from the sources, have a look at the Development Wiki: http://wiki.ethereal.com/Development for the latest available development documentation.
Building and Installing Ethereal 2.8. Installing Ethereal under Windows In this section we explore installing Ethereal under Windows from the binary packages. 2.8.1. Install Ethereal You may acquire a binary installer of Ethereal named something like: etherealsetup-x.y.z.exe. Simply download the Ethereal installer from: http://www.ethereal.com/download.html#releases and execute it. Note! Since Ethereal Version 0.10.
Building and Installing Ethereal The Components (both Ethereal GTK1 and 2 cannot be installed at the same time): • 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, recommended). • Tethereal - Tethereal is a command-line based network protocol analyzer.
Building and Installing Ethereal install WinPcap, if none or an older version is detected. More WinPcap info: • Ethereal related: http://wiki.ethereal.com/WinPcap • General WinPcap info: http://www.winpcap.org 2.8.2.1. Manual WinPcap Installation The following is only necessary if you want to try a different version than the one included in the Ethereal installer, e.g. because a new WinPcap (beta) version was released.
Building and Installing Ethereal 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.
Building and Installing Ethereal 28
Chapter 3. User Interface 3.1. Introduction By now you have installed Ethereal and are most likely keen to get started capturing your first packets. In the next chapters we will explore: • How the Ethereal user interface works • How to capture packets in Ethereal • How to view packets in Ethereal • How to filter packets in Ethereal • ...
User Interface 3.2. Start Ethereal You can start Ethereal from your shell or window manager. Tip! When starting Ethereal it's possible to specify optional settings using the command line. See Section 9.2, “Start Ethereal from the command line” for details. Note! In the following chapters, a lot of screenshots from Ethereal will be shown. As Ethereal runs on many different platforms and there are different versions of the underlying GUI toolkit (GTK 1.x / 2.
User Interface 3.3. The Main window Lets look at Ethereal's user interface. Figure 3.1, “The Main window” shows Ethereal as you would usually see it after some packets captured or loaded (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. 1. The menu (see Section 3.4, “The Menu”) is used to start actions. 2. The main toolbar (see Section 3.
User Interface current program state and the captured data. Tip! The layout of the main window can be customized by changing preference settings. See Section 9.
User Interface 3.4. The Menu The Ethereal menu sits on top of the Ethereal window. An example is shown in Figure 3.2, “The Menu”. Note! Menu items will be greyed out if the corresponding feature isn't available. For example, you cannot save a capture file if you didn't capture or load any data before. Figure 3.2. The Menu It contains the following items: File This menu contains items to open and merge capture files, save / print / export capture files in whole or in part, and to quit from Ethereal.
User Interface 3.5. The "File" menu The Ethereal file menu contains the fields shown in Table 3.1, “File menu items”. Figure 3.3. The "File" Menu Table 3.1. File menu items Menu Item Accelerator Open... Ctrl+O Description This menu item brings up the file open dialog box that allows you to load a capture file for viewing. It is discussed in more detail in Section 5.2.1, “The "Open Capture File" dialog box”. Open Recent This menu item shows a submenu containing the recently opened capture files.
User Interface Menu Item Accelerator Save Ctrl+S Description This menu item saves the current capture. If you have not set a default capture file name (perhaps with the -w option), Ethereal pops up the Save Capture File As dialog box (which is discussed further in Section 5.3.1, “The "Save Capture File As" dialog box”). Note! If you have already saved the current capture, this menu item will be greyed out. Note! You cannot save a live capture while it is in progress.
User Interface Menu Item Accelerator Export > as "PDML" file... Description This menu item allows you to export the (or some) of the packets in the capture file to a PDML (packet details markup language) XML file. It pops up the Ethereal Export dialog box (which is discussed further in Section 5.6.5, “The "Export as PDML File" dialog box”). Export > Selec- Ctrl+H ted Packet Bytes... This menu item allows you to export the currently selected bytes in the packet bytes pane to a binary file.
User Interface 3.6. The "Edit" menu The Ethereal Edit menu contains the fields shown in Table 3.2, “Edit menu items”. Figure 3.4. The "Edit" Menu Table 3.2. Edit menu items Menu Item Accelerator Find Packet... Ctrl+F Description This menu item brings up a dialog box that allows you to find a packet by many criteria. There is further information on finding packets in Section 6.6, “Finding packets”. Find Next Ctrl+N This menu item tries to find the next packet matching the settings from "Find Packet.
User Interface Menu Item Accelerator Time Reference > Find Previous Description This menu item tries to find the previous time referenced packet. Mark Packet Ctrl+M (toggle) This menu item "marks" the currently selected packet. See Section 6.8, “Marking packets” for details. Mark All Packets This menu item "marks" all packets. Unmark Packets This menu item "unmarks" all marked packets. All -----Preferences...
User Interface 3.7. The "View" menu The Ethereal View menu contains the fields shown in Table 3.3, “View menu items”. Figure 3.5. The "View" Menu Table 3.3. View menu items Menu Item Accelerator Description Main Toolbar This menu item hides or shows the main toolbar, see Section 3.13, “The "Main" toolbar”. Filter Toolbar This menu item hides or shows the filter toolbar, see Section 3.14, “The "Filter" toolbar”. Statusbar This menu item hides or shows the statusbar, see Section 3.18, “The Statusbar”.
User Interface Menu Item Accelerator Description Packet Bytes This menu item hides or shows the packet bytes pane, see Section 3.17, “The "Packet Bytes" pane”. -----Time Display Format > Time of Day Selecting this tells Ethereal to display time stamps in time of day format, see Section 6.9, “Time display formats and time references”. Note! The fields "Time of Day", "Date and Time of Day", "Seconds Since Beginning of Capture" and "Seconds Since Previous Packet" are mutually exclusive.
User Interface Menu Item Accelerator Zoom In Ctrl++ Description Zoom into the packet data (increase the font size). Zoom Out Ctrl+- Normal Size Ctrl+= Zoom out of the packet data (decrease the font size). Set zoom level back to 100% (set font size back to normal). Resize Columns All Resize all column widths so the content will fit into it. Note! Resizing may take a significant amount of time, especially if a large capture file is loaded.
User Interface 3.8. The "Go" menu The Ethereal Go menu contains the fields shown in Table 3.4, “Go menu items”. Figure 3.6. The "Go" Menu Table 3.4. Go menu items Menu Item Accelerator Back Alt+Left Description Jump to the recently visited packet in the packet history, much like the page history in a web browser. Forward Alt+Right Jump to the next visited packet in the packet history, much like the page history in a web browser. Go to Packet...
User Interface Menu Item Accelerator Description Last Packet Jump to the last packet of the capture file.
User Interface 3.9. The "Capture" menu The Ethereal Capture menu contains the fields shown in Table 3.5, “Capture menu items”. Figure 3.7. The "Capture" Menu Table 3.5. Capture menu items Menu Item Accelerator Description Interfaces... This menu item brings up a dialog box that shows what's going on at the network interfaces Ethereal knows of, see Section 4.4, “The "Capture Interfaces" dialog box”) . Options...
User Interface Menu Item Capture ters... Accelerator Description FilThis 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 Section 6.
User Interface 3.10. The "Analyze" menu The Ethereal Analyze menu contains the fields shown in Table 3.6, “Analyze menu items”. Figure 3.8. The "Analyze" Menu Table 3.6. Analyze menu items Menu Item Display ters... Accelerator Description Fil- Apply as Filter > ... Prepare a Filter > ... This menu item brings up a dialog box that allows you to create and edit display filters. You can name filters, and you can save them for future use. More detail on this subject is provided in Section 6.
User Interface Menu Item Accelerator Enabled Proto- Shift+Ctrl+R cols... Description This menu item allows the user to enable/disable protocol dissectors, see Section 9.4.1, “The "Enabled Protocols" dialog box” Decode As... This menu item allows the user to force Ethereal to decode certain packets as a particular protocol, see Section 9.4.2, “User Specified Decodes” User Specified Decodes...
User Interface 3.11. The "Statistics" menu The Ethereal Statistics menu contains the fields shown in Table 3.7, “Statistics menu items”. 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 Description Summary Show information about the data captured, see Section 8.2, “The "Summary" window”. Protocol Hierarchy Display a hierarchical tree of protocol statistics, see Section 8.
User Interface Menu Item Accelerator Description -----Conversation List Display a list of conversations, obsoleted by the combined window of Conversations above, see Section 8.5.3, “The protocol specific "Conversation List" windows”. Endpoint List Display a list of endpoints, obsoleted by the combined window of Endpoints above, see Section 8.4.3, “The protocol specific "Endpoint List" windows”. Service Response Time Display the time between a request and the corresponding response, see Section 8.
User Interface 3.12. The "Help" menu The Ethereal Help menu contains the fields shown in Table 3.8, “Help menu items”. Figure 3.10. The "Help" Menu Table 3.8. Help menu items Menu Item Accelerator Contents F1 Description This menu item brings up a basic help system. Supported Protocols Manual Pages > ... Ethereal line > ... This menu item brings up a dialog box showing the supported protocols and protocol fields.
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.
User Interface 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. As in the menu, only the items useful in the current program state will be available. The others will be greyed out (e.g. you cannot save a capture file if you haven't loaded one). Figure 3.11. The "Main" toolbar Table 3.9.
User Interface Toolbar Toolbar Item Icon Corresponding Menu Item Reload Description View/Reload This item allows you to reload the current capture file. Print... File/Print... 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 Section 5.7, “Printing packets”). -----Find Packet... Edit/Find Packet... This item brings up a dialog box that allows you to find a packet.
User Interface Toolbar Toolbar Item Icon Corresponding Menu Item Coloring Rules... View/Coloring Rules... Preferences... Description This item brings up a dialog box that allows you color packets in the packet list pane according to filter expressions you choose. It can be very useful for spotting certain types of packets. More detail on this subject is provided in Section 9.3, “Packet colorization”.
User Interface 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 viewing”. Figure 3.12. The "Filter" toolbar • The leftmost button labeled "Filter:" can be clicked to bring up the filter construction dialog, described in Figure 6.8, “The "Capture Filters" and "Display Filters" dialog boxes”.
User Interface 3.15. The "Packet List" pane The packet list pane displays all the packets in the current capture file. Figure 3.13. The "Packet List" pane Each line in the packet list corresponds to one packet in the capture file. If you select a line in this pane, more details will be displayed in the "Packet Details" and "Packet Bytes" panes. While dissecting a packet, Ethereal will place information from the protocol dissectors into the columns.
User Interface 3.16. The "Packet Details" pane The packet details pane shows the current packet (selected in the "Packet List" pane) in a more detailed form. Figure 3.14. The "Packet Details" pane This pane shows the protocols and protocol fields of the packet selected in the "Packet List" pane. The protocols and fields of the packet are displayed using a tree, which can be expanded and collapsed. There is a context menu (right mouse click) available, see details in Figure 6.
User Interface 3.17. The "Packet Bytes" pane The packet bytes pane shows the data of the current packet (selected in the "Packet List" pane) in a hexdump style. Figure 3.15. The "Packet Bytes" pane As usual for a hexdump, the left side shows the offset in the packet data, in the middle the packet data is shown in a hexadecimal representation and on the right the corresponding ASCII characters (or . if not appropriate) are displayed.
User Interface 3.18. The Statusbar The statusbar displays informational messages. In general, the left side will show context related information, while the right side will show the current number of packets. 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.
User Interface 60
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, ...). • Stop the capture on different triggers like: amount of captured data, captured time, captured number of packets. • Simultaneously show decoded packets while keep on capturing.
Capturing Live Network Data 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: http://wiki.ethereal.com/CaptureSetup. Here are some common pitfalls: • You need to have root / Administrator privileges to start a live capture. • You need to choose the right network interface to capture packet data from. • You need to capture at the right place in the network to see the traffic you want to see.
Capturing Live Network Data 4.3. Start Capturing One of the following methods can be used to start capturing packets with Ethereal: • You can get an overview of the available local interfaces using the " Capture Interfaces" dialog box, see Figure 4.1, “The "Capture Interfaces" dialog box”. You can start a capture from this dialog box, using (one of) the "Capture" button(s). • You can start capturing using the " Capture Options" dialog box, see Figure 4.2, “The "Capture Options" dialog box”.
Capturing Live Network Data 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 Figure 4.1, “The "Capture Interfaces" dialog box”. Warning! As the "Capture Interfaces" dialog is showing live captured data, it is consuming a lot of system ressources. Close this dialog as soon as possible to prevent excessive system load. Note! This dialog box will only show the local interfaces Ethereal knows of.
Capturing Live Network Data 4.5. The "Capture Options" dialog box When you select Start... from the Capture menu (or use the corresponding item in the "Main" toolbar), Ethereal pops up the "Capture Options" dialog box as shown in Figure 4.2, “The "Capture Options" dialog box”. Figure 4.2. The "Capture Options" dialog box Tip! If you are unsure which options to choose in this dialog box, just try keeping the defaults as this should work well in many cases.
Capturing Live Network Data 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. On some systems, loopback interfaces cannot be used for capturing (loopback interfaces are not available on Windows platforms).
Capturing Live Network Data CPU time is required for copying packets, less buffer space is required for packets, and thus perhaps fewer packets will be dropped if traffic is very heavy. • Capture Filter If you don't capture all of the data in a packet, you might find that the packet data you want is in the part that's dropped, or that reassembly isn't possible as the data required for reassembly is missing. This field allows you to specify a capture filter.
Capturing Live Network Data ... after n minute(s) Stop capturing after the given number second(s)/minutes(s)/hours(s)/days(s) have elapsed. of 4.5.4. Display Options frame Update list of packets in real time This option allows you to specify that Ethereal should update the packet list pane in real time. If you do not specify this, Ethereal does not display any packets until you stop the capture. When you check this, Ethereal captures in a separate process and feeds the captures to the display process.
Capturing Live Network Data 4.6. Capture files and file modes 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. Different modes of operation are available when saving this packet data to the capture file(s). Tip! Working with large files (several 100 MB's) can be quite slow.
Capturing Live Network Data new capture file to a specific folder, choose this mode. Multiple files, continuous Like the "Single named file" mode, but a new file is created and used, after reaching one of the multiple file switch conditions (one of the "Next file every ..." values). Multiple files, ring buffer Much like "Multiple files continuous", reaching one of the multiple files switch conditions (one of the "Next file every ..." values) will switch to the next file.
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 "Ethernet" or "802.11". "Ethernet" will cause the captured packets to have fake Ethernet headers; "802.11" will cause them to have IEEE 802.11 headers.
Capturing Live Network Data 4.8. Filtering while capturing Ethereal uses the libpcap filter language for capture filters. This is explained in the tcpdump man page, which can be hard to understand, so it's explained here to some extent. Tip! You will find a lot of tp://wiki.ethereal.com/CaptureFilters. Capture Filter examples at ht- You enter the capture filter into the Filter field of the Ethereal Capture Options dialog box, as shown in Figure 4.2, “The "Capture Options" dialog box”.
Capturing Live Network Data You can optionally include the keyword src|dst between the keywords ether and host to specify that you are only interested in source or destination addresses. If these are not present, packets where the specified address appears in either the source or destination address will be selected. gateway host This primitive allows you to filter on packets that used host as a gateway.
Capturing Live Network Data 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. The selection which protocols are counted cannot be changed. Tip! This Capture Info dialog box can be hidden, using the "Hide capture info dialog" option in the Capture Options dialog box. 4.9.1.
Capturing Live Network Data Note! The Capture Info dialog box might be hidden, if the option "Hide capture info dialog" is used. 2. Using the menu item "Capture/ Stop". 3. Using the toolbar item " 4. Pressing the accelerator keys: Ctrl+E. 5. The capture will be automatically stopped, if one of the Stop Conditions is exceeded, e.g. the maximum amount of data was captured. Stop". 4.9.2.
Capturing Live Network Data 76
Chapter 5. File Input / Output and Printing 5.1. Introduction This chapter will describe input and output of capture data.
File Input / Output and Printing 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" dialog box”. Note! You can also use drag-and-drop to open a file, by simply dropping the desired file from your file manager onto Ethereal's main window.
File Input / Output and Printing With this dialog box, you can perform the following actions: 1. The "+ Add" button allows you to add a directory, selected in the right-hand pane, to the favorites (bookmarks?) list. Those changes are persistent. 2. The "- Remove" button allows you to remove a selected directory from that list again (the items like: "Home", "Desktop", and "Filesystem" cannot be removed). 3. Select files and directories with the list boxes. 4.
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 • Novell LANalyzer captures • Microsoft Network Monitor captures • AIX's iptrace captures • Cinco Networks NetXray captures • Network Associates Windows-based Sniffer and Sniffer Pro captures • Network General/Network Associates DOS-based Sniffer
File Input / Output and Printing 5.3. Saving captured packets You can save captured packets simply by using the Save As... menu item from the File menu under Ethereal. You can choose which packets to save and which file format to be used. 5.3.1. The "Save Capture File As" dialog box The "Save Capture File As" dialog box allows you to save the current capture to a file. Figure 5.2, “The "Save Capture File As" dialog box” shows an example of this dialog box.
File Input / Output and Printing With this dialog box, you can perform the following actions: 1. Type in the name of the file you wish to save the captured packets in, as a standard file name in your file system. 2. Select the directory to save the file into. 3. Select the range of the packets to be saved, see Section 5.8, “The Packet Range frame” 4. Specify the format of the saved capture file by clicking on the File type drop down box. You can choose from the types, described in Section 5.3.
File Input / Output and Printing file and writing it out using a different format. 5. Use "Browse for other folders" to browse files and folders in your file system. 6. 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. 7.
File Input / Output and Printing 5.4. Merging capture files Sometimes you need to merge several capture files into one. For example this can be useful, if you have captured simultaneously from multiple interfaces at once (e.g. using multiple instances of Ethereal). Merging capture files can be done in three ways: • Use the menu item "Merge" from the "File" menu, to open the merge dialog, see Figure 5.3, “The "Merge with Capture File" dialog box”.
File Input / Output and Printing Prepend packets to existing file Prepend the packets from the selected file before the currently loaded packets. Merge packets chronologically Merge both the packets from the selected and currently loaded file in chronological order. Append packets to existing file Append the packets from the selected file after the currently loaded packets. All other controls will work the same way as in the "Open Capture File" dialog box, see Section 5.2.
File Input / Output and Printing 5.5. File Sets When using the "Multiple Files" option while doing a capture, the capture data is spreaded over several capture files, called a file set. Ethereal tries to find the files matching the same filename pattern than the currently loaded file. This will only work, if all the files of the file set are located in the same directory.
File Input / Output and Printing 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. XXX - add detailed descriptions of the output formats and some sample output, too. 5.6.1.
File Input / Output and Printing 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. • The Packet Range frame is described in Section 5.8, “The Packet Range frame”. • The Packet Details frame is described in Section 5.9, “The Packet Format frame”. 5.6.3.
File Input / Output and Printing Export packet data into PSML. This is an XML based format including only the packet summary. Figure 5.6. The "Export as PSML File" dialog box • Export to file: frame chooses the file to export the packet data to. • The Packet Range frame is described in Section 5.8, “The Packet Range frame”. There's no such thing as a packet details frame for PSML export, as the packet format is defined by the PSML specification. 5.6.5.
File Input / Output and Printing • Export to file: frame chooses the file to export the packet data to. • The Packet Range frame is described in Section 5.8, “The Packet Range frame”. There's no such thing as a packet details frame for PDML export, as the packet format is defined by the PDML specification. 5.6.6. The "Export selected packet bytes" dialog box Export the bytes selected in the "Packet Bytes" pane into a raw binary file. Figure 5.8.
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.
File Input / Output and Printing 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 Figure 5.9, “The "Print" dialog box”. 5.7.1. The "Print" dialog box Figure 5.9. The "Print" dialog box The following fields are available in the Print dialog box: Printer This field contains a pair of mutually exclusive radio buttons: • Plain Text specifies that the packet print should be in plain text.
File Input / Output and Printing • Print command specifies that a command be used for printing. Note! These Print command fields are not available on windows platforms. 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. An example might be: lpr -Pmypostscript This field is greyed out if Output to file: is checked above.
File Input / Output and Printing 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.
File Input / Output and Printing 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 • Packet summary line enable the output of the summary line, just as in the "Packet List" pane. • Packet details enable the output of the packet details tree.
File Input / Output and Printing 96
Chapter 6. Working with captured packets 6.1. Viewing packets you have captured Once you have captured some packets, or you have opened a previously saved capture file, you can view the packets that are displayed in the packet list pane by simply clicking on a packet in the packet list pane, which will bring up the selected packet in the tree view and byte view panes.
Working with captured packets Figure 6.2. Viewing a packet in a separate window Finally, you can bring up a pop-up menu over either the "Packet List", "Packet Details" or "Packet Bytes" pane by clicking your right mouse button. The following table gives an overview which functions are available in the panes, where to find the corresponding function in the menu, and a short description of each item. Table 6.1.
Working with captured packets Item Lis De- Byt Menu t tail es s Description “Preferences”. Decode As... X X - Analyze Print... X - - File . Print (the selected) packet(s). Show Packet in X New Window - Resolve name - X - View/Name ResCause a name resolution to be performed for the selecolution ted packet, but NOT for every packet in the capture. Go to Corres- ponding Packet X - Go Copy - - - View Display the selected packet in another window.
Working with captured packets Mark Packet (toggle) This menu item is the same as the Edit menu item of the same name. It allows you to mark a packet. Time Reference This menu item is the same as the Edit menu items of the same name. It allows you to set and work with time references. Apply as Filter This menu item is the same as the Analyze menu items of the same name. Prepare a Filter This menu item is the same as the Analyze menu items of the same name.
Working with captured packets Expand Subtrees This menu item expands the currently selected subtree. Expand All This menu item expands all subtrees in all packets in the capture. Collapse All 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.
Working with captured packets Copy Copy the selected packet data to the clipboard (XXX - in which format). Export Selected Packet Bytes... 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.
Working with captured packets 6.2. Filtering packets while viewing Ethereal has two filtering languages: One used when capturing packets, and one used when displaying packets. In this section we explore that second type of filter: Display filters. The first one has already been dealt with in Section 4.8, “Filtering while capturing”. Display filters allow you to concentrate on the packets you are interested in while hiding the currently uninteresting ones.
Working with captured packets As you might have noticed, only packets of the TCP protocol are displayed now (e.g. packets 1-10 are hidden). The packet numbering will remain as before, so the first packet shown is now packet number 11. Note! When using a display filter, all packets remain in the capture file. The display filter only changes the display of the capture file but not its content! You can filter on any protocol that Ethereal understands.
Working with captured packets 6.3. Building display filter expressions Ethereal provides a simple but powerful display filter language that you can build quite complex filter 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. Tip! You will find a lot of Display Filter examples at the Ethereal Wiki Display Filter page at http://wiki.ethereal.com/DisplayFilters. 6.3.1.
Working with captured packets English C-like Description and example frame.pkt_len < 128 ge >= Greater than or equal to frame.pkt_len ge 0x100 le <= Less than or equal to frame.pkt_len <= 0x20 In addition, all protocol fields are typed. Table 6.3, “Display Filter Field Types” provides a list of the types and example of how to express them. Table 6.3. Display Filter Field Types Type Example Unsigned integer (8-bit, 16-bit, 24-bit, 32-bit) You can express integers in decimal, octal, or hexadecimal.
Working with captured packets Table 6.4. Display Filter Logical Operations English C-like and && Description and example Logical AND ip.addr==10.0.0.5 and tcp.flags.fin or || Logical OR ip.addr==10.0.0.5 or ip.addr==192.1.1.1 xor ^^ Logical XOR tr.dst[0:3] == 0.6.29 xor tr.src[0:3] == 0.6.29 not ! Logical NOT not llc [...] Substring Operator Ethereal allows you to select subsequences of a sequence in rather elaborate ways.
Working with captured packets English C-like Description and example eth.src[2] == 83 The example above uses the n format to specify a single range. In this case the element in the sequence at offset n is selected. 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.
Working with captured packets 6.4. The "Filter Expression" dialog box 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. The Filter Expression dialog box helps with this.
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. If the selected protocol field has such values defined, you can choose one of them here.
Working with captured packets 6.5. Defining and saving filters You can define filters with Ethereal and give them labels for later use. This can save time in remembering 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 Capture menu or the Display Filters... menu item from the Analyze menu. Ethereal will then pop up the Filters dialog as shown in Figure 6.
Working with captured packets New 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. It will be greyed out, if no filter is selected. Filter You can select a filter from this list (which will fill in the filter name and filter string in the fields down the bottom of the dialog box).
Working with captured packets 6.6. Finding packets 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 Figure 6.9, “The "Find Packet" dialog box”. 6.6.1. The "Find Packet" dialog box Figure 6.9.
Working with captured packets You can choose the direction to be searched for: • Up 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. The "Find Previous" command "Find Previous" will do the same thing as "Find Next", but with reverse search direction.
Working with captured packets 6.7. Go to a specific packet You can easily jump to specific packets with one of the menu items in the Go menu. 6.7.1. The "Go Back" command Go back in the packet history, works much like the page history in current web browsers. 6.7.2. The "Go Forward" command Go forward in the packet history, works much like the page history in current web browsers. 6.7.3. The "Go to Packet" dialog box Figure 6.10.
Working with captured packets 6.8. Marking packets You can mark packets in the "Packet List" pane. A marked packet will be shown with black background, regardless of the coloring rules set. Marking a packet can be useful to find it later while analyzing in a large capture file. Warning! The packet marks are not stored in the capture file or anywhere else, so all packet marks will be lost if you close the capture file.
Working with captured packets 6.9. Time display formats and time references While packets are captured, each packet is timestamped. These timestamps will be saved to the capture file, so they will be available for later analysis. When the packets are displayed, the presentation of these timestamps can be chosen by the user. There are four presentation formats available: • Time of Day, e.g. 20:02:48.863096 The absolute time of the day when the packet was captured. • Date and Time of Day, e.g.
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.
Working with captured packets 119
Chapter 7. Advanced Features 7.1. Introduction In this chapter some advanced features of Ethereal will be described.
Advanced Features 7.2. Following TCP streams There will be occasions when you would like to see the data from a TCP session in the order that the application layer sees it. 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.
Advanced Features You can then choose to view the data in one of the following formats: 1. 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. 2. EBCDIC. For the big-iron freaks out there. 3. HEX Dump. This allows you to see all the data, but you lose the ability to read it in ASCII. 4. C Arrays. This allows you to import the stream data into your own C program. 5. Raw.
Advanced Features 7.3. Packet Reassembling 7.3.1. What is it? Often network protocols needs to transport large chunks of data, which are complete in itself, e.g. when transferring a file. The underlying protocol might not be able to handle that chunk size (e.g. limitation of the network packet size), or is stream-based like TCP, which doesn't know data chunks at all. In that case the network protocol has to handle that chunks itself and (if required) spreading the data over multiple packets.
Advanced Features 7.4. Name Resolution Name resolution tries to resolve some of the numerical address values to human readable names. There are two possible ways to do this conversations, depending on the resolution to be done: calling system/network services (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.
Advanced Features Enabling network name resolution when your name server is unavailable may significantly slow down Ethereal while it waits for all of the name server requests to time out. Use ADNS in that case. DNS vs. ADNS here's a short comparison: Both mechanisms are used to convert an IP address to some human readable (domain) name. The usual DNS call gethostname() will try to convert the address to a name. To do this, it will first ask the systems hosts file (e.g.
Advanced Features 126
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 requests and responses captured). • • General statistics: • Summary about the capture file. • Protocol Hierarchy of the captured packets. • Endpoints e.g. traffic to and from an IP addresses. • Conversations e.
Statistics 8.2. The "Summary" window General statistics about the current capture file. Figure 8.1.
Statistics • 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). • Display some display related information. • Traffic some statistics of the network traffic seen. If a display filter is set, you will see values in both columns.
Statistics 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.
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 protocol is counted more than once. For example: in some tunneling configurations the IP layer can appear twice.
Statistics 8.4. Endpoints Statistics of the endpoints captured. Tip! If you are looking for a feature other network tools call a hostlist, here is the right place to look. The list of Ethernet or IP endpoints is usually what you're looking for. 8.4.1. What is an Endpoint? A network endpoint is the logical endpoint of separate protocol traffic of a specific protocol layer.
Statistics For each supported protocol, a tab is shown in this window. The tab labels shows the number of endpoints 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). Each row in the list shows the statistical values for exactly one endpoint.
Statistics 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 conversation 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 Endpoint?”. 8.5.2. The "Conversations" window Beside the list content, the conversations window work the same way as the endpoint ones, see Section 8.4.
Statistics 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.
Statistics • 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 information is available for many protocols. Service response time statistics are currently available for the following protocols: • DCE-RPC • Fibre Channel • H.225 RAS • LDAP • MGCP • ONC-RPC • SMB As an example, the DCE-RPC service response time is described in more detail.
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.
Statistics 140
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.
Customizing Ethereal 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 managers as well. In this section we will look at starting it from the command line. Ethereal supports a large number of command line parameters. To see what they are, simply enter the command ethereal -h and the help information shown in Example 9.1, “Help information available from Ethereal” (or something similar) should be printed. Example 9.1.
Customizing Ethereal 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 specified, in which case, the number of files is unlimited) and start writing to that file and so on.
Customizing Ethereal -m This option sets the name of the font used for most text displayed by Ethereal. XXX - add an example! -n Disable network object name resolution (such as hostname, TCP and UDP port names). -N Turns on name resolving for particular types of addresses and port numbers; the argument is a string that may contain the letters m to enable MAC address resolution, n to enable network address resolution, and t to enable transport-layer port number resolution.
Customizing Ethereal data for each packet. -S This option specifies that Ethereal will display packets as it captures them. This is done by capturing in one process and displaying them in a separate process. This is the same as "Update list of packets in real time" in the Capture Options dialog box. -t
Customizing Ethereal 9.3. Packet colorization A very useful mechanism available in Ethereal is packet colorization. You can set-up Ethereal so that it will colorize packets according to a filter. This allows you to emphasize the packets you are usually interested in. Tip! 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...
Customizing Ethereal In the Edit Color dialog box, simply enter a name for the color filter, and enter a filter string in the Filter text field. Figure 9.2, “The "Edit Color Filter" dialog box” shows the values arp and arp which means that the name of the color filter is arp and the filter will select protocols of type arp. 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...
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.
Customizing Ethereal 9.4. Control Protocol dissection The user can control how protocols are dissected. 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, Ethereal won't know if you use a common protocol on an uncommon TCP port, e.g.
Customizing Ethereal To disable or enable a protocol, simply click on it using the mouse or press the space bar when the protocol is highlighted. 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: 1. Enable All Enable all protocols in the list. 2. Disable All Disable all protocols in the list. 3.
Customizing Ethereal 5. Apply Apply the changes and keep the dialog box open. 6. Save Save the settings to the disabled_protos, see Appendix A, Configuration (and other) Files and Folders for details. 7. Cancel Cancel the changes and close the dialog box. 9.4.2. User Specified Decodes The "Decode As" functionality let you temporarily divert specific protocol dissections. This might be useful for example, if you do some uncommon experiments on your network. Figure 9.6.
Customizing Ethereal dialog box was opened. 4. Show Current Open a dialog box showing the current list of user specified decodes. 5. OK Apply the currently selected decode and close the dialog box. 6. Apply Apply the currently selected decode and keep the dialog box open. 7. 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 1.
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 Figure 9.8, “The preferences 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. Note! Preference settings are added frequently.
Customizing Ethereal 154
Customizing Ethereal 155
Appendix A. Configuration other) Files and Folders (and 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. Tip A list of the folders Ethereal actually uses can be found under the Folders tab in the dialog box coming up, when you select About Ethereal from the Help menu.
Configuration (and other) Files and Folders File/Folder Description Unix/Linux folders Windows folders temp Temporary files. Environment: TMPDIR Environment: TMPDIR or TEMP Windows folders %APPDATA% points to the personal configuration folder, typically C:\Documents and Settings\\Application Data (for further details, have a look at Section A.1.
Configuration (and other) Files and Folders written to disk when you press the Save button in the "Display Filters" dialog box. colorfilters This file contains all the color filters that you have defined and saved. It consists of one or more lines, where each line has the following format: @@ @[][] The settings from this file are read in at program start and written to disk when you press the Save button in the "Coloring Rules" dialog box.
Configuration (and other) Files and Folders hosts Ethereal uses the files listed in Table A.1, “Configuration files and folders overview” to translate IPv4 and IPv6 addresses into names. This file has the same format as the usual /etc/hosts file in unix systems. An example is: # Comments must be prepended by the # sign! 192.168.0.1 homeserver The settings from this file are read in at program start and never written by Ethereal. ipxnets Ethereal uses the files listed in Table A.
Configuration (and other) Files and Folders 95/98/ME The default in Windows 95/98/ME is: all users work with the same profile, which is located at: C:\windows\Application Data\Ethereal 98/ME (with enabled user profiles) In Windows 98 and ME you can enable separate user profiles. In that case, something like: C:\windows\Profiles\\Applicatio n Data\Ethereal is used.
Configuration (and other) Files and Folders 161
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: http://www.ethereal.
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.
Related command line tools C.2. tcpdump: Capturing with tcpdump for viewing with Ethereal There are occasions when you want to capture packets using tcpdump rather than ethereal, especially when you want to do a remote capture and do not want the network load associated with running 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 ethereal. For more information on tethereal, see the manual pages (man tethereal).
Related command line tools C.4. capinfos: capture files Print information about Included with Ethereal is a small utility called capinfos, which is a command-line utility to print information about binary capture files. Example C.1.
Related command line tools 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. Example C.2. Help information available from editcap $ editcap.
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.
Related command line tools -h This option provides help. -v This option specifies verbose operation. The default is silent operation. -T {encap type} 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. -F {capture type} This option specifies the capture file format to write the output file in. The default is libpcap format.
Related command line tools 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.
Related command line tools rawip - Raw IP arcnet - ARCNET arcnet_linux - Linux ARCNET atm-rfc1483 - RFC 1483 ATM linux-atm-clip - Linux ATM CLIP lapb - LAPB atm-pdus - ATM PDUs atm-pdus-untruncated - ATM PDUs - untruncated null - NULL ascend - Lucent/Ascend access equipment isdn - ISDN ip-over-fc - RFC 2625 IP-over-Fibre Channel ppp-with-direction - PPP with Directional Info ieee-802-11 - IEEE 802.11 Wireless LAN prism - IEEE 802.11 plus Prism II monitor mode header ieee-802-11-radio - IEEE 802.
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 -h Prints the version and options and exits. -v Causes mergecap to print a number of messages while it's working.
Related command line tools C.7. text2pcap: Converting ASCII hexdumps to network captures There may be some occasions when you wish to convert a hex dump of some network traffic into a libpcap file. Text2pcap is a program that reads in an ASCII hex dump and writes the data described into a libpcap-style capture file. text2pcap can read hexdumps with multiple packets in them, and build a capture file of multiple packets.
Related command line tools where specifies input filename (use - for standard input) specifies output filename (use - for standard output) [options] are one or more of the following -h -d -o hex|oct -l typenum : : : : -q -e l3pid : : -i proto : -m max-packet -u srcp,destp : : -T srcp,destp : -s srcp,dstp,tag: -S srcp,dstp,ppi: -t timefmt : Display this help message Generate detailed debug of parser states Parse offsets as (h)ex or (o)ctal.
Related command line tools -e l3pid Include a dummy Ethernet header before each packet. Specify the L3PID for the Ethernet header in hex. Use this option if your dump has Layer 3 header and payload (e.g. IP header), but no Layer 2 encapsulation. Example: -e 0x806 to specify an ARP packet. 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.
Related command line tools C.8. idl2eth: Creating dissectors from Corba IDL files In an ideal world idl2eth would be mentioned in the users guide in passing and documented in the developers guide. As the developers guide has not yet been completed it will be documented here. C.8.1. What is it? As you have probably guessed from the name, idl2eth takes a user specified IDL file and attempts to build a dissector that can decode the IDL traffic over GIOP.
Related command line tools Procedure for converting a Corba idl file into an ethereal dissector 1. To write the C code to stdout. idl2eth eg: idl2eth echo.idl 2. To write to a file, just redirect the output. idl2eth 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. If you don't want to use the shell script wrapper, then try steps 3 or 4 instead. 3. To write the C code to stdout.
Related command line tools 1. Exception code not generated (yet), but can be added manually. 2. Enums not converted to symbolic values (yet), but can be added manually. 3. Add command line options etc 4. More I am sure :-) C.8.5. Limitations See the TODO list inside packet-giop.c C.8.6. Notes 1. The "-p ./" option passed to omniidl indicates that the ethereal_be.py and ethereal_gen.py are residing in the current directory. This may need tweaking if you place these files somewhere else. 2.
Related command line tools 179
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. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
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. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License.
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. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
This Document's License (GPL) these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7.
This Document's License (GPL) FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 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. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
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. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.