Skip to content
Back to Blog
·10 min read·technology

Wireshark for Packet Analysis: Catching Attacks on the Wire

A practical Wireshark guide to capturing traffic and filters, and spotting plaintext credentials, scans, ARP spoofing, and DNS tunnelling for Indian blue teams.

BR

Bachao.AI Research Team

Cybersecurity Research

Scan Your Attack Surface

Security exposure this creates

Unpatched vulnerabilities in your tech stack are the #1 entry point for breaches targeting Indian businesses. Here's what to watch.

Wireshark is the open-source packet analysis tool security teams use to capture and inspect network traffic frame by frame, revealing plaintext credentials, port scans, ARP spoofing, DNS tunnelling, and data exfiltration that firewall logs alone never show. For Indian blue teams, learning to read a capture is the difference between guessing what happened during an incident and proving it. This guide covers capturing traffic, display filters, following TCP and HTTP streams, spotting credential leakage, detecting scan and spoofing patterns, and extracting indicators of compromise (IOCs) — all strictly against networks and systems you own or are explicitly authorised to monitor.

Why Packet Analysis Still Matters for Blue Teams

Endpoint logs and SIEM alerts tell you what a system reported. The packet capture tells you what actually crossed the wire — unfiltered, unaggregated, and impossible for a compromised host to lie about. When a SIEM alert fires on unusual outbound traffic, a raw capture is often the only way to confirm whether it's a false positive, a misconfigured service, or genuine exfiltration in progress.

🛡️
SECURITY
Only capture traffic on networks and systems you own or have explicit written authorisation to monitor. Intercepting communications without consent can violate Sections 43 and 66 of India's IT Act, 2000, and personal data captured incidentally falls under India's DPDP obligations for handling and retention.

Capturing Traffic: Interfaces, Promiscuous Mode, and Scope

Before opening Wireshark, define what you're capturing and why. Wireshark can listen on any interface — wired, wireless, or a virtual interface on a hypervisor — and in promiscuous mode it captures every frame the network card sees, not just traffic addressed to your own machine.

tshark -i eth0 -w incident-capture.pcapng

On a switched network, promiscuous mode alone won't show you other hosts' traffic — switches only forward frames to the intended port. To see broader traffic for legitimate monitoring, you need a SPAN/mirror port configured on the switch, or a network TAP, both of which require explicit authorisation from whoever owns that infrastructure.

    1. Capture filters (set before capture starts) reduce volume at the NIC level — e.g. host 10.0.0.5 or port 443.
    2. Ring buffers (-b filesize:100000 -b files:10) rotate capture files so long-running monitoring doesn't fill disk.
    3. Snap length (-s 0 for full packet) matters when you need full payload for credential or exfil analysis, not just headers.
💡
TIP
On a busy production segment, always start with a capture filter scoped to the host or subnet under investigation. Capturing an entire uplink "just in case" produces gigabytes of noise that make the real signal harder to find, not easier.

Display Filters: Narrowing the Noise

Once you have a capture — live or a saved .pcap/.pcapng file — display filters are how you actually find anything. Unlike capture filters, display filters don't discard data; they just hide it from view, so you can always widen the filter without recapturing.

http.request.method == "POST" && ip.addr == 10.0.0.5

Some of the most-used filters for blue-team work:

FilterPurpose
tcp.flags.syn == 1 && tcp.flags.ack == 0Isolate SYN packets — useful for spotting port scans
arpShow all ARP traffic, the starting point for spoofing detection
dnsIsolate DNS queries and responses, first step in tunnelling analysis
http.requestShow only HTTP requests, useful for credential and endpoint enumeration
tcp.analysis.retransmissionFlag retransmitted packets, often a sign of network stress or scanning
ftptelnetSurface legacy cleartext protocols still in use on the network
Combine filters with &&, ||, and ! to narrow in on specific hosts, ports, or behaviour patterns. Filters can be saved as named buttons in the Wireshark toolbar for repeated investigations — a small habit that saves real time during an active incident.

Know your vulnerabilities before attackers do

Run a free VAPT scan — takes 5 minutes, no signup required.

Book Your Free Scan

Following TCP and HTTP Streams

A single packet rarely tells the full story. Right-click any packet and choose "Follow → TCP Stream" (or HTTP Stream) to reassemble an entire conversation — request and response, in order, exactly as the two hosts exchanged it. This is where packet analysis moves from theoretical to actionable: you see the actual login form submission, the actual file transfer, the actual command sent to a compromised host.

tcp.stream eq 14

Once you know a stream number from following a conversation, this filter isolates every packet in that exact session, which is invaluable when writing up incident timelines or extracting evidence for a report.

