Hello. This is Akako. Recently, it has become necessary to touch Scapy for CTF-related matters, so I would like to summarize how to use Scapy in several parts from now on. This time, as the title suggests, I will summarize from installation to execution of Scapy.
Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can't handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, ...), etc. See interactive tutorial and the quick demo: an interactive session (some examples may be outdated).
If you translate only the upper part appropriately, ** Scapy ** is a cool ** interactive ** packet manipulation program **, ** packet creation **, ** decoding to a wide range of protocols * It's the one who can * or ** actually throw those ** packets and receive a ** ** response **. (I'm sorry if the Japanese translation is wrong)
Install using pip.
$ sudo pip3 install scapy-python3
In my environment, I needed permission to send packets, so I use sudo
to start it.
$ sudo scapy
By executing the following code in the first line, you can create the same state as when scapy is started directly. If you want to use it as a script saved in a file, use this.
#Import Scapy
from scapy.all import *
With this feeling, this time I summarized the installation and startup of scapy. Next time, I would like to summarize packet transmission using scapy.
Recommended Posts