NetworkNetwork & Cloud ForensicsWireshark / Packet CaptureCapture, filter and read packets in Wireshark and tshark to recover what was sent.The Tcpdump Group
tcpdump and libpcap
tcpdump captures packets from the command line and libpcap is the library it and many other programs use to do it. Between them they define the pcap format that network forensics is built on.
Profile
- Manufacturer
- The Tcpdump Group
- Category
- Network and enterprise
- Product type
- Utility
- Platforms
- Linux, macOS
- Licensing
- Open source
- Product status
- Current
- Educational level
- Intermediate
- Last verified
- 2 November 2026
Two projects maintained together by The Tcpdump Group. The platforms listed follow the group's own release notes, which do not mention Windows. Release numbers are those shown on the site on 2 Nov 2026.
What tcpdump and libpcap is
libpcap is a C library that opens a network interface, applies a capture filter inside the kernel and hands matching packets to a program. tcpdump is the command line program that uses it to print packets as text or write them to a file. Both come from The Tcpdump Group under the three-clause BSD licence. The pcap file that libpcap writes is the common currency of network forensics. Wireshark, NetworkMiner, Zeek, Arkime and most commercial sensors read it. At the time of checking the stable releases were tcpdump 4.99.7 and libpcap 1.10.7, both from September 2026, with libpcap 1.11.0 in testing. The group's own release notes list FreeBSD, illumos, Linux, macOS, NetBSD, OpenBSD, QNX, Solaris 11 and GNU/Hurd. Windows is not on that list.
During an incident tcpdump is often the only capture tool present on a Linux server or jump host. The responder chooses the interface, sets the snapshot length so whole packets are kept, writes a Berkeley Packet Filter expression to limit the capture to the hosts or ports of interest, turns off name resolution so the capture itself does not generate DNS traffic and writes to a file, rotating files by size or time for a long capture. The file is then read in Wireshark or another tool. Because tcpdump runs on the host being examined, running it changes that host, so the command used, the time and the account must go into the notes.

Primary applications
Where it is used
- Capturing traffic on a server that has no graphical tools installed
- Quick checks of what is passing an interface during an incident
- Long captures with file rotation by size or time
- Reading a saved capture inside a script to filter or split it
- Teaching capture filter syntax, which Wireshark shares
- Providing the capture library that other open source tools build on
Who uses it
- Incident responders working on Linux and Unix systems
- Network engineers and administrators
- Network forensic analysts
- Students learning capture fundamentals
Capabilities and limits
Major capabilities
- Capture filters compiled into the kernel so unwanted packets are never copied
- Writes the pcap file format read by every major analysis tool
- Control of snapshot length, interface, buffer size and name resolution
- File rotation by size or time with a file name pattern
- Reads saved captures back and prints decoded headers for many protocols
- Can drop privileges to an unprivileged account after opening the interface
- libpcap gives programs in C, Python and other languages the same capture interface
Technical limitations
- Text output only. Deep decoding and stream reconstruction belong to Wireshark or NetworkMiner
- Running it on the evidence host alters the host and must be recorded
- Packets dropped under load are counted but lost for ever
- Capture needs root or specific capture privileges
- Writes classic pcap. Per-interface metadata and comments of the pcapng format need other tools
Learning with DFRTI
Independent professional education covering the principles and workflows of tcpdump and libpcap. DFRTI is not a vendor training centre and its courses are not vendor certifications.
Before you learn it
- Linux command line and administrative privileges
- TCP/IP headers and port numbers
- Berkeley Packet Filter expression basics
Disciplines
Related tools
- WiresharkWireshark captures network traffic and shows every packet decoded field by field. It is the standard first tool for reading a packet capture in an investigation.Wireshark Foundation
- NetworkMinerNetworkMiner reads a packet capture and sorts what it finds by host, file, session and credential. It is the tool to open when the question is what happened on the wire rather than which flag was set in which packet.Netresec
- ZeekZeek watches a network link and writes what it sees as structured logs rather than packets. For a forensic analyst that means hours of traffic become tables that can be searched, joined and placed on a timeline.The Zeek Project
- ArkimeArkime stores packets at scale and indexes the sessions they belong to, so an analyst can search weeks of traffic by field and pull back the exact packets in seconds.Arkime project
Courses that cover this tool
NetworkNetwork & Cloud ForensicsWireshark / Packet CaptureCapture, filter and read packets in Wireshark and tshark to recover what was sent.
NetworkNetwork & Cloud ForensicsNetwork Traffic AnalysisRead flows, logs and packets to trace intrusions, beaconing and data theft.Product names and trademarks belong to their respective owners. DFRTI is an independent educational and research institute. Inclusion in this directory does not imply manufacturer endorsement, partnership or authorisation. Facts are checked against the manufacturer's public documentation on the date shown and may have changed since.
Go deeper with DFRTI
Free pages explain the ground. Structured courses, lab work and a mentor take you from knowing about it to doing it on a case.