Search⌘ K

Building the IP Header

Explore how to construct IP headers in Scapy by specifying critical fields like the destination IP address. Understand the role of Scapy’s default field values and its use in crafting packets for SYN scans, preparing you to build custom port scanning tools.

Examining an IP header

As we’ve discussed in earlier lessons, each packet that flows over the network is composed of multiple different layers. For most of the traffic that we’ll be building in this course, we’ll have an Ethernet layer, an IP layer, and a TCP layer at the minimum. In some cases, the TCP layer can carry application layer data as well.

For a SYN scanner, we ...