Listen to this Post

Introduction:
When pings respond, traceroutes complete, and logs show nothing unusual, yet applications crawl and users complain—the truth lies in the packets. Wireshark, the world’s most powerful network protocol analyzer, transforms raw network traffic into actionable intelligence, revealing TCP retransmissions, DNS failures, SSL/TLS handshake anomalies, and hidden security threats that traditional tools miss【8†L1-L4】. This article distills years of hands-on security engineering experience into a practical Wireshark cheat sheet, equipping you with the filters, operators, and forensic techniques needed to diagnose complex network issues and harden your infrastructure against attackers.
Learning Objectives:
- Master essential Wireshark display filters to isolate traffic by IP, port, protocol, and TCP flags for rapid troubleshooting.
- Apply logical operators (AND, OR, NOT) to construct precise packet-capture queries that cut through noise.
- Analyze TCP retransmissions, SSL/TLS handshakes, and DNS failures to pinpoint application slowdowns and connectivity breaks.
- Leverage Wireshark’s analysis tools alongside Linux/Windows CLI commands for comprehensive network forensics.
- Implement packet-level security monitoring to detect VPN/IPSec tunneling issues, packet drops, and malicious traffic patterns.
You Should Know:
- Essential Wireshark Filters: Your First Line of Defense
Wireshark’s display filters are the gateway to packet-level visibility. Unlike capture filters (which discard packets before recording), display filters only hide packets from view—preserving all data for later analysis. The most frequently used filters in any security engineer’s toolkit include:
– `ip.addr == x.x.x.x` – Shows all traffic to or from a specific host. Critical for isolating a single machine’s behavior during an incident.
– `tcp.port == 80` or `tcp.port == 443` or `tcp.port == 22` – Filters HTTP, HTTPS, or SSH traffic respectively. Replace the port number to target any service.
– `tcp.analysis.retransmission` – Instantly reveals TCP retransmissions, the 1 culprit behind sluggish applications and unstable connections【8†L8-L12】.
– `http.request` – Displays only HTTP request methods (GET, POST, etc.), helping you trace web client activity.
– `tcp.flags.syn == 1` – Isolates SYN packets, allowing you to observe TCP three-way handshake initiation and identify connection attempts.
Step‑by‑step guide:
- Launch Wireshark and select the active network interface (e.g., Ethernet, Wi-Fi).
- In the filter bar (just above the packet list), type `tcp.port == 443 and ip.addr == 192.168.1.100` to see HTTPS traffic between your machine and a specific server.
- Press Enter to apply the filter. Observe the packet list—only matching packets remain visible.
- To investigate retransmissions, clear the filter and type
tcp.analysis.retransmission. Highlighted packets indicate segments being resent, signaling network congestion or packet loss. - Right-click any packet and select “Follow TCP Stream” to reconstruct the entire conversation in readable format—perfect for debugging API calls or extracting malicious payloads.
2. Logical Operators: Building Precision Queries
Wireshark supports three logical operators that transform basic filters into powerful interrogation tools:
- and (or
&&) – Both conditions must be true. Example: `tcp.port == 443 and ip.addr == 10.0.0.5` shows only HTTPS traffic to that specific IP. - or (or
||) – Either condition can match. Example: `tcp.port == 80 or tcp.port == 443` captures all HTTP and HTTPS traffic. - not (or
!) – Excludes unwanted traffic. Example: `not arp` removes Address Resolution Protocol noise from your view【8†L14-L18】.
Step‑by‑step guide:
- To monitor all web traffic except from a particular noisy host, use:
(tcp.port == 80 or tcp.port == 443) and not ip.addr == 192.168.1.200. - For advanced threat hunting, combine filters with protocol fields: `tcp.flags.syn == 1 and tcp.flags.ack == 0 and ip.dst == 203.0.113.5` – this reveals SYN packets sent to a specific destination (useful for detecting port scans).
- Save complex filters as macros via Analyze → Display Filter Macros for one-click reuse during future investigations.
- Use parentheses to group conditions:
(http or dns) and (ip.src == 10.0.0.2 or ip.dst == 10.0.0.2).
3. TCP Retransmissions & Flow Control Analysis
TCP retransmissions occur when an acknowledgment (ACK) isn’t received within the expected timeout, forcing the sender to resend data. This is a primary indicator of network congestion, bandwidth saturation, or faulty hardware. Wireshark’s `tcp.analysis.retransmission` filter highlights these events, but deeper analysis requires understanding the TCP stream.
Step‑by‑step guide:
- Apply `tcp.analysis.retransmission` and note the packet numbers and time deltas between retransmitted segments.
- Select a retransmitted packet, expand the TCP header in the middle pane, and examine the Sequence Number and Acknowledgment Number fields to track data flow.
- Use Statistics → Flow Graph to visualize the entire TCP conversation, identifying where ACKs are delayed or missing.
- On Linux, complement Wireshark with `ss -ti` to display TCP socket statistics including retransmit counts and round-trip times. On Windows, use `netsh interface tcp show global` to check TCP parameters like Chimney Offload and Receive Window Auto-Tuning.
- If retransmissions are excessive, check for duplex mismatches on switches or increase buffer sizes via `/proc/sys/net/ipv4/tcp_mem` (Linux) or registry keys (Windows).
4. SSL/TLS Handshake Inspection & Decryption
SSL/TLS handshake failures are notorious for breaking applications silently. Wireshark can decrypt TLS traffic if you provide the server’s private key or use session keys from the browser. The filters `tls.handshake.type == 1` (Client Hello) and `tls.handshake.type == 2` (Server Hello) isolate handshake initiation.
Step‑by‑step guide:
- Filter with `tls.handshake.type == 1` to see all Client Hello messages—examine the Cipher Suites field to understand what encryption algorithms the client supports.
- For failed handshakes, look for `tls.alert_message` packets—these contain error codes like “handshake failure” (40) or “protocol version” (70).
3. To decrypt TLS traffic in Wireshark:
- On Linux, set the environment variable `SSLKEYLOGFILE=/path/to/keys.log` before launching Firefox/Chrome.
- In Wireshark, go to Edit → Preferences → Protocols → TLS, and enter the path to the keys.log file under “(Pre)-Master-Secret log filename”.
- Traffic to that browser session will now be decrypted in real-time.
- For server-side decryption (non-browser), obtain the RSA private key and add it in the same TLS preferences pane (use Edit → Preferences → Protocols → TLS → RSA keys list).
- Always verify that the cipher suite negotiated is strong (e.g., TLS_AES_256_GCM_SHA384) and not deprecated like SSLv3 or TLS 1.0.
5. DNS Failure Diagnosis & Spoofing Detection
DNS issues cause “server not found” errors and application timeouts. Wireshark filters like `dns.flags.response == 0` show queries, while `dns.flags.rcode != 0` reveals error responses (e.g., NXDOMAIN, SERVFAIL).
Step‑by‑step guide:
- Apply `dns` to view all DNS traffic. Look for queries with no corresponding responses—these indicate timeouts or unreachable DNS servers.
- Use `dns.qry.name contains “example.com”` to trace resolution for a specific domain.
- To detect DNS spoofing or cache poisoning, compare the response IP addresses against known-good records. Suspiciously low TTL values (under 300 seconds) may indicate malicious activity.
- On Windows, run `ipconfig /displaydns` to view the local DNS cache, then `ipconfig /flushdns` to clear it before retesting. On Linux, use `systemd-resolve –statistics` or `nscd -g` to check cache hits and misses.
- For advanced analysis, enable Enable DNS name resolution in Wireshark’s Name Resolution preferences to convert IPs to hostnames automatically—but be cautious as this generates extra DNS traffic.
6. VPN/IPSec Tunnel Monitoring & Security Hardening
VPN and IPSec tunnels encapsulate traffic, making inner packets invisible to standard filters. Wireshark can still monitor the outer encapsulation (ESP, AH, or UDP ports 500/4500 for IKE). Filters like `esp` or `udp.port == 4500` isolate tunnel traffic.
Step‑by‑step guide:
- Apply `udp.port == 500 or udp.port == 4500` to watch IKE key exchange and NAT-Traversal packets. Look for `ikev2` or `isakmp` protocols in the Info column.
- To verify tunnel integrity, check for `esp` packets with valid Sequence Numbers—gaps may indicate packet drops or replay attacks.
- For performance analysis, use Statistics → IO Graph with filter `esp` to visualize throughput over time. Spikes in retransmissions inside the tunnel suggest underlying network issues.
- On Linux, use `ip xfrm state` and `ip xfrm policy` to inspect IPSec Security Associations and policies. On Windows, `netsh ipsec dynamic show all` provides similar information.
- Security best practice: Ensure IKE uses strong cryptographic algorithms (AES-256, SHA-256) and that Perfect Forward Secrecy (PFS) is enabled. Wireshark’s `ikev2.transform` field reveals the proposed encryption and hash algorithms.
7. Packet Drops, Slow Applications & Performance Profiling
Slow applications often stem from high latency, packet loss, or window scaling issues. Wireshark’s TCP Stream Graph (Statistics → TCP Stream Graph → Time-Sequence (Stevens) ) plots sequence numbers against time, revealing slow starts, congestion windows, and zero-window events.
Step‑by‑step guide:
- Capture traffic during a slow application session, then apply `tcp.stream eq X` (where X is the stream index) to isolate that connection.
- Open Statistics → TCP Stream Graph → Window Scaling to see if the receive window is being reduced—this indicates the receiver is overwhelmed.
- Check for zero-window packets (
tcp.window_size == 0)—these occur when the receiver’s buffer is full, effectively halting transmission. - On Linux, use `tc -s qdisc show` to view queueing disciplines and packet drops at the network interface level. On Windows, `netsh interface tcp show global` reveals autotuning levels; set `netsh interface tcp set global autotuninglevel=normal` to restore default behavior.
- For cloud environments (AWS, OCI), leverage VPC Flow Logs alongside Wireshark captures to correlate dropped packets with security group or NACL denials.
What Undercode Say:
- Key Takeaway 1: Wireshark is not just a troubleshooting tool—it’s a security Swiss Army knife. Mastering display filters and logical operators transforms raw packets into a narrative of your network’s health and threat surface. The difference between a junior and senior engineer often lies in the ability to read the conversation between hosts, not just the individual packets【8†L20-L22】.
-
Key Takeaway 2: Combining Wireshark with native OS commands (Linux:
ss,tcpdump,ip xfrm; Windows:netsh,ipconfig,Get-1etTCPConnection) creates a powerful hybrid forensic workflow. While Wireshark provides the visual depth, CLI tools offer real-time stats and configuration insights that are indispensable for root-cause analysis and remediation.
Analysis: The post underscores a critical reality in modern IT: networks are black boxes until you inspect the packets. With the rise of encrypted traffic (TLS 1.3, QUIC) and complex cloud architectures, traditional monitoring tools often fail to provide the granularity needed. Wireshark bridges this gap, but only if engineers invest time in learning its filter syntax and analytical graphs. The cheat sheet shared—covering retransmissions, handshakes, and DNS—is precisely the kind of practical knowledge that separates reactive firefighting from proactive network engineering. Moreover, the emphasis on logical operators (and, or, not) highlights that effective packet analysis is as much about exclusion (removing noise) as it is about inclusion (finding needles). For security teams, this translates to faster Mean Time to Detect (MTTD) and Mean Time to Respond (MTTR) during incidents.
Prediction:
- +1 As 5G and edge computing proliferate, packet-level analysis will become even more critical for diagnosing latency-sensitive applications. Wireshark’s role will expand beyond troubleshooting to include real-time security orchestration, with AI-assisted filters that automatically flag anomalous patterns.
-
+1 The convergence of Wireshark with cloud-1ative observability tools (e.g., AWS VPC Traffic Mirroring, Azure Network Watcher) will enable seamless hybrid forensics, allowing engineers to capture packets in the cloud and analyze them locally with the same familiar interface.
-
-1 However, the increasing adoption of post-quantum cryptography and encrypted TLS 1.3 handshakes will make traditional decryption methods obsolete, forcing security teams to rely more on metadata and flow logs rather than deep packet inspection—reducing visibility unless new standards for lawful interception emerge.
-
-1 The skill gap in packet analysis remains a significant vulnerability. As networks grow more complex, organizations that fail to train their staff in Wireshark fundamentals will experience longer outage times and increased exposure to undetected breaches, particularly in multi-cloud and hybrid environments where traffic paths are non-linear.
-
+1 Open-source projects and community-driven cheat sheets (like the one highlighted) will continue to democratize network forensics, lowering the barrier to entry for junior engineers and ensuring that packet-level knowledge remains accessible despite commercial vendor lock-in.
▶️ Related Video (84% Match):
https://www.youtube.com/watch?v=0UBzdABYrBs
🎯Let’s Practice For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
IT/Security Reporter URL:
Reported By: Priombiswas Infosec – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


