Questions tagged [scapy]

Scapy is a powerful interactive packet manipulation program.

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.).

10 questions
12
votes
4 answers

Using Python and Scapy to sniff for ARP on Pi

I'm trying to use a Raspberry Pi to find ARP requests from a specific wireless device on my network. It's one of those Amazon dash buttons. Someone used this code to listen to when the dash connects to wifi. from scapy.all import * def…
user851
  • 121
  • 1
  • 1
  • 3
5
votes
0 answers

iptables rule no actions on scapy packets

I wrote this rule to change all udp destination IP addresses to 8.8.8.8 when dport is 53: iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT --to-destination 8.8.8.8 The rule worked when I used: dig +short iranled.com @4.2.2.4 tcpdump…
Baba
  • 3,159
  • 2
  • 25
  • 39
3
votes
0 answers

How to get scapy to sniff on the correct interface?

The sniff function in scapy in python2.7 worked fine before upgrading my linux Operating System. from scapy.all import * client_mac="c4:3d:c7:8f:03:19" wlan_mac="00:c0:ca:6d:ac:fa" sniff(iface="mon0",prn=packet_callback,filter="(ether dst…
repzero
  • 484
  • 5
  • 13
1
vote
1 answer

how to modify pcap file for Additional Information in packet

I have one Pcap File which consist of Some Information. I need to modify the data in the file. Example: As you can see There are details of packets and in Additional Record section I have TXT value fn=Room 110 Now please help me to change the TXT…
1
vote
1 answer

ip rule not respecting packet generation how to fix?

Problem: ip rule built to route L4 traffic out a specific interface are not respected when packets are generated with different source address. Overview I want to generate packets with a different source address than the host's address's. To…
Dave
  • 522
  • 4
  • 18
1
vote
1 answer

IP Options are Dropped in Ubuntu 16.10

I am using Ubuntu 16.10 to run an experiment. I use Python scapy to send two packets to a machine connected over a switch. The first packet is a normal TCP SYN packet and is received by the nc app on the second machine and I can see the…
Human
  • 125
  • 6
1
vote
0 answers

Tap interface is not receiving packets

I'm configuring a tap interface and trying to send and receive packets through it, i configure it like this: ip tuntap add name tap0 mode tap multi_queue ip link set tap0 up i'm using scapy to send traffic to the interface, the command is : p =…
1
vote
1 answer

How to generate network traffic and save it to pcap files?

I want to test snort, so I want to have some test network traffic. Since snort can read pcap files, I want to generate some traffics which can be customized and save it to pcap files. Here are my questions: Is it right to test snort as I said? Is…
1
vote
0 answers

Filter packets by mac address and "EAP" in scapy

Is there a way to filter packets by mac address and "EAP" protocol using scapy in python? this is my sniff command line: sniff(iface="mon0",prn=lambda x: x.summary())
repzero
  • 484
  • 5
  • 13
0
votes
2 answers

How to install PyX correctly for Scappy use?

When I try to run Scappy interactive shell I am faced with this: INFO: Can't import PyX. Won't be able to use psdump() or pdfdump() (The shell is working but of course I can not use the above ^ :( However when I installed PyX I then get this…
Jake
  • 1
  • 1
  • 1