Quick Tutorial - Scapy for Packet Manipulation

Scapy is a python-based packet manipulation program used to sniff, send, and tamper network packets. This program is helpful in creating other tools for scanning, fingerprinting, packet manipulation, sniffing, etc. Scapy has the capability of replacing most of the tools that include hping, 85% of Nmap, arpspoof, arp-sk, arping, tcpdump, tshark, p0f, etc.


Scapy is preinstalled on Kali Linux operating system. Although, you can download the program by visiting the below link:

Link: https://scapy.net/download/


(1) Create a packet

You can easily create packets by using Ether()

p = Ether()

(2) Display fields of the packet


(3) Display raw bits of the packet

You can view raw bits by using hexdump


(4) Display content values of packet

You can view the content values of packets by using the ls function.


(5) View the packet in Wireshark

You can display the packet in the Wireshark tool



Scapy tool is a simple but effective tool for packet manipulation. This blog covers the basic introduction to Scapy showing some examples of the creation of packets.

Subscribe us to receive more such articles updates in your email.

If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!

Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *