1【网络安全】【dhcp攻击与防御】

上传人:E**** 文档编号:107654288 上传时间:2019-10-20 格式:PDF 页数:9 大小:285.61KB
返回 下载 相关 举报
1【网络安全】【dhcp攻击与防御】_第1页
第1页 / 共9页
1【网络安全】【dhcp攻击与防御】_第2页
第2页 / 共9页
1【网络安全】【dhcp攻击与防御】_第3页
第3页 / 共9页
1【网络安全】【dhcp攻击与防御】_第4页
第4页 / 共9页
1【网络安全】【dhcp攻击与防御】_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《1【网络安全】【dhcp攻击与防御】》由会员分享,可在线阅读,更多相关《1【网络安全】【dhcp攻击与防御】(9页珍藏版)》请在金锄头文库上搜索。

1、第一章 网络基础设施安全实验 DHCP 攻击与防御 【实验名称】【实验名称】 DHCP 攻击与防御 【实验目的】【实验目的】 使用交换机的 DHCP 监听功能增强网络安全性 【背景描述】【背景描述】 某企业网络中, 为了减小网络编址的复杂性和手工配置 IP 地址的工作量, 使用了 DHCP 为网络中的设备分配 IP 地址。但网络管理员发现最近经常有员工抱怨无法访问网络资源, 经过故障排查后,发现客户端 PC 通过 DHCP 获得了错误的 IP 地址,从此现象可以判断出 网络中可能出现了 DHCP 攻击,有人私自架设了 DHCP 服务器(伪 DHCP 服务器)导致客 户端 PC 不能获得正确的

2、IP 地址信息,以至不能够访问网络资源。 【需求分析】【需求分析】 对于网络中出现非法 DHCP 服务器的问题,需要防止其为客户端分配 IP 地址,仅允许 合法的 DHCP 服务器提供服务。交换机的 DHCP 监听特性可以满足这个要求,阻止非法服 务器为客户端分配 IP 地址。 【实验拓扑】【实验拓扑】 【实验设备】【实验设备】 三层交换机 1 台(支持 DHCP 监听) 二层交换机 1 台(支持 DHCP 监听) PC 机 3 台(其中 2 台需安装 DHCP 服务器) 1 网络安全实验教程 【预备知识】【预备知识】 交换机转发原理 交换机基本配置 DHCP 监听原理 【实验原理】【实验原理

3、】 交换机的 DHCP 监听特性可以通过过滤网络中接入的伪 DHCP(非法的、不可信的) 发送的 DHCP 报文增强网络安全性。DHCP 监听还可以检查 DHCP 客户端发送的 DHCP 报文的合法性,防止 DHCP DoS 攻击。 【实验步骤】【实验步骤】 第一步:配置第一步:配置 DHCP 服务器服务器 将两台 PC 配置为 DHCP 服务器,一台用做合法服务器,另一台用作伪服务器(Rogue DHCP Server) 。可以使用 Windows Server 配置 DHCP 服务器,或者使用第三方 DHCP 服 务器软件。合法 DHCP 服务器中的地址池为 172.16.1.0/24,伪

4、 DHCP 服务器的地址池为 1.1.1.0/24。 第二步:第二步:SW2 基本配置(接入层)基本配置(接入层) Switch#configure Switch(config)#hostname SW2 SW2(config)#vlan 2 SW2(config-vlan)#exit SW2(config)#interface range fastEthernet 0/1-2 SW2(config-if-range)#switchport access vlan 2 SW2(config)#interface fastEthernet 0/24 SW2(config-if)#switchpo

5、rt mode trunk SW2(config-if)#end SW2# 第三步:第三步:SW1 基本配置(分布层)基本配置(分布层) Switch#configure Switch(config)#hostname SW1 SW1(config)#interface fastEthernet 0/24 SW1(config-if)#switchport mode trunk SW1(config-if)#exit SW1(config)#vlan 2 SW1(config-vlan)#exit SW1(config)#interface vlan 2 SW1(config-if)#ip a

6、ddress 172.16.1.1 255.255.255.0 SW1(config-if)#exit SW1(config)#vlan 100 SW1(config-vlan)#exit SW1(config)#interface vlan 100 2 第一章 网络基础设施安全实验 SW1(config-if)#ip address 10.1.1.2 255.255.255.0 SW1(config-if)#exit SW1(config)#interface fastEthernet 0/1 SW1(config-if)#switchport access vlan 100 SW1(con

7、fig-if)#end SW1# 第四步:将第四步:将 SW1 配置为配置为 DHCP Relay SW1#configure SW1(config)#service dhcp SW1(config)#ip helper-address 10.1.1.1 !配置 DHCP 中继,指明 DHCP 服务器地址 SW1(config)#end SW1# 第五步:验证测试第五步:验证测试 确保两台 DHCP 服务器可以正常工作。将客户端 PC 配置为自动获取地址后,接入交 换机端口,此时可以看到客户端从伪 DHCP 服务器获得了错误的地址。 下图为在客户端上使用 Ethereal 捕获的报文,可以看到

