Tcpdump - Protocol Review 3 (UDP)

8 Jul 2015 · 12 min
11:42

In this tutorial Jon Schipp walks through the structure of the UDP protocol and demonstrates how to dissect UDP packets using tcpdump. He begins by describing the minimal 8‑byte UDP header—source port, destination port, length, and checksum—and explains how the length field represents the sum of the header and payload. Schipp then shows how to read a pcap file with tcpdump, applying UDP‑specific filters (e.g., "udp", "proto \UDP", "ip proto 17") and the -x option to display hex and ASCII data. He explains how to determine the IP header length from the IHL field, locate the UDP header offset, and extract source and destination ports using printf on specific byte offsets. The video details how the IP protocol field (value 17) signals that the payload is UDP, and how to verify this via /etc/protocols. Schipp further clarifies the relationship between the IP total length, the UDP length field, and the payload size, illustrating calculations that reconcile the 60‑byte IP packet, the 40‑byte UDP segment, and the 20‑byte IP header. Finally, he covers the UDP checksum computation using a pseudo‑header (source IP, destination IP, protocol, length) and notes that a checksum of all zeros is acceptable for crafted packets, relieving the need for full checksum calculation.

Chapters

More from Jon

youtube.com

Wrestling with Cybersecurity

4mo ago
youtube.com

What No One Knows the Podcast / Vodcast featuring The Tampa Bay Wave and Jon Schipp

6mo ago
youtube.com

Meeting the Exposure Management Challenge: Key Use Cases for Success | @OfficialRapid7 #SolutionSpotlight

1y ago
youtu.be

Spot Security Control Gaps and Non-Compliant Resources Across Your Attack Surface

2y ago
youtu.be

Maintain a Single Source of Truth for your Digital Estate

2y ago
youtu.be

Identify Accounts Without MFA Enabled Across Your Organization

2y ago
youtu.be

Understand Potential Blast Radius and Attackers' Cloud Network Spot Avenues

2y ago
youtu.be

Measure Security Data Accuracy and Quality with Rapid7 Exposure Command

2y ago
youtube.com

The Netsniff Ng Toolkit Jon Schipp DerbyCon 3

4y ago
youtube.com

OpenNSM (Scaling OSSEC)

10y ago
youtube.com

OpenNSM (Flow Indexer)

10y ago
See all content