In order to send an ICMP echo request using Scapy, we will need to start stacking layers to send requests. A good rule of thumb when stacking packets is to work up through the layers of the OSI model. You can stack multiple layers by separating each layer with a forward slash. To generate an ICMP echo request, an IP layer needs to be stacked with an ICMP request:
- To get started, use the scapy command to open the Scapy interactive console, and then assign an IP object to a variable:
- In the example provided, the display() function was used to view the default configurations of the object attributes after it was assigned ...