Network security

Wireshark Network Protocol Analyzer: What It Is, How It Works & Uses

Wireshark turns raw network traffic into readable packets. Here is how it captures, dissects and filters traffic — and how to use it safely and legally.

Cysoro Security TeamPublished · 7 min read
NETWORK SECURITYWiresharkProtocol AnalyzerCapture, dissect and read network packetsPacket ListTCP 192.0.2.10 → 93.184.216.34DNS Standard query ATLS Client HelloPacket DetailsFrame • Ethernet • IP • TCPhttp • dns • tlsFree • Open source
Quick answer

Wireshark is a free, open-source network protocol analyzer that captures packets from a network interface and dissects them layer by layer, so you can see source and destination addresses, protocols, ports and payloads. It is used to troubleshoot networks, learn protocols and investigate security incidents, and it should only be used on networks you own or have permission to monitor.

Key takeaways

  • Wireshark captures live packets and dissects them into readable protocol layers.
  • Capture filters limit what is recorded; display filters limit what you see afterwards.
  • Only capture traffic you own or have permission to monitor — most traffic today is encrypted.

Wireshark is the closest thing networking has to an X-ray machine. It takes the invisible traffic flowing through a network cable or Wi-Fi connection and turns it into a readable list of packets — each one showing who sent it, where it was going, which protocol it used, and what it carried.

What is Wireshark?

Wireshark is a free, open-source network protocol analyzer used to capture, inspect and dissect digital traffic running across a computer network in real time. It is widely described as the industry-standard packet analyzer, and it is used by network administrators, security professionals and developers.

It was originally created by Gerald Combs in 1998 under the name Ethereal, and it has been built and maintained since then by more than 1,000 contributors. It runs on Windows, macOS and Linux, and it is included in some Linux distributions such as Kali Linux.

Think of it as a digital microscope for network traffic: it translates raw binary data moving through a network interface into a structured, human-readable format, protocol layer by protocol layer.

How does Wireshark work?

Wireshark works in five steps: capture, dissection, display filtering, payload inspection and stream reassembly. Understanding that pipeline makes the interface much less intimidating.

  1. Packet capture: Wireshark uses the operating system packet-capture library — Npcap on Windows, libpcap on Linux and macOS — to grab raw frames from the network interface card.
  2. Protocol dissection: as packets arrive, Wireshark runs them through thousands of built-in protocol dissectors that identify and organize the data by protocol layer.
  3. Display filtering: you apply expressions to sift through the capture, isolating specific IP addresses, ports or error flags.
  4. Payload inspection: you open a single packet to see its raw hexadecimal bytes and ASCII text.
  5. Stream reassembly: Wireshark can rebuild scattered packet fragments into the original conversation, so you can read a complete exchange as the applications experienced it.

Wireshark can capture from Ethernet, Wi-Fi, Bluetooth, VPNs and many other media. On a switched network you normally see only traffic to and from your own machine, unless you capture on a mirror port or a hub — which is why permission and placement matter.

How Wireshark turns traffic into answers1CaptureNpcap / libpcapreads raw frames2Dissectthousands ofprotocol decoders3Filtercapture vs displayfilters4Inspecthex + ASCIIpayload view5Reassemblefollow the fullstreamCapture less, filter more: narrow the capture first, then narrow the view.
How Wireshark captures, dissects, filters, inspects and reassembles network traffic. Illustration by Cysoro.

What does the Wireshark interface show?

Wireshark shows three panes. Once you know what each one is for, the screen stops looking like noise and starts looking like a conversation.

PaneWhat it showsWhat to use it for
Packet List (top)Every captured packet: number, time, source, destination, protocol, length, infoSpot patterns, errors and unusual hosts at a glance
Packet Details (middle)The selected packet broken into layers: frame, Ethernet, IP, TCP or UDP, then the application protocolRead ports, flags, TTL, sequence numbers and protocol fields
Packet Bytes (bottom)Raw data in hexadecimal and ASCIIInspect payloads, headers and file transfers byte by byte

