Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 37 ยท Getting Started

Installing Wireshark and a Tour of the Interface

Install Wireshark on Windows, macOS or Linux with the right capture permissions, then learn the packet list, packet details and packet bytes panes.

Installing Wireshark is easy. Getting the permission to capture is the part that trips people up, because reading raw packets from a network card is a privileged operation. This lesson walks through the installation on each system, explains the capture driver, and then tours the main window so that the screenshots and names used in the rest of the course feel familiar.

Installing

Download only from the official site, wireshark.org, or from your operating system's package manager. Fake installers are a known way to spread malware, so avoid third-party download sites. Check the installer's checksum or signature if you are cautious.

Windows

  1. Run the installer. Accept the defaults unless you know why you would not.
  2. When asked, install Npcap, the capture driver (the successor of WinPcap). Without it you can open files but not capture live.
  3. Optionally allow Npcap in "WinPcap API-compatible mode" only if an old tool needs it.
  4. Start Wireshark from the Start menu. A normal user can capture once Npcap is installed with the default option, although some setups require "Run as administrator" to capture on every adapter.

macOS

Install the .dmg. The package includes ChmodBPF, a launch daemon that gives your user read access to the /dev/bpf* capture devices. Log out and back in after the first install if no interface shows up. Homebrew also offers a cask: brew install --cask wireshark.

Linux

On Debian and Ubuntu:

Terminal
sudo apt install wireshark
# answer "Yes" when asked whether non-superusers may capture
sudo usermod -aG wireshark $USER   # then log out and in

Capturing is done by a small helper, dumpcap, which has special capabilities. Only members of the wireshark group may run it, so you never need to run the whole GUI as root (and you should not: a large program parsing hostile data as root is a bad idea). On Fedora, sudo dnf install wireshark and add yourself to the wireshark group. Verify with:

Terminal
wireshark --version
dumpcap -D        # lists the interfaces you may capture on

If dumpcap -D prints nothing, your permissions are wrong, not Wireshark.

Use the stable release in production work. Wireshark 4.x adds new dissectors with every minor release, so keep it updated: dissector bugs have been security problems in the past, and you will open untrusted capture files with it.

The welcome screen

When you start Wireshark you see the list of available interfaces, each with a tiny live graph (a sparkline) showing recent traffic, plus recently opened files. An interface with a moving line is carrying traffic. Double-click it to start capturing, or select it and press the blue shark fin button. The red square stops the capture, and the green circular arrow restarts it.

The three panes

After you open a file or start a capture, the window splits into three main panes.

flowchart TB
    A["Display filter bar"]
    B["Packet List<br/>one row per packet"]
    C["Packet Details<br/>tree of protocol fields"]
    D["Packet Bytes<br/>hex and ASCII"]
    E["Status bar: profile, packet counts, expert info"]
    A --> B --> C --> D --> E

The classic Wireshark layout, top to bottom.

Packet List

One row per packet. The default columns are No. (capture order), Time, Source, Destination, Protocol, Length and Info. The row color comes from coloring rules: for example TCP resets and errors are drawn black with red text. You can sort by clicking a column header, and you can change which columns exist (see columns, coloring and profiles).

Packet Details

A collapsible tree for the selected packet, from the frame down to the application. Typical top-level lines are Frame, Ethernet II, Internet Protocol Version 4, Transmission Control Protocol and an application protocol. Clicking a field highlights the exact bytes that make it up in the Packet Bytes pane. Right-click any field to Apply as Filter, which writes the display filter for you. This is the fastest way to learn filter names.

Packet Bytes

The raw frame as hexadecimal with an offset on the left and ASCII on the right. Click a byte and the matching field in the details tree is selected. When a payload is readable text (HTTP headers, for example) you can see it in the ASCII column.

Newer versions also offer a Packet Diagram view that draws the protocol header as a box diagram, useful for teaching.

Other parts of the window

  • Menu bar. File (open, save, export), Edit (find, mark, preferences), View (columns, zoom, coloring), Go (jump to packet), Capture (options, start, stop), Analyze (display filters, follow stream, expert info), Statistics, Telephony, Wireless, Tools.
  • Main toolbar. Start, stop, restart, open, save, find, go to, zoom and colorize buttons.
  • Display filter bar. Type a filter, a green bar means the syntax is valid, red means an error, yellow means a warning (valid but probably not what you meant). Display filter basics covers it.
  • Status bar. Left side: the Expert Information icon, capture file name. Middle: packets captured, displayed and marked. Right: the profile in use.

Stand-in: the details tree

Wireshark builds the details tree from nested fields. This stand-in prints a dictionary as a collapsible-style tree, so you can see how one frame is organized. The values are invented.

Python A Packet Details tree (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Stand-in: the bytes pane

The hex dump is easy to produce. Wireshark prints 16 bytes per row: an offset, the bytes in hex, and the printable characters. This stand-in dumps the start of an HTTP request, which is a good way to see why Wireshark can show you readable text.

Python A hex dump like the Packet Bytes pane (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Preferences worth setting on day one

Open Edit > Preferences:

  • Appearance > Layout: choose a layout; many analysts stack the panes or put details and bytes side by side.
  • Appearance > Columns: add Delta time displayed and Source port / Destination port later; they save you a lot of clicking.
  • Name Resolution: leave network-name resolution off while capturing. Reverse DNS lookups are slow and they generate extra DNS traffic that pollutes your capture.
  • Protocols > TCP: keep Analyze TCP sequence numbers and Relative sequence numbers on.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why should you add yourself to the wireshark group on Linux instead of running the whole GUI as root?

    dumpcap performs the privileged capture; the large GUI that dissects untrusted packets should run unprivileged.
  2. 2. You click a byte in the Packet Bytes pane. What happens?

    The panes are linked: selecting bytes highlights the field they belong to, and the other way round.
  3. 3. What does a red display filter bar mean?

    Green is valid, red is invalid syntax, yellow is valid but suspicious.
  4. 4. Why leave network name resolution off while capturing?

    Resolving names sends DNS queries that appear in the capture and slow the display.

Summary

  • Download Wireshark only from the official site or your package manager; install Npcap on Windows.
  • On Linux add your user to the wireshark group; macOS uses ChmodBPF.
  • The main window has a Packet List, a Packet Details tree and a Packet Bytes pane, all linked together.
  • The filter bar color tells you if your syntax is valid; the status bar shows counts and the active profile.
  • Right-click a field and choose Apply as Filter to learn filter names quickly.

Next: Packets, Layers and Encapsulation