Free tech learning for everyone, from basics to pro

Digital ForensicsCyber SecurityIntermediate

Network forensics: packet captures, flow data and logs

In short: Network forensics reconstructs events from traffic evidence: full packet captures for detail, flow records for the big picture, and device logs for context. Because most traffic is now encrypted, metadata such as who talked to whom, when and how much is often the most valuable evidence.

Sources of network evidence

Hosts can be wiped or lied to, but the network sees traffic from the outside. Network forensics uses that view to answer questions such as: which machine first contacted the attacker’s server, what was sent out, and which other hosts were touched?

  • Full packet capture (PCAP): complete copies of packets, taken from a span port or network tap.
  • Flow records: NetFlow or IPFIX (IP Flow Information Export) summaries of each conversation: addresses, ports, protocol, start time, bytes and packets.
  • Logs: firewall allow and deny records, web proxy logs, DNS query logs, VPN and DHCP (Dynamic Host Configuration Protocol) logs that map IP addresses to devices and users.
  • Network security monitoring output: Zeek produces detailed protocol logs (connections, DNS, HTTP, TLS) and Suricata produces intrusion detection alerts.
Full packets or flow data?Packet captureEvery byte of trafficShows payloads if unencryptedLarge storage costShort retentionFlow recordsWho, when, how muchNo payload contentSmall and cheapKept for months
Figure 1. Packet captures give depth for short periods; flow data gives breadth over long periods, and investigators usually need both.

Capturing and filtering traffic

For a short, targeted capture on a network you manage, tcpdump writes to a file you can later open in Wireshark. Rotate files so the disk does not fill, and hash each file once it closes:

sudo tcpdump -i eth0 -nn -s 0 -w /cases/cap-%Y%m%d-%H%M.pcap -G 900 host 192.168.10.25
sha256sum /cases/cap-*.pcap > /cases/pcap-hashes.txt

In Wireshark, display filters help you narrow the data:

ip.addr == 192.168.10.25 && dns
http.request.method == "POST"
tls.handshake.extensions_server_name contains "example.com"
tcp.flags.syn == 1 && tcp.flags.ack == 0

Only capture traffic on networks you own or are authorised to monitor. Packet captures can contain personal data, so store and delete them according to your organisation’s policy and data protection law.

Working with encrypted traffic

Most web and application traffic now uses Transport Layer Security (TLS), so you usually cannot read payloads. You still learn a lot from metadata:

ClueWhat it can suggest
Server Name Indication (SNI) and DNS queriesWhich domains a host visited, including newly registered ones
Regular connections at fixed intervalsBeaconing to a command-and-control server
Large outbound transfer at nightPossible data exfiltration
Internal host scanning many portsLateral movement or discovery
Unusual long DNS namesData hidden in DNS (tunnelling)

Where policy allows, a TLS inspection proxy can decrypt business traffic, and its logs become another evidence source.

Reconstructing events

Reconstructing a network incidentScopehosts andtimesGatherflows, logs,pcapFilternarrow thedataSessionsfollowstreamsTimelineorder eventsConcludewhat movedwhere
Figure 2. Network investigations narrow huge data sets down to the sessions that matter, then place them on a timeline.

Start with what you know: a suspicious host and a rough time window. Use flow data or Zeek connection logs to see every peer it talked to. Use DHCP and VPN logs to tie IP addresses to devices and users at that moment, because addresses change. Then pull packets for the few interesting sessions and follow the stream. Place everything on a timeline in UTC.

Common problems are clocks that disagree between devices (fix with NTP and note any offset), network address translation hiding the real internal host, and capture points that miss traffic, such as east-west traffic between virtual machines on the same host.

Tip: keep flow data for months even if you only keep packets for days. Many breaches are discovered weeks later, and flows are often the only record left.

Practice

Why is flow data much smaller than a full packet capture?
A flow record summarises a conversation (addresses, ports, times, byte counts) without storing the payload, so it is far smaller than a full capture.
Why are DHCP logs useful in a network investigation?
They show which device held a given IP address at a given time, so traffic can be tied to the right machine and user.
Traffic is encrypted with TLS. Name two pieces of metadata that can still help.
For example, DNS queries or SNI domain names, connection timing such as regular beaconing, and the volume of data transferred.

Key takeaways

  • Network evidence comes from packet captures, flow records and device logs.
  • Packets give depth for a short time; flows give breadth for a long time.
  • With encrypted traffic, metadata such as DNS, SNI, timing and volume is key.
  • Tie IP addresses to devices with DHCP and VPN logs and use a UTC timeline.
  • Capture only where authorised and handle captures as sensitive data.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.