⚠️
WARNING
Following a stream reassembles the full payload, which may include personal data, session tokens, or other sensitive content covered under India's DPDP Act. Treat exported stream data as sensitive evidence — store it access-controlled, and delete it once the investigation and any required retention period conclude.

Spotting Plaintext Credentials on the Wire

Legacy and misconfigured services still transmit credentials in cleartext far more often than most SMB teams assume — a symptom, not the root cause, but a critical one to catch during an audit or incident review.

http.request.method == "POST" && http contains "password"

Common protocols worth checking specifically because they historically send credentials unencrypted: HTTP Basic Auth, FTP, Telnet, and older SNMP community strings. Following the TCP stream on any of these usually surfaces the username and password in plain view within the reassembled payload — proof positive that the service needs to move to an encrypted equivalent (HTTPS, SFTP/FTPS, SSH).

Detecting Scans, ARP Spoofing, and DNS Tunnelling

Reconnaissance and lateral-movement activity leave distinctive packet-level signatures once you know what to look for.

    1. Port scans show up as a burst of SYN packets from one source IP hitting many destination ports in a short window, frequently with no completed handshake — filter tcp.flags.syn==1 && tcp.flags.ack==0 and sort by source/time to spot the pattern.
    2. ARP spoofing appears as duplicate or conflicting ARP replies claiming the same IP maps to different MAC addresses — filter arp.duplicate-address-detected or manually watch for a gateway IP suddenly resolving to an unexpected MAC.
    3. DNS tunnelling shows up as an abnormal volume of DNS queries to a single domain, unusually long subdomain labels, or TXT/NULL record queries carrying encoded data — filter dns && frame.len > 100 as a starting heuristic, then inspect query names manually.
    4. Data exfiltration over allowed ports often appears as sustained, large, one-directional outbound transfer to an unfamiliar destination — visible in Wireshark's Statistics → Conversations view sorted by bytes sent.
graph TD A[Capture Traffic] -->|pcap file| B[Apply Display Filters] B -->|Narrowed packets| C[Follow TCP or HTTP Stream] C -->|Reassembled session| D[Detect Anomaly] D -->|Confirmed indicator| E[Extract IOC] style A fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style B fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style C fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0 style D fill:#5f1e1e,stroke:#EF4444,color:#e2e8f0 style E fill:#1e3d2f,stroke:#10B981,color:#e2e8f0
🚨
DANGER
ARP spoofing is frequently the precursor to a man-in-the-middle attack on internal traffic, including credential interception. If you see conflicting ARP replies for a gateway or critical host in production, treat it as an active incident, not a curiosity — isolate the suspect host and escalate immediately.

Statistics Tools: Conversations, Protocol Hierarchy, and IO Graphs

Wireshark's Statistics menu turns a packet-by-packet slog into pattern recognition at a glance:

    1. Conversations — ranks host pairs by bytes and packets exchanged, the fastest way to spot an unusually large or unusual-destination transfer.
    2. Protocol Hierarchy — breaks down the capture by protocol stack, useful for confirming whether unexpected protocols (e.g. IRC, unknown custom TCP) are present on a segment that shouldn't have them.
    3. IO Graph — plots traffic volume over time, making traffic spikes (a scan burst, a large exfil transfer) visually obvious even across a long capture.
Protocol distribution on a typical internal segment gives a useful baseline for what "normal" looks like, which is exactly the context that makes anomalies stand out:
pie title Typical Internal Network Protocol Mix "HTTP/HTTPS" : 45 "DNS" : 15 "TCP Control" : 15 "SMB/File Share" : 12 "Other" : 13

Extracting IOCs from a Capture

Once an anomaly is confirmed, the capture becomes an evidence source for indicators of compromise that feed into blocklists, SIEM rules, and incident reports: source and destination IPs, suspicious domain names from DNS queries, unusual User-Agent strings from HTTP headers, file hashes of any binaries transferred (extractable via File → Export Objects → HTTP), and JA3/TLS fingerprints for encrypted C2 traffic that can't be inspected directly.

tshark -r incident-capture.pcapng -Y "dns" -T fields -e dns.qry.name | sort -u

A command like this pulls every unique DNS query name from a capture in seconds — turning hours of manual review into a list you can immediately cross-reference against threat intelligence feeds.

258 daysAverage time to identify and contain a breach globally (IBM Cost of a Data Breach Report 2024)

CERT-In also publishes regular technical advisories on network traffic monitoring and incident response practices that Indian organisations can align their packet-analysis workflows against. Independent of exact figures, the pattern is consistent across breach research: the organisations that detect incidents fastest are the ones with traffic visibility already in place before the incident starts, not scrambling to capture packets after the fact.

