Wireshark
Wireshark is the universal network protocol analyzer — the tool every network engineer, security analyst, and developer reaches for when "why isn't this working?" needs an answer. It captures every packet flowing through an interface and displays them at every protocol layer, from Ethernet headers up to HTTP bodies. Used wisely, it answers questions no other tool can.
Wireshark is the free, open-source network protocol analyzer that has been the de facto standard since the late 1990s (originally called Ethereal). It captures packets from network interfaces and decodes them into human-readable form, supporting thousands of protocols at every layer. The skill of reading Wireshark output is one of the most useful in networking.
What Wireshark does
- Captures packets. From any network interface — Ethernet, Wi-Fi, loopback. Stores them in pcap or pcapng files.
- Decodes protocols. Parses each packet through every protocol layer present — Ethernet → IP → TCP → TLS → HTTP, for instance. Highlights structure clearly.
- Filters. Display filters narrow what you see ("http.host contains example.com"). Capture filters narrow what's recorded ("port 80 or port 443").
- Follows streams. Reassembles all packets in a connection into a single coherent view of the conversation.
- Analyzes. Built-in tools for protocol statistics, throughput graphs, conversation lists, expert info.
- Decrypts. Given the keys, can decrypt TLS, WPA, and other encrypted protocols.
What questions Wireshark answers
- Why is this request slow? (TCP retransmissions, slow handshake, packet loss visible in the trace)
- What exactly is this app sending? (Headers, payloads, timing)
- Is the server actually responding? (Or just timing out somewhere)
- What protocol is this device using? (Identifies unknown traffic by pattern matching)
- Why is my Wi-Fi flaky? (Retry counts, beacon analysis)
- What's the TLS handshake doing? (Cipher suite negotiation, certificate exchange, ALPN selection)
- Is my network unusually loud? (Broadcast traffic, scan attempts)
Common display filters
ip.addr == 192.168.1.100— traffic to/from a specific IPtcp.port == 443— HTTPS traffichttp.request— only HTTP request packetsdns— DNS queries and repliestls.handshake— TLS handshake packetstcp.flags.reset == 1— TCP resets (often indicates problems)!arp and !icmp— filter out noisy protocolsframe.time_delta > 1— gaps in conversation longer than 1 second
tcpdump: the command-line cousin
For headless servers and quick captures, tcpdump uses the same packet-capture infrastructure (libpcap) with a command-line interface. Common patterns:
tcpdump -i eth0 -w capture.pcap port 80
tcpdump -i any -nn 'host 1.2.3.4 and port 443'
tcpdump -r capture.pcap 'tcp[tcpflags] & tcp-rst != 0'The capture files are interchangeable with Wireshark — capture with tcpdump on a server, copy the pcap file, analyze in Wireshark with GUI.
Decrypting TLS
Wireshark can decrypt TLS if you have the encryption keys. Two paths:
- Server-side RSA private key. Only works with non-forward-secret cipher suites; less useful in 2026.
- SSLKEYLOGFILE environment variable. Modern browsers and tools (curl, OpenSSL) log session keys to a file when SSLKEYLOGFILE points to one. Load the file in Wireshark and HTTPS becomes readable.
This is essential for debugging HTTPS applications. The SSLKEYLOGFILE approach is the only one that works for modern forward-secret cipher suites.
Wireshark and Wi-Fi
Wi-Fi capture requires monitor mode — putting the wireless interface into a state where it captures all packets on the channel, not just packets addressed to it. Drivers and OSes vary in monitor-mode support; macOS has it (with some hacks), Windows requires special drivers, Linux works well with most cards.
For WPA2 decryption, Wireshark needs the network passphrase and SSID. It then derives the per-session keys and decrypts captured traffic in real time.
The ethics layer
Capturing packets reveals everything visible on the network. On networks you don't own:
- Wiretap laws apply (US, EU, most countries restrict packet capture you don't own)
- Workplace policies usually require authorization
- Public Wi-Fi capture of others' traffic is generally illegal even on open networks
Use Wireshark on your own network, your own devices, or with explicit written authorization. Legitimate use cases are abundant; unauthorized capture is a crime.
Career relevance
Wireshark proficiency is implicit in many networking and security roles. The SANS SEC503 course (Intrusion Detection In-Depth) is built around Wireshark-style packet analysis. Network engineers, SOC analysts, security researchers, and developers building network-dependent applications all benefit from fluency.
For users who want to start: capture some of your own traffic, follow streams, learn the basic filters. Pcap files from CTF challenges and security training are abundant practice material.
Frequently asked questions
- Is Wireshark legal to use?
- On networks you own or have authorization to monitor, yes. On networks you don't own (public Wi-Fi, neighbors, coworkers without IT approval), no — capturing others' traffic is generally illegal regardless of whether the network is encrypted.
- Can Wireshark decrypt my neighbor's Wi-Fi?
- If you have their passphrase and SSID, yes — for WPA2 traffic. Without the passphrase, no. Even with it, doing so without authorization is illegal in most jurisdictions.
- Is tcpdump different from Wireshark?
- Same underlying capture mechanism (libpcap). tcpdump is command-line; Wireshark is graphical. Same pcap output format. Use whichever fits the task — tcpdump for quick captures and servers, Wireshark for analysis and complex investigation.
- Will Wireshark slow down my network?
- On gigabit-class wired networks, no noticeable impact. On Wi-Fi monitor mode, the wireless interface is dedicated to capture and can't simultaneously connect normally — so you can't browse and capture on the same interface. Use a separate dongle if you need both.
- How do I capture HTTPS in Wireshark?
- Set SSLKEYLOGFILE environment variable before starting your browser or app. Load the resulting key log file in Wireshark via Edit → Preferences → Protocols → TLS. HTTPS traffic becomes readable. Works only for traffic from apps that respect SSLKEYLOGFILE (most modern browsers and curl do).