Cisco DAI/arp 检查限制

网络工程 arp cisco-3750
2021-07-05 18:26:07

在最近的一次渗透测试中,我们发现我们没有将 dai 设置得尽可能紧来完全阻止事情。如果重要的话,我正在运行 Cisco 3750x。

接口配置为ip arp inspection rate limit 200. 通常会有很多 ARP 请求,因此降低限制是有问题的。由于没有超过该限制,即使存在恶意流量,接口也不会被阻止。

我已经启用了验证ip arp inspection validate ip dst-mac src-mac并将其设置errdisable recovery为更长的时间段。

我可以在这里做些什么来收紧事情?如果发生特定的 ARP 广播(例如更改默认网关的 MAC 地址),也许一定要关闭接口?

编辑请求,希望我没有清理太多。

CiscoStack1#sh ru
...
switch 1 provision ws-c3750x-48
switch 2 provision ws-c3750x-48
switch 3 provision ws-c3750x-48p
switch 4 provision ws-c3750x-48p
ip routing
...
!
ip dhcp snooping vlan 20-22
ip dhcp snooping
...
ip arp inspection vlan 20-22
ip arp inspection validate src-mac dst-mac ip
ip arp inspection filter static20 vlan  20

errdisable recovery cause arp-inspection

! All the ports are configured like this one, or marked as trusted.
interface GigabitEthernet1/0/14
 switchport access vlan 20
 switchport mode access
 ip arp inspection limit rate 200
 snmp trap mac-notification change added
 snmp trap mac-notification change removed
!
interface Vlan20
 ip address 192.168.20.1 255.255.255.0
 ip directed-broadcast 50
!
interface Vlan21
 ip address 192.168.21.1 255.255.255.0
 ip directed-broadcast 50
!
interface Vlan22
 ip address 192.168.22.1 255.255.255.0
 ip directed-broadcast 50
!
no ip http server
no ip http secure-server
logging 192.168.100.6

arp access-list static20
 permit ip host 192.168.20.242 mac host c4d6.5530.7ff1
 permit ip host 192.168.20.244 mac host 0000.b4d5.2929
 permit ip host 192.168.20.241 mac host 4c11.bfaf.5bdd
 permit ip host 192.168.20.252 mac host 085b.0e7e.0a54
 permit ip host 192.168.20.252 mac host 085b.0e7e.a54b
arp access-list staticmacs
 permit ip any mac any log

mac address-table notification change history-size 500
mac address-table notification change
mac address-table notification mac-move

和 sh ip 源绑定,所以我知道我启用了监听。

#sh ip source binding
MacAddress          IpAddress        Lease(sec)  Type           VLAN  Interface
------------------  ---------------  ----------  -------------  ----  --------------------
00:08:5D:6E:D3:4C   192.168.22.114   592866      dhcp-snooping   22    GigabitEthernet3/0/32
D4:BE:D9:9C:53:8C   192.168.22.15    525782      dhcp-snooping   22    GigabitEthernet4/0/25
00:08:5D:6E:D1:83   192.168.22.105   547010      dhcp-snooping   22    GigabitEthernet4/0/39
64:00:6A:83:37:1A   192.168.22.6     590621      dhcp-snooping   22    GigabitEthernet4/0/15
8C:EC:4B:65:A4:EE   192.168.22.62    581158      dhcp-snooping   22    GigabitEthernet4/0/16
D4:BE:D9:9D:B3:96   192.168.20.7     587056      dhcp-snooping   20    GigabitEthernet2/0/20
EC:F4:BB:1A:4C:FD   192.168.20.88    501164      dhcp-snooping   20    GigabitEthernet1/0/3
00:08:5D:6E:D1:43   192.168.22.176   593789      dhcp-snooping   22    GigabitEthernet1/0/11
34:E6:D7:54:4F:E4   192.168.22.158   580190      dhcp-snooping   22    GigabitEthernet1/0/22
8C:EC:4B:14:17:C9   192.168.20.83    585122      dhcp-snooping   20    GigabitEthernet1/0/3

Total number of bindings: 205

编辑 - 刚刚检查回来,定向广播有一个空白的访问列表。我相信它以前用于 pxe 引导。在某些时候,我们转换为在 dhcp 范围内使用 bootfile 和 next-server。

编辑 - SCCM 中的局域网唤醒功能现已完全关闭并已directed-broadcast删除条目。

1个回答

最后,我做了一些更改来解决这个问题,这在很大程度上要归功于这里的评论。我正在降低广播音量,以便将速率限制设置为合理的水平。

回复以防万一它对其他人有用。我会说减少了大约 99%。只有来自 192.168.20.1 的请求和来自管理员工作站的请求。

  • 删除旧的,不再需要的directed-broadcast设置
  • 已验证 sccm 唤醒代理已禁用
  • 关闭任何 sccm 局域网唤醒功能
  • 禁用 Windows 更新的“交付优化” - 这是一个非常健谈的
  • 通过EnableMediaRouter政策禁用谷歌浏览器的投射
  • 禁用 Windows SSDP 服务

一个额外的注意点。. 如果使用启用了 ipsec 的 Windows 防火墙,它看起来像在主模式上发生的刷新会生成 ARP 广播的周期性尖峰。

我的理论如下。

  • IPSEC 协商将与任何适用的计算机建立会话,包括同一子网上的计算机
  • 同一子网上有 Windows 100+ 设备。这几乎与我们触发 DAI 阈值事件的 arp 请求数量相同。
  • 某些广播流量会导致同一子网上的所有 Windows PC 之间出现 ipsec 主模式会话
  • IPSEC 会话会定期超时并需要重新协商。如果这些都同时发生,您会收到 ARP 请求的峰值,因为它们很少会仍在缓存中。