Building a Repeatable Packet-Analysis Workflow

StepTool/ActionOutput
1. Scope and authoriseWritten approval, defined interface/segmentLegal, documented capture
2. Capturetshark/Wireshark with capture filter.pcapng file
3. TriageStatistics → Conversations, Protocol HierarchyCandidate anomalies
4. Filter and followDisplay filters, Follow StreamReassembled evidence
5. Extract IOCsExport Objects, tshark -T fieldsIP/domain/hash list for SIEM
6. ReportTimeline with packet numbers and stream IDsIncident report artefact
ℹ️
INFO
Save every investigation's display filter and the resulting stream numbers alongside the capture file itself. Six months later, during an audit or a repeat incident, that context is what turns a raw pcap back into a readable story.

Where Manual Packet Analysis Hits Its Limits

Manual Wireshark analysis is precise but doesn't scale — a security analyst can meaningfully review a handful of incidents a week, not continuously monitor every segment of a growing network in real time. It's also inherently reactive unless paired with automated alerting that tells the analyst where to point Wireshark in the first place.

This is exactly the gap continuous, automated VAPT is built to close. Bachao.AI combines automated vulnerability scanning with the kind of exposure visibility that reduces how often teams need forensic packet analysis in the first place — catching exposed services, weak configurations, and cleartext protocols before they become an incident that needs a pcap to explain. Dhisattva AI Pvt Ltd built the platform around a simple observation: most Indian SMBs have neither the headcount nor the time for full-time packet-level monitoring, so the highest-leverage move is closing exposures upstream, then keeping Wireshark-grade analysis in reserve for when it's actually needed.

🎯Key Takeaway
Wireshark shows you the ground truth of what crossed the network — but it's forensic, not preventive. Pair disciplined packet analysis for incident response with continuous automated vulnerability assessment so fewer incidents ever reach the point of needing a pcap review.

Getting Started Safely

Set up a home lab or an isolated test segment before working on production traffic. Capture a known-good baseline first, so anomalies actually stand out against something real. And always keep the authorisation question first: who owns this network, and do you have their explicit, written permission to capture on it.

Want visibility into your exposure before an attacker forces you to find out via a packet capture? Get a free VAPT scan, or browse the Bachao.AI blog for more hands-on security guides. If your organisation processes personal data, also review our DPDP compliance guide for how captured traffic and stored evidence fit into your compliance obligations.

Frequently Asked Questions

Is it legal to capture network traffic in India?
Only on networks and systems you own or have explicit written authorisation to monitor. Intercepting traffic without consent can violate Sections 43 and 66 of India's IT Act, 2000, and any personal data captured falls under DPDP Act handling and retention obligations.
What is the difference between a capture filter and a display filter in Wireshark?
A capture filter is applied before packets are captured, discarding anything that doesn't match at the network card level to reduce volume. A display filter is applied after capture and only hides non-matching packets from view, so you can always widen it later without recapturing.
How do I follow a full conversation between two hosts in Wireshark?
Right-click any packet belonging to that conversation and select Follow, then TCP Stream or HTTP Stream. Wireshark reassembles the entire exchange in order, showing both sides of the conversation as it actually happened on the wire.
How can Wireshark detect ARP spoofing?
ARP spoofing typically shows up as duplicate or conflicting ARP replies claiming the same IP address maps to two different MAC addresses. Filtering for arp.duplicate-address-detected, or manually watching the gateway's MAC address for unexpected changes, surfaces this pattern.
What does DNS tunnelling look like in a packet capture?
It typically appears as an abnormally high volume of DNS queries to a single domain, unusually long or randomised subdomain labels, or heavy use of TXT and NULL record types, all of which are used to encode data inside what looks like ordinary DNS traffic.
Can Wireshark replace a full VAPT engagement?
No. Wireshark is a forensic and monitoring tool for analysing traffic that already exists; it doesn't perform active vulnerability discovery, exploitation testing, or risk-prioritised reporting. A VAPT engagement, delivered with a CERT-In empanelled partner where regulatory submission is required, finds and validates exposures before they generate the kind of traffic Wireshark would need to catch.
BR

Bachao.AI Research Team

Cybersecurity Research

AI-powered security research and threat intelligence from the Bachao.AI team. Covering the latest vulnerabilities, CVEs, and cybersecurity developments affecting Indian businesses.

Get cybersecurity insights for Indian SMBs

Weekly vulnerability alerts, DPDP compliance tips, and security guides. No spam — unsubscribe anytime.

We respect your privacy. Your email is never shared.

Find out if you're exposed to this class of threat

Free automated scan — risk score in under 2 hours. No credit card required.

Scan Your Attack Surface
Find your vulnerabilitiesStart free scan →