8、,客户端先接收到了伪 DHCP 服务器发送的 DHCP Offer 报文,后收到通过 DHCP Relay 发送的 DHCP Offer 报文。根据 通常 DHCP 协议的实现,客户端将使用收到的第一个响应报文(DHCP Offer)中的信息。 第六步:在第六步:在 SW1 上配置上配置 DHCP 监听监听 3 网络安全实验教程 SW1#configure SW1(config)#ip dhcp snooping !开启 DHCP snooping 功能 SW1(config)#interface fastEthernet 0/1 SW1(config-if)#ip dhcp snooping

9、 trust !配置 F0/1 为 trust 端口 SW1(config-if)#exit SW1(config)#interface fastEthernet 0/24 SW1(config-if)#ip dhcp snooping trust !配置 F0/24 为 trust 端口 SW1(config-if)#end SW1# 第七步:在第七步:在 SW2 上配置上配置 DHCP 监听监听 SW2#configure SW2(config)#ip dhcp snooping SW2(config)#interface fastEthernet 0/24 SW2(config-if)#

10、ip dhcp snooping trust SW2(config-if)#end SW2# 第八步:验证测试第八步:验证测试 将客户端之前获得的错误 IP 地址释放 (使用 Windows 命令行 ipconfig /release) ,再使 用 ipconfig /renew 重新获取地址,可以看到客户端获取到了正确的 IP 地址。 由于配置了 DHCP 监听,并且伪 DHCP 服务器连接的端口为非信任端口,所以交换机 丢弃了伪 DHCP 服务器发送的响应报文。下图为在客户端上使用 Ethereal 捕获的报文,可 以看到, 客户端只接收到了通过 DHCP Relay 发送的 DHCP O

11、ffer 报文,未接收到伪 DHCP 服务器发送的 DHCP Offer 报文。 4 第一章 网络基础设施安全实验 【注意事项】【注意事项】 DHCP 监听只能够配置在物理端口上,不能配置在 VLAN 接口上 【参考配置】【参考配置】 SW1#show running-config Building configuration. Current configuration : 1427 bytes ! hostname SW1 ! ! ! vlan 1 ! vlan 2 ! vlan 100 ! ! service dhcp ip helper-address 10.1.1.1 ip dhcp

12、 snooping ! ! ! ! interface FastEthernet 0/1 switchport access vlan 100 ip dhcp snooping trust ! interface FastEthernet 0/2 ! interface FastEthernet 0/3 ! interface FastEthernet 0/4 5 网络安全实验教程 ! interface FastEthernet 0/5 ! interface FastEthernet 0/6 ! interface FastEthernet 0/7 ! interface FastEthe

13、rnet 0/8 ! interface FastEthernet 0/9 ! interface FastEthernet 0/10 ! interface FastEthernet 0/11 ! interface FastEthernet 0/12 ! interface FastEthernet 0/13 ! interface FastEthernet 0/14 ! interface FastEthernet 0/15 ! interface FastEthernet 0/16 ! interface FastEthernet 0/17 ! interface FastEthern

14、et 0/18 ! interface FastEthernet 0/19 ! interface FastEthernet 0/20 ! interface FastEthernet 0/21 ! interface FastEthernet 0/22 ! interface FastEthernet 0/23 ! interface FastEthernet 0/24 switchport mode trunk ip dhcp snooping trust ! interface GigabitEthernet 0/25 6 第一章 网络基础设施安全实验 ! interface Gigab

15、itEthernet 0/26 ! interface GigabitEthernet 0/27 ! interface GigabitEthernet 0/28 ! interface VLAN 2 ip address 172.16.1.1 255.255.255.0 ! interface VLAN 100 ip address 10.1.1.2 255.255.255.0 ! line con 0 line vty 0 4 login ! ! end SW2#sh running-config Building configuration. Current configuration

16、: 1254 bytes ! hostname SW2 ! ! ! vlan 1 ! vlan 2 ! ! ip dhcp snooping ! ! interface FastEthernet 0/1 switchport access vlan 2 ! interface FastEthernet 0/2 switchport access vlan 2 7 网络安全实验教程 ! interface FastEthernet 0/3 ! interface FastEthernet 0/4 ! interface FastEthernet 0/5 ! interface FastEthernet 0/6 ! interface FastEthernet 0/7 ! interface FastEthernet 0/8 ! interface FastEthernet 0/9 ! interface FastEthernet 0/10 ! interface FastEthernet 0/11

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号