Quick answer: Network forensics looks for the trace of an attack not on disk, but in the traffic that crossed the network. An attacker can delete the logs on a server, but if the traffic going in and out of that server was captured somewhere, proof of the attack is recorded. There are two core data sources: PCAP (full packet capture, the exact content of the traffic) and NetFlow-like flow data (a summary of who talked to whom, when and how much). Network forensics reveals from these sources the moment of intrusion, lateral movement, command-and-control (C2) communication and data exfiltration. Even if traffic is encrypted, metadata (who, with whom, how much, in what pattern) is often enough to build the story of the incident. What is critical is that the traffic is captured before the incident and that the capture is kept time-synced with proven integrity.

In a cyber incident, attackers often clean the traces on disk: they delete logs, remove their tools, change timestamps. But one thing is hard to erase: the traffic that already crossed the network. If that traffic was captured at some point, much of the attack is recorded there. Network forensics examines exactly this. This guide explains how network forensics works, the difference between PCAP and NetFlow, how data exfiltration is detected, and how evidence is extracted even from encrypted traffic.

Two sources: packet (PCAP) and flow (NetFlow)

Network forensics has two core data types, and they answer different questions.

PCAP is the full packet capture of traffic: the header and content of every packet are stored exactly. This is the richest source; in an unencrypted session you can directly see the transferred file, command or credential. But its cost is high: full packet capture takes a lot of space, so it is usually kept only at critical points and for a limited time. NetFlow-like flow data is a summary of traffic: which IP talked to which IP, on which port, when and how many bytes. It does not show content, but answers "who talked to whom" very cheaply and in a form that can be retained for a long time.

Source Contains Strength Weakness
PCAP (full packet) header + content richest evidence takes much space, short retention
NetFlow/flow connection summary cheap, long retention, broad coverage no content

In practice the strongest investigation uses both together: flow data gives the big picture and the timeline (where the anomaly is), while PCAP goes into the detail of that anomaly (what was transferred). This is a third view that complements memory and disk forensics; we cover the volatile evidence on the endpoint side in our RAM analysis with Volatility article.

What we look for: intrusion, C2 and exfiltration

An attack has several distinct signatures in network traffic. At the moment of intrusion, an unexpected connection from outside to inside or the exploit traffic of a vulnerability is seen. Lateral movement appears as unusual connections from one machine to another inside the network. Command-and-control (C2) communication reveals itself through a compromised machine sending a "pulse" to an external server at regular intervals (beaconing); these regular, small, periodic connections are very characteristic in flow data. Data exfiltration usually appears as an unusually large data flow from inside to outside: a server that normally sends little data suddenly transferring gigabytes out is a strong signal.

Recognizing these patterns requires a map of attacker techniques; our MITRE ATT&CK guide classifies command-and-control and exfiltration techniques and makes it easier to fit network evidence into this frame. Matching against known malicious infrastructure also requires current threat intelligence, which we cover in our CTI guide.

Evidence in encrypted traffic: metadata speaks

The question "what will we see if the traffic is encrypted" is common. Most modern web traffic is encrypted (TLS), so its content cannot be read directly. But encryption hides the content, not the metadata. Who talked to whom, when, for how long, in what size, at what interval, the target's fingerprint (certificate, SNI, connection pattern) often stays visible. This metadata is frequently enough to detect a C2 beacon or an exfiltration: periodic small connections point to a beacon, a single large outbound flow points to exfiltration, without decrypting any content.

So the idea that "everything is encrypted, network forensics is useless" is wrong. Encryption reduces evidence at the content level but does not remove evidence at the flow and behavior level. The incident's timeline and scope of impact can often be built from metadata alone.

Preparation: traffic not captured cannot be examined

The biggest constraint of network forensics is simple: you can only examine captured traffic. If there is no capture point on the network at the time of the incident, that traffic is lost forever. This is why network forensic readiness includes collecting flow data at critical points (internet egress, server segments, internal network transitions) and, where possible, targeted PCAP capture before an incident. Keeping the captures time-synced (NTP) and integrity-proven is essential for the evidence to be usable in court; we cover chain-of-custody principles in our forensics process article. You can find the discipline of fast triage and evidence collection in our KAPE fast triage article.

The KAOS and DSET approach

At DSET we use PCAP and flow data together in network forensics, deriving the big picture from flow and going into the detail of the anomaly in the packet; we reveal the moment of intrusion, C2 beaconing and data exfiltration at the metadata and content level, and build the incident timeline on an evidence basis. Our KAOS tool supports deriving beaconing and exfiltration signatures from traffic patterns and fitting them into the attacker-technique frame; it ties every finding to evidence. To evaluate your pre-incident network forensic readiness (flow/PCAP collection, time sync) or to investigate an incident through network evidence, contact DSET and reach our team at Ankara Hacettepe Teknokent.

Frequently asked questions

What good is network forensics if the traffic is encrypted? Encryption hides the content, not the metadata. Who talked to whom, when, how much and in what pattern often stays visible. This is enough to detect command-and-control beacons (periodic small connections) and data exfiltration (a single large outbound flow) without decrypting any content. So even in an encrypted world, network forensics can build the incident's timeline and scope of impact.

Is PCAP or NetFlow more valuable? They do different jobs, and the strongest investigation uses both together. NetFlow-like flow data is cheap, can be retained for a long time, and answers "where is the anomaly" with broad coverage. PCAP is expensive and short-retained but answers "what was transferred" exactly. In practice you find the anomaly with flow and go into its detail with PCAP.

Can I examine network traffic after the incident? You can only examine traffic captured at the time of the incident. If there is no capture point on the network, that traffic is lost and cannot be obtained retroactively. This is why network forensic readiness requires collecting flow data and targeted PCAP at critical points before an incident. In organizations that are prepared, network evidence recovers the story of the attack even if the traces on disk are deleted.

Sources