chatting softwares always use the application layer to send and recieve messages that include using tcp or udp protocols for deleviery , today we will explain how to send messages using Ping ( ICMP protocol ) which is layer 3 protocol using Scapy .
What is scapy ?
Scapy is able to forge and decode packets of several protocols, send and capture them, match requests and replies, and much more. It can be used to handle most network tasks such as scanning, tracerouting, probing, attacks, network discovery, to name a few.
to install scapy type in cmd :
$ pip install scapy
to start scapy type in cmd :
in scapy you can use : >>> ls() ---> list protocols/layers >>> lsc() ---> list commands >>> conf ---> Display configurations >>> help(sniff) --> Help for a specific command
How to use scapy ?
Let’s start by specifying the packet’s source IP and then its destination IP. This type of information goes in the IP header, which is a layer 3 protocol in the 0SI model:
now lets make simple icmp packet that will go from host 192.168.1.10 to 192.168.1.1 in this video :
Leave a Reply
Your email is safe with us.