Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 905

PCAP

Reviewed byCybersecurity entrepreneur & security researcher

What is PCAP?

PCAPA binary packet-capture file format produced by libpcap, tcpdump, and Wireshark that stores network packets exactly as they were seen on the wire.


PCAP (packet capture) files record raw frames with per-packet timestamps and link-layer headers, making them the lingua franca of network forensics. The classic libpcap format uses a global header plus fixed per-packet records; its successor, PCAPNG (pcap Next Generation), adds blocks for multiple capture interfaces, nanosecond timestamps, per-packet comments, and name resolution — which is why it is now Wireshark's default. Both are written by tcpdump, Wireshark, Zeek, Suricata, and most capture appliances, and can be replayed with tools such as tcpreplay.

On the wire, capture relies on the OS packet-capture path — libpcap on Linux/macOS (over AF_PACKET/BPF) and Npcap on Windows — usually with the interface in promiscuous mode and an optional BPF filter to limit volume. Defenders use PCAP for deep incident investigation, C2 reconstruction, protocol troubleshooting, and evidentiary preservation.

The practical limits are real: at 10/40/100 Gbps, kernel capture drops packets unless hardware offload or ring buffers are tuned; full-packet retention is storage-expensive, so many teams keep short full-capture windows plus long-lived metadata like NetFlow/IPFIX. TLS also means payloads are opaque without key-logging (SSLKEYLOGFILE) or middlebox decryption, and lawful-interception and privacy controls govern who may capture what.

flowchart LR
  A["Network interface"] --> B["Promiscuous mode"]
  B --> C["BPF capture filter"]
  C --> D["libpcap / Npcap"]
  D --> E["Write PCAP / PCAPNG file"]
  E --> F["Wireshark / Zeek / Suricata"]
  E --> G["tcpreplay re-injection"]
  F --> H["Stream reassembly and detection"]

● Examples

  1. 01

    Replaying a PCAP through Suricata to test a new detection rule against real malicious traffic.

  2. 02

    Reconstructing exfiltrated files from captured packets using Wireshark's Follow TCP Stream.

● Frequently asked questions

What is PCAP?

A binary packet-capture file format produced by libpcap, tcpdump, and Wireshark that stores network packets exactly as they were seen on the wire. It belongs to the Defense & Operations category of cybersecurity.

What does PCAP mean?

A binary packet-capture file format produced by libpcap, tcpdump, and Wireshark that stores network packets exactly as they were seen on the wire.

How do you defend against PCAP?

Defences for PCAP typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for PCAP?

Common alternative names include: libpcap file, PCAPNG, Packet capture file.

● Related terms