Wireshark Tutorial: Complete Network Traffic Analysis Guide

Wireshark is one of the most powerful and widely used network protocol analyzers. It allows you to capture and inspect network traffic in real time, making it an essential tool for cybersecurity professionals, ethical hackers, and network administrators.

On this page:

What is Wireshark?

Wireshark is a free and open-source packet analysis tool that captures data traveling across a network. It helps users understand how devices communicate and allows deep inspection of network protocols.

Originally released in 1998 under the name Ethereal, the project was renamed Wireshark in 2006 and has since become the de facto standard tool for network troubleshooting, protocol development, and security analysis worldwide.

How Wireshark Works

Wireshark Welcome Screen

Wireshark Welcome Screen:

Wireshark Welcome Screen

The welcome screen shows available network interfaces such as Wi-Fi or Ethernet. Selecting one will immediately start capturing packets.

Main Interface Components

Menu Bar

Access file options, settings, and export tools.

Toolbar

Quick controls for starting and stopping captures.

Display Filter Bar

Allows filtering of packets based on protocol or IP.

Packet List

Shows captured packets with details like time, source, and protocol.

Starting Packet Capture

Starting Packet Capture:

Wireshark Packet Capture

Select a network interface and Wireshark will begin capturing traffic instantly. You will see packets appearing in real time.

Understanding the Interface

Wireshark Interface:

Wireshark Interface

Generating Traffic for Analysis

To analyze packets, you need traffic. A simple way is using the ping command:

ping google.com

This generates ICMP packets that Wireshark can capture.

Ping Requests:

Ping command sending ICMP requests

Captured Packets:

Wireshark capturing ICMP packets

Stopping Packet Capture

Stop Capture Button:

Wireshark stop button

Click the red square button to stop capturing packets once enough data is collected.

Filtering Packets

Example filter:

icmp

This shows only ICMP packets.

Filtered Packets:

Wireshark ICMP filter

Common Display Filters

FilterWhat It Shows
httpUnencrypted HTTP traffic
tcp.port == 443Traffic on port 443 (typically HTTPS)
ip.addr == 192.168.1.1All traffic to or from a specific IP address
dnsDNS query and response traffic
tcp.flags.syn == 1TCP connection attempts (SYN packets)
arpARP traffic, useful for spotting spoofing attempts

Filters can also be combined using && (and) and || (or) — for example, ip.addr == 192.168.1.1 && tcp.port == 443 narrows results to HTTPS traffic for one specific device.

Understanding Packet Colors

Wireshark color-codes packets by default to make patterns easier to spot at a glance: light purple typically indicates TCP traffic, light blue indicates UDP, black with red text usually flags packets with errors like malformed segments, and green is commonly used for HTTP traffic. These rules are fully customizable under View → Coloring Rules.

Real-World Use Cases

Wireshark is used across a wide range of legitimate network and security work:

Wireshark vs. Other Traffic Tools

ToolPrimary UseBest For
WiresharkDeep packet inspection with a GUIDetailed, visual analysis of captured traffic
tcpdumpCommand-line packet captureLightweight capture on servers without a GUI
tsharkCommand-line version of WiresharkScripting and automated capture using Wireshark's engine
ZeekNetwork security monitoringLarge-scale, ongoing network traffic analysis and logging

Many professionals use tcpdump or tshark to capture traffic on a remote server, then transfer the capture file to Wireshark on their own machine for detailed visual analysis.

Common Mistakes

Why Wireshark is Important

Wireshark helps detect attacks, troubleshoot networks, and understand how data flows across systems. It is essential for anyone learning cybersecurity.

FAQs

Is Wireshark legal?

Yes, when used on networks you own or have permission to analyze. Capturing traffic on networks you don't control can violate privacy and computer misuse laws.

Can Wireshark capture passwords?

Only if the traffic is unencrypted. Modern HTTPS and other encrypted protocols prevent Wireshark from reading the actual content, though metadata is still visible.

Is Wireshark beginner-friendly?

Yes, with practice. The interface can feel overwhelming at first, but starting with simple filters like icmp or dns makes it much more approachable.

Does Wireshark work on Windows, macOS, and Linux?

Yes, Wireshark is cross-platform and free on all three.

What's the difference between Wireshark and tcpdump?

tcpdump is a lightweight, command-line-only capture tool often used on servers, while Wireshark provides a full graphical interface for deep, visual packet analysis.

Conclusion

Wireshark is a powerful tool for analyzing network traffic. Learning it provides deep insight into cybersecurity and network behavior.

Written by: PasswordGeeks Team