본문 바로가기

Ryu's Tech

DHCP Snooping [ Dynamic ARP Inspection ][ DAI ]


DAI는 라우터나 스위치에 연결되어 Gratuitous ARP Attack을 방어하는 것이라고 하네요.
Gratuitous 의 의미는 "무료의" 이라는 의미입니다.

용도는 뭐 거의 IP를 처음 셋팅했을 시에 충돌을 감지하고 DHCP로 IP를 받은 뒤 충돌을 감지 하는 등의 매우 미미한 용도의 ARP 입니다.
네트워크에서 같은 IP 를 사용하면 Gratuitous ARP 에 의해서 메세지를 받게 됩니다.
그리고 GARP 는 브로드 캐스팅 한다고 하네요

그런데 GARP Attack에 대해 찾아봤는데, 찾기 어렵군요.. 어렵네요...
However, Gratuitous ARP can also be exploited by malicious programs that want to illegitimately take on the identity of another station. When a malicious station redirects traffic to itself from two other stations that were talking to each other, the hacker who sent the GARP messages becomes the man-in-the-middle. Hacker programs such as ettercap do this with precision by issuing "private" GARP messages to specific MAC addresses rather than broadcasting them. In this way, the victim of the attack does not see the GARP packet for its own address. Ettercap also keeps its ARP poisoning in effect by repeatedly sending the private GARP messages every 30 seconds.

좀 더 알아봐야겠어요. 아무튼, 이와 같은 공격을 방지 하기 위해서 untrust 포트에서 날아오는 ARP Requests와 Replies를 모두 Inspect[조사]합니다.

아무튼 DAI를 사용하면 L2 계층의 네트워크 distrupt나 Sniff에 대한 공격을 방어할 수 있습니다. 하지만 잘못 설정하면 인가된 사용자도 거부될 수 있습니다. 또한 새로 추가 하는 장비의 경우에도 DHCP Snooping binding table 등록이 되지 않으면 통신을 할 수가 없습니다.

아무튼 결국 제대로 되지 않은 ARP 에 대한 필터링을 해 주는 것입니다.



아무튼 어려운 설명 뒤로두고 설정을 보겠습니다.

switch(config)# ip dhcp snooping vlan 10,20 (required)
switch(config)# no ip dhcp snooping information option (required without option 82 dhcp server)
switch(config)# ip dhcp snooping (required)
switch(config)# ip arp inspection vlan 10,20
switch(config)# ip dhcp snooping database tftp://172.26.168.10/tftpboot/cisco/ngcs-dhcpdb
switch(config-if)# ip dhcp snooping trust 
switch(config-if)# ip arp inspection trust
switch(config-if)# ip arp inspection limit rate 15 (pps)

이전에 봤던것과 비슷비슷하니 달라진 부분만 확인해 보겠습니다.

switch(config)# ip dhcp snooping database tftp://172.26.168.10/tftpboot/cisco/ngcs-dhcpdb
이 커맨드를 통해서 DHCP Snooping Binding Database를 백업해 둘 수 있습니다.
그리고 arp를 감시할 포트에서
no ip arp inspection trust 해주게 됩니다. trust port는 감시를 안하게 되겠죠.

하나의 설정 예를 보겠습니다. Source ip 192.168.2.100 그리고 Mac address 0015.c557.f9bd 가 match하지 않으면 필터링 하는 것입니다.

switch(config)# ip arp inspection vlan 20
Switch(config)# arp access-list dai_vlan20

Switch(config-arp-nacl)# permit ip host 192.168.2.100 mac host 0015.c557.f9bd
Switch(config-arp-nacl)# exit
Switch(config)#
Switch(config)# ip arp inspection filter dai_vlan2 vlan 20
Switch(config)#


이것도 똑같이 vlan 104에 설정하는 것입니다.
Switch(config)# ip arp inspection vlan 104
Switch(config)# arp access-list StaticARP
Switch(config-acl)# permit ip host 192.168.1.10 mac host 0006.5b02.a841
Switch(config-acl)# exit
Switch(config)# ip arp inspection filter StaticARP vlan 104
Switch(config)# interface gigabitethernet 0/1
Switch(config-if)# ip arp inspection trust

이를 통해 확인할 수 있습니다.

Switch# show ip arp inspection interfaces
Switch# show ip arp inspection statistics






아 너무.... 어렵네요......
많은 수정이 있을 내용 같네요.... 부족한 내용 죄송합니다...