Scapy - Packet Manipulation in Kali Linux
Last Updated :
15 Apr, 2021
Scapy is a free and open-source tool available on Github. Scapy is written in Python language. Scapy is used for packet manipulation programs. Scapy tool forges the data packet that is coming from a source. Scapy decodes data packets and captures them. This tool reads packets using pcap files, and then it matches the request and replies. Scapy tool also performs scannings such as trace-routing, unit tests, You can also perform nmap scanning using scapy tool.
This tool also performs very well at a lot of other specific tasks that most other tools can’t handle, like sending invalid frames, VLAN hopping+ARP cache poisoning, VoIP decoding on WEP protected channel can be performed by scapy tool. As this tool is written in Python language that's why scapy tool supports Python2.7 Python 3 (3.4 to 3.7). This tool is a multi-platform tool this is available for Windows, Linux OSX, *BSD operating systems.
Scapy tool can be used as a shell to interact with incoming traffic and outgoing traffic of the network. To use scapy tool you don't need to install any external Python module on Linux and BSD like operating systems you just need to install some dependencies as described in the documentation of the tool.
Features of scapy:
- Scapy is a free and open-source tool that is available on Github.
- Scapy is written in Python language.
- Using Scapy network can be manipulated easily.
- Scapy can decode data packets and can capture them.
- Scapy tool can be used as a shell to interact with incoming traffic and outgoing traffic of the network.
- Scapy can work with built-in modules you don't need any external module to work.
- Scapy can be used for trace-routing with built-in modules.
Uses of Scapy:
- Scapy is used for packet manipulation programs.
- Scapy tool forges the data packet that is coming from a source.
- Scapy decodes data packets and captures them.
- Scapy tool can be used as a shell to interact with incoming traffic and outgoing traffic of the network.
- VoIP decoding on WEP-protected channels can be performed by scapy tool.
- You can use Scapy tool on any operating system it's available for all operating systems.
Linux's users can clone the tool from this link. It's a free and open-source tool available on GitHub, Linux users can download it freely.
Installation of the Scapy tool
Step 1. Open your Kali Linux. And move to the desktop using the following command.
cd Desktop
Step 2. Now you are on the desktop. Create a new directory here on the desktop because you have to install the scapy tool here. Create a new directory using the following command.
mkdir scapy
Step 3. A new directory has been created. Now move to this directory using the following command.
cd scapy
Step 4. Now you are in scapy directory here you have to clone the tool from GitHub. Use the following command to clone the tool in this directory.
git clone https://github.com/secdev/scapy
Step 5. Scapy tool has been downloaded into your Kali linux. Now to list out the contents of this tool use the following command.
ls
Step 6. As you listed out the contents of the tool you found the directory that has been downloaded with the tool. Move to this directory using the following command.
cd scapy
Step 7. On this step you have to list out the contents of the directory using the following command.
ls
Step 8. You can see the files of tool, License of tool etc, Now to run the tool use the following command.
./run_scapy
This is the first interface of the tool. The tool is running now. All the installation process has been done. Now it's time to see some examples of the tool.
Example 1. Show the configuration of the tool and show the details of packets.
To show the configuration of the tool use the following command. This command not only shows the configurations but also shows the packets that are coming from a source.
conf
Example 2. Show the routing table of networks.
The following command will show the route table. You can add and delete data in this table as per your requirements. Use following command for routing.
conf.route
Example 3. List out all the commands of scapy tool that you can use with the tool.
To know all the commands of the tool use the following command.
lsc()
Similar Reads
Sparta Tool in Kali Linux Information Gathering is a very important step before starting penetration testing. Mostly, Pen Testers begin their work by collecting information and this requires a lot of patience and effort. The information Gathering category has many tools that work differently, but the sole purpose is to gathe
3 min read
Working with Payload Metasploit in Kali Linux The Metasploit framework is a penetration testing tool for exploiting and validating vulnerabilities. It includes the fundamental architecture, particular content, and tools required for penetration testing and extensive security evaluation. It is a well-known exploitation framework that is routinel
5 min read
Kali Linux - Sniffing and Spoofing Sniffing is the process in which all the data packets passing in the network are monitored. Sniffers are usually used by network administrators to monitor and troubleshoot the network traffic. Whereas attackers use Sniffers to monitor and capture data packets to steal sensitive information containin
4 min read
Restart Network on Kali Linux Kali Linux, renowned for its powerful tools for penetration testing and digital forensics, often requires a stable network connection for its myriad of functions. However, there are times when the network connectivity might falter due to various reasons such as misconfiguration, hardware issues, or
4 min read
Router Vulnerabilities in Kali Linux A Linux distribution with Debian roots called Kali Linux is intended for penetration testing and digital forensics. Offensive Security oversees and provides maintenance for it. Around 600 penetration-testing applications (tools) are available in Kali Linux, such as the graphical cyber attack managem
3 min read
Kali Linux - Cisco-Torch Tool Cisco-Torch is one of the best penetration testing and scanning tool. It is a mass scanning and exploitation tool. Which was written while working on the edition of âHacking Exposed Cisco Networksâ. Installation: It comes pre-installed in Kali-Linux but if not then just type the given command in the
1 min read