The Packet List also color-codes packets by protocol and by expert information, such as retransmissions, checksum errors and malformed packets. Those colors are a fast way to find trouble: a sea of red or black usually means something is wrong.

Above the panes, the display filter bar is where most analysis happens. Type an expression, press Enter, and only matching packets remain visible. The capture itself is unchanged.

How do capture filters and display filters differ?

Capture filters and display filters solve different problems, and confusing them is the most common beginner mistake. A capture filter decides what gets recorded. A display filter decides what you see.

  • Capture filters are applied before capture starts, use libpcap syntax similar to tcpdump, and reduce the size of the capture file. Example: host 192.0.2.10 or port 80.
  • Display filters are applied after capture, use Wireshark own expression language, and only hide packets from view. Example: tcp.port == 80 or dns or ip.addr == 192.0.2.10.

Use a capture filter when you know in advance what you need and want a small file. Use a display filter when you want to explore a capture you already have. Common display filters include http, dns, tcp.flags.reset == 1 for reset connections, and tls.handshake.type == 1 for TLS handshakes.

Wireshark also supports following a stream: right-click a TCP, UDP, TLS or HTTP packet and choose Follow, and Wireshark reassembles the whole conversation into readable text.

What are Wireshark key features?

Wireshark supports live capture from many network media, import and export for many other capture programs, and a very large set of protocol dissectors that decode protocols field by field.

  • Live capture: Ethernet, Wi-Fi, Bluetooth, VPN and more, in real time.
  • Protocol dissectors: thousands of protocols, from TCP, IP, HTTP and DNS to obscure industrial and telephony protocols.
  • Powerful filtering: capture filters before capture, display filters after, plus saved filters and macros.
  • Statistics: protocol hierarchy, conversations, endpoints, I/O graphs, service response times and flow graphs.
  • Expert information: automatic flags for errors, warnings and unusual behavior.
  • VoIP and telephony: call analysis, RTP streams and playback for supported codecs.
  • Command line: tshark for scripting, dumpcap for capture, and editcap and mergecap for working with files.

The official User Guide, now at version 5.1.0, documents all of these in detail, including capture file formats, name resolution, checksums, packet reassembly and time zones.

What is Wireshark used for in security?

Security teams use Wireshark to investigate incidents, spot malicious traffic and verify that controls actually work. It is a diagnostic tool, not a firewall or an intrusion prevention system: it watches, it does not block.

  • Incident investigation: find command-and-control traffic, DNS tunneling, data exfiltration and unusual destinations.
  • Malware analysis: see what a suspicious host connects to, which protocols it uses, and what it downloads.
  • Troubleshooting: prove whether a problem is DNS, TLS, TCP retransmissions, or the application itself.
  • Protocol learning: watch a real DNS lookup, TLS handshake or HTTP request unfold packet by packet.
  • Verifying encryption: confirm that sensitive traffic is actually using TLS and not leaking in plain text.

For a quick check of your own public address, our what is my IP tool is a faster starting point than a full packet capture.

For DNS, try our DNS lookup tool before you open Wireshark.

The official guide is the best reference for the details in this article: see the Wireshark User's Guide, version 5.1.0.

Sysdig also gives a clear overview in its What is Wireshark explainer.

How do you start your first Wireshark capture?

Your first capture should be small, on your own machine, and focused on one thing. That keeps the file manageable and the learning fast.

  1. Install Wireshark from the official site. On Windows, let it install Npcap when asked.
  2. Pick one interface. Choose your Wi-Fi or Ethernet interface from the welcome screen.
  3. Set a capture filter if you know what you want. For example, host example.com is too narrow to start; try port 53 for DNS only.
  4. Click the shark-fin button or press Ctrl+E. Traffic appears in real time.
  5. Generate some traffic. Visit a website or run a DNS lookup, then stop the capture.
  6. Apply a display filter. Try dns or http and click a packet to see its layers.
  7. Save the file. Save as pcapng so you can reopen it later or share it with a colleague.
