Ready to Start Your Career?

By: ziednamouchi
January 1, 2017
Scapy Project

By: ziednamouchi
January 1, 2017

- Packet forger.
- Scanner.
- Sniffer.
- Tester (active machines/services).
- Fingerprinting.
- Offensive tool.
- No complex syntax to remember.
- High-level functions already implemented.
- Multi-tasking.
- Modularity.
- Extensibility.
- Strengths:
- Interactive language.
- Simple packets forging and analyzing.
- Bypass local firewall.
- Weaknesses:
- Can’t handle a large number of packets simultaneously.
- Partial support for certain complex protocols.
- Interactive:
- $ sudo scapy
- Welcome to Scapy (2.0.1-dev)
- >>>
- Script
- You should add this line of code in order to use scapy; From scapy import *
- Basic commands:
- Scapy supports almost about 150 protocols such as:
- Ethernet, IPv4, IPv6, ARP, ICMP, IGMP, UDP, TCP, DNS, FTP, TFTP, RADIUS…
Ls (): list all available protocols and protocol options.
Lsc (): list all scapy command functions.
Conf: show/set scapy configuration
2. Constructing packets:
a. Setting port fields:
ip = IP (src = “10.0.0.1”)ip.dest = “10.0.0.2”
b. Combining layers:
Layer_3 = >>> IP()/TCP()<IP frag=0 proto=TCP |<TCP |>>
c. Splitting layers:
Layer_3.getlayer (1) # TCP layer
Displaying Packets:Packet_name.show ()# shows an entire packet.Sniffing Packets:
Sniff (count = 0, store = 1, timeout = N)