...

/

Developing a Valid IP Layer Response

Developing a Valid IP Layer Response

Learn how to craft an IP header to be a valid response to a TCP/IP request packet.

Examining the IP layer

The network packets that we’ll use in a honeypot or server have multiple different layers. Typically, the bottom layer is the Ethernet layer, which handles MAC addressing. In general, we can rely on Scapy to define this for us.

The next layer is the IP layer, which defines the source and destination IP addresses and various other fields. Let’s take a look at an IP header in Scapy.

Press + to interact
from scapy.all import *
packets = rdpcap('http.cap')
packets[0][IP].show()

Looking at the ...