Lion Cipher Lab

Capture network packets with tcpdump

Why it matters

Almost every network skill in defence — spotting an intrusion, debugging why an app cannot connect, understanding what a device is really talking to — starts with one question: what is actually on the wire? tcpdump is the plainest possible way to answer it. It is a small command-line packet-capture tool that is preinstalled or one command away on nearly every Linux and macOS system, prints what it sees as readable text, and saves captures in the exact .pcap format Wireshark, Zeek and every other analysis tool reads. Learning tcpdump first means that when you open Wireshark later you are not…

What you'll learn

Steps in this lab

  1. What a packet, a capture, and an interface are
  2. Open a terminal — and only capture what you own
  3. Install tcpdump
  4. List your interfaces — and why capture needs sudo
  5. Capture live to the screen — and read a line
  6. Save a capture to a .pcap file, then read it back
  7. Narrow it down with capture filters
  8. What you just learned — and where it goes next

Open the full interactive lab →