Layer 3 discovery - ICMP

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:

  1. To get started, use the scapy command to open the Scapy interactive console, and then assign an IP object to a variable:
  1. In the example provided, the display() function was used to view the default configurations of the object attributes after it was assigned ...

Get Kali Linux Network Scanning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.