Building the TCP Header

Build a TCP header for a SYN scanner.

Examining a TCP header

We’ve built the IP layer of a network packet, which indicates the IP address of the target system. To perform port scanning, we also need the concept of ports, which requires building a TCP or UDP layer on top of the IP layer.

In this case, we’re developing a SYN scanner, so we’ll need to add a TCP layer. To start, let’s take a look at a sample SYN packet from our packet capture.

Get hands-on with 1200+ tech skills courses.