Only capture what you are allowed to captureOn a shared or work network, get written permission first. Capture files can contain passwords, tokens and private data, so treat them like sensitive documents.
Reading a Wireshark screenPacket List — top paneNo. Time Source Destination Protocol Length InfoPacket Details — middle paneFrame, Ethernet, Internet Protocol, TCP, then the application protocolPacket Bytes — bottom paneRaw hexadecimal + ASCII for the selected packet
The three Wireshark panes: packet list, packet details and packet bytes. Illustration by Cysoro.

What can Wireshark not do?

Wireshark has clear limits, and knowing them saves frustration. The official guide even has a section called "What Wireshark is not".

  • It cannot read encrypted payloads without the keys. Most web traffic is TLS-encrypted, so you will see metadata, not content.
  • It is not an intrusion detection system. It does not alert you or block attacks; it shows you traffic to analyze.
  • It cannot see traffic it never receives. On a switched network, you only see your own traffic unless you use a mirror port or capture on the device itself.
  • It does not fix problems. It tells you where the problem is; you still have to fix the DNS server, the firewall rule or the application.

For encrypted traffic, Wireshark can still be useful: TLS handshake details, certificate information, DNS queries before the connection, and traffic timing and size all remain visible.

Wireshark vs tcpdump vs tshark: what is the difference?

Wireshark, tcpdump and tshark are related tools, not competitors. They share the same capture libraries and often the same files.

ToolInterfaceBest for
WiresharkGraphicalInteractive analysis, learning, incident investigation
tsharkCommand line, part of WiresharkScripting, automation, headless servers
tcpdumpCommand line, separate toolQuick captures on servers, minimal installs
StratosharkGraphical, same UI as WiresharkSystem calls and logs, not network packets

Stratoshark is an open-source companion tool that shares Wireshark UI, dissection engine and filtering code, but captures system calls and log messages instead of network packets. Learn Wireshark first, then add tshark when you need automation.

The bottom line

Wireshark is free, open-source and still the standard way to see what is really happening on a network. Start on your own machine, capture something small, and practice reading the three panes and writing display filters.

Use it to troubleshoot, to learn protocols, and to investigate incidents — always with permission. For a broader network-security baseline, see our guide to securing your Wi-Fi.

The small business cybersecurity checklist covers the other controls to pair with packet analysis.

Frequently asked questions

What is Wireshark used for?

Wireshark is used to capture and inspect network traffic, troubleshoot slow or broken connections, learn how protocols work, and investigate security incidents. Network administrators, security analysts and developers all use it.

Is Wireshark free?

Yes. Wireshark is free, open-source software, available for Windows, macOS and Linux. It was originally created by Gerald Combs in 1998 as Ethereal and is maintained by a large community of contributors.

Is Wireshark legal?

Using Wireshark on your own network or with permission is legal in most places. Capturing other people's traffic without permission can break privacy and computer-misuse laws. Only capture traffic you are authorized to monitor.

Can Wireshark see encrypted traffic?

Wireshark can see that encrypted traffic exists, including source, destination, ports and timing, but it cannot read the encrypted payload. You can decrypt your own TLS traffic if you have the session keys.

What is the difference between a capture filter and a display filter?

A capture filter limits what is recorded before capture starts, using libpcap syntax. A display filter limits which captured packets are shown afterwards, without deleting the rest.

What file format does Wireshark use?

Wireshark captures are usually saved as pcapng, the modern format, or the older pcap format. Both can be opened by Wireshark, tcpdump, tshark and many other tools.

Do I need to install anything extra to capture packets?

On Windows, Wireshark installs Npcap, the packet-capture library it uses to read raw frames from the network card. On Linux and macOS it uses libpcap.

Sources

  1. Wireshark — User's Guide, version 5.1.0
  2. Sysdig — What is Wireshark?
  3. Sophos — What is Wireshark?
  4. Nagios Library — Wireshark Deep Dive
  5. GeeksforGeeks — Wireshark: Packet Capturing and Analyzing
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the official Wireshark User's Guide version 5.1.0 and Wireshark explainers from Sysdig and Sophos.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free