Building the IP Header
Build an IP header for packets in a SYN scanner.
We'll cover the following
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 don’t need to define the Ethernet layer of our packets because Scapy will do that for us. However, we do need to define some of the fields of the IP layer.
To start, let’s take a look at the IP layer of one of the packets from our sample packet capture.
Get hands-on with 1400+ tech skills courses.