Digital Forensic Tools

Packet capture and PCAP files

Short answer

A packet capture records the packets seen on a network link and saves them to a file, most often in the pcap or pcapng format, so they can be studied later in a tool such as Wireshark.

What a capture is

Capturing means copying packets as they pass a network interface and writing them to a file. Each saved packet has a timestamp and the bytes that were seen. This gives the most detailed network evidence, because content can be read if it is not encrypted.

Wireshark is passive. It listens and does not send packets of its own.

pcap and pcapng

The pcap format comes from the libpcap library and is widely supported. The pcapng format is newer. It can hold several interfaces in one file and can store comments and extra details such as interface names and capture filters. Wireshark has used pcapng as its default format since version 1.8.

Most analysis tools can open both formats.

Where captures are taken

Where you capture decides what you see. A capture on one computer shows only that computer's traffic. A capture on a switch mirror port or network tap can show many hosts. Wireless captures need a suitable adapter.

  • Capture filter: limits what is recorded, so data outside the filter is lost for good.
  • Display filter: hides packets on screen only, nothing is lost.
  • Hash the capture file after saving and note the tool, interface and time.

Reading a capture

Start with a summary of conversations and protocols, then follow one stream at a time. Look for the hosts, times and amount of data. Keep the original file untouched and work on a copy. Procedures and laws differ by country and agency, so follow your lab's own procedure.

Capture filter and display filter

Capture filterDisplay filter
When usedWhile recordingAfter recording, on screen
Effect on dataPackets outside the filter are not savedNothing is deleted
Can it be changed laterNo, lost data is goneYes, any time

Common mistakes

  • Using a capture filter that is too narrow and losing evidence.
  • Confusing a display filter with a capture filter.
  • Capturing on the wrong interface or in the wrong place.
  • Not hashing the file or not noting the clock and time zone.
  • Expecting to read the content of encrypted traffic.

Key terms

pcap
A common capture file format that stores packets with timestamps.
pcapng
A newer capture format that supports several interfaces and comments.
Capture filter
A rule that decides which packets are recorded.
Display filter
A rule that decides which recorded packets are shown.
Mirror port
A switch port that gets a copy of traffic from other ports.

Questions you may be asked

What is the difference between a capture filter and a display filter?

A capture filter limits what is saved. A display filter only changes what you see in a file that is already saved.

Why hash a pcap file?

The hash shows later that the file has not changed since it was collected.

Free tools to practise with

Learn more

Written in our own words from public forensic training material and standards. Last reviewed 24 Nov 2026. Procedures and laws differ by country and agency. Follow your own lab's procedure.