Packet Headers

This workshop is about crafting packets so it makes sense to spend some time in understanding what packets are and how they are structured.

Illustrations on this page are reproduced work created and shared by Matt Baxter as seen at https://nmap.org/book/tcpip-ref.html

IP header

ip-header

TCP header

tcp-header

TCP flagBinaryDecimalTCP Dump syntax
URG0010000032'tcp[13] == 32'
ACK0001000016'tcp[13] == 16'
PSH000010008'tcp[13] == 8'
RST000001004'tcp[13] == 4'
SYN000000102'tcp[13] == 2'
FIN000000011'tcp[13] == 1'

SYN-ACK = 00010010 = 18 RST-ACK = 00010100 = 20

TCP flags mnemonic - Unskilled Attackers Pester Real Security Folks

UDP header

udp-header

ICMP header

icmp-header

ARP header

arp-header