Learn Python ARP Poisoning
How is ARP poisoning detected with Python?
What is ARP poisoning?
ARP poising you sat in a cafe for example and connected to the network of the cafe. In this case, you can show yourself as a gateway by entering between you and the attacker network. This way you can steal your information by pulling your traffic on your own. Here we write a Python script that captures the gateway change status.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import os from Tkinter import * ## Function giving warning def Alert(): root = Tk() root.title('Alert Gateway') w =500 h = 100 ws = root.winfo_screenwidth() hs = root.winfo_screenheight() x = (ws/2) - (500/2) y = (hs/2) - (100/2) root.geometry('%dx%d+%d+%d' % (w, h, x, y)) Message(root, text="Your gateway has been changed.", background='red', width=300, fg='ivory', relief=GROOVE).pack(padx=100, pady=10) root.mainloop() ##Program is executed when the gateway is taken. gateway = (os.popen("route -n | grep 'UG[ \t]' | awk '{print $2}'")).read() while 1: ##Then the continuous comparison is made. If it is changed, you will be warned. gateway2 = (os.popen("route -n | grep 'UG[ \t]' | awk '{print $2}'")).read() if gateway != gateway2: Alert() break |