Peters School of Business · Assiniboine College · NETW-0014
2 hours · Lecture + Lab 2A · BPF filters, .pcap files, then crafted ICMP/UDP/TCP packets
tcpdump on a GUI-less server, then Mausezahn to generate what we're capturing
Part 1 — tcpdump flags and BPF filters (15 min)
-i interface, -n/-nn no name/port resolution, -v/-vv/-vvv verbosity, -c N packet count, -s 0 full snap length, -w file.pcap write, -r file.pcap read, -A ASCII payload, -X hex+ASCII, -e layer-2 headers. Show the common combo sudo tcpdump -i eth0 -nvvXSs 0 on the projector and walk one packet line by line.host, net, port), directions (src, dst), protocols (tcp, udp, icmp, arp), combined with and/or/not. Capture vs. display filter — a capture filter decides what's written to disk; a display filter only changes what's shown when reading a saved file. Ask: "Which is better for forensics?" — capture everything, filter later. You can't recover what was never captured.Part 2 — Mausezahn: crafting packets, including spoofed sources (10 min)
-c N count, -d N delay (ms), -t [type] icmp/udp/tcp/arp/dns, -A [IP] source IP (can be spoofed), -B [IP] destination IP, -a/-b [MAC] source/dest MAC, -P [string] ASCII payload.-A lets you put any IP in the source field — including one you don't own. That's IP spoofing at the packet level, the same mechanism behind SYN-flood and reflection DDoS attacks. mz is a legitimate testing tool; understanding it helps students recognise the attack pattern in logs later.Lab 2A — Capture and filter with tcpdump, then generate and verify with Mausezahn
Part 1 — Basic capture and filters (30 min)
sudo tcpdump -i eth0. Session 2: ping 172.17.0.1 — watch ICMP appear in Session 1, stop with Ctrl+C, count packets.icmp), then verbose hex (-nvvXSs 0 -c 2 icmp) — identify IP header, ICMP type/code, sequence number, and payload in the output.~/tcpdumpinfo.pcap while generating pings from Session 2, then read it back with -r and apply a display filter for ICMP replies only.Part 2 — Mausezahn: ICMP, UDP with payload, spoofed-source TCP (40 min)
sudo apt install mz (fallback: hping3 if unavailable — instructor will advise). Two Windows Terminal sessions: S1 sends, S2 receives with tcpdump running.sudo mz eth1 -c 10 -t icmp -B [S2-IP] — verify 10 packets arrive on S2's tcpdump.sudo mz eth1 -c 15 -t udp -b [S2-MAC] -P "PacketFromStudent" — capture on S2 with -A -n udp and find the payload string. Answer: why does tcpdump show 255.255.255.255 as the destination IP when only a MAC was specified?sudo mz eth0 -c 1 -t tcp -A 10.0.0.99 -B 172.17.0.1 — verify with tcpdump that the source shown is 10.0.0.99, an address S1 doesn't own. Discuss: would the gateway's reply ever reach S1? Why is this hard to trace? How does a SYN flood use the same technique?Learning outcomes — by end of Day 1, students can…
What you need ready before class