Lion Cipher Lab

Craft a network packet by hand with Scapy: build an ICMP ping and a DNS query, send them, and read the replies

Why it matters

People say "packet" constantly, but to most beginners it is a black box — a mystery blob that networks pass around. It is not a mystery: a packet is just a few labelled fields laid out in a fixed order, wrapped in another few fields, wrapped in another few. Once you have BUILT one by hand, set a field, and watched the matching reply come back, networking stops being magic. That mental model is the foundation under packet capture, firewalls, intrusion detection, and almost every network attack and defence you will ever study.

What you'll learn

Steps in this lab

  1. What a packet actually is: labelled fields, wrapped in labelled fields
  2. Set up a throwaway Linux VM and open a terminal
  3. Install Scapy
  4. Open the Scapy shell and build your first packet, layer by layer
  5. Read the raw bytes, and map each field to its place on the wire
  6. Send it and read the reply — fully offline, on loopback
  7. Craft a DNS query the same way — and dissect ARP's missing authentication
  8. Ethics and scope: send only packets you are allowed to send
  9. The judgment: when Scapy is the right tool, and when it is not

Open the full interactive lab →