본문 바로가기

NCS/기술적보안구축

DAI as Dynamic ARP Inspection

 ARP Inspection

DAI는 네트워크내에서 ARP패킷의 정당성을 확인하는 보안 주제이다.

Untrust로 설정된 인터페이스에서 통신되는 패킷을 가로채어 확힌하여 옳지 않는 MAC-IP 쌍의 패킷을 로그로 남기고 버린다. 이 기술은 MiTM(Man in the Middle)공격으로부터 네크워크를 보호한다.

DAI는 정확한 MAC주소와 IP주소의 정당성을 확인하기 위해 미리 데이터베이스를 생성한다.

이것은 DHCP Snoopoing에 의해 생성되고 관리된다. 추가적으로 정적으로 구성할 수도 있다.

ARP ACL을 구성하면 DHCP snooping 보다 우선한다.

예를들어 ARP ACL에서 거부된 패킷은 DHCP SNOOPING 데이터베이스에 존해하더라도 거부된다.

 

TRUST STATE AND UNTRUST STATE

TRUST된 인터페이스로 패킷이 인입되면 DAI 프로세스는 BYPASS한다. UNTRUST인터페이스로 패킷이 인입되면 DAI 프로세스를 구동한다. 전형적으로 호스트와 연결된 포트는 UNTRUST이고 스위치간 연결은 TRUST포트이다.

 

RATE LIMITING OF ARP PACKETS

DAI CPU를 사용하여 패킷을 점검한다. DOS와 같은 공격을 방지하기 위해 인터페이스로 들어오는 ARP패킷을 제한하고 있다. 인입되는 ARP패킷이 많으면 ERRORDISABLE 상태가 된다.

 

IOU1 : i86bi-linux-l2-adventerprisek9-15.2c.bin

VPCS

 

 

 

 

VLAN  설정

IOU1(config)#vlan 12
IOU1(config-vlan)#name Client12
IOU1(config-vlan)#vlan 34
IOU1(config-vlan)#name Client34
IOU1(config-vlan)#int range e0/0 - 1
IOU1(config-if-range)#switchport mode access
IOU1(config-if-range)#switchport access vlan 12
IOU1(config-if-range)#exit
IOU1(config)#int range e0/2-3
IOU1(config-if-range)#switchport mode access
IOU1(config-if-range)#switchport access vlan 34
IOU1(config-if-range)#exit

 

SVI 설정

IOU1(config)#no ip cef

IOU1(config)#ip routing

IOU1(config)#interface vlan 12
IOU1(config-if)#ip add 10.1.4.254 255.255.255.0
IOU1(config-if)#no shutdown
IOU1(config-if)#
IOU1(config-if)#interface vlan 34
IOU1(config-if)#ip address 10.1.5.254 255.255.255.0
IOU1(config-if)#no shutdown

 

PC ip 설정

 PC1> ip 10.1.4.1/24 10.1.4.254
Checking for duplicate address...
PC1 : 10.1.4.1 255.255.255.0 gateway 10.1.4.254

PC2> ip 10.1.4.2/24 10.1.4.254
Checking for duplicate address...

PC1 : 10.1.4.2 255.255.255.0 gateway 10.1.4.254

PC3> ip 10.1.5.3/24 10.1.5.254
Checking for duplicate address...
PC1 : 10.1.5.3 255.255.255.0 gateway 10.1.5.254

PC4> ip 10.1.5.4/24 10.1.5.254
Checking for duplicate address...
PC1 : 10.1.5.4 255.255.255.0 gateway 10.1.5.254

 

통신 확인

PC1> ping 10.1.5.3
10.1.5.3 icmp_seq=1 timeout
10.1.5.3 icmp_seq=2 timeout
84 bytes from 10.1.5.3 icmp_seq=3 ttl=63 time=1.000 ms
84 bytes from 10.1.5.3 icmp_seq=4 ttl=63 time=1.000 ms
84 bytes from 10.1.5.3 icmp_seq=5 ttl=63 time=1.000 ms

 

PC1> ping 10.1.5.4
10.1.5.4 icmp_seq=1 timeout
84 bytes from 10.1.5.4 icmp_seq=2 ttl=63 time=1.000 ms
84 bytes from 10.1.5.4 icmp_seq=3 ttl=63 time=1.000 ms
84 bytes from 10.1.5.4 icmp_seq=4 ttl=63 time=1.000 ms
84 bytes from 10.1.5.4 icmp_seq=5 ttl=63 time=1.000 ms

 

MAC addrss 확보

IOU1# ping 10.1.4.1

IOU1# ping 10.1.4.2

IOU1# ping 10.1.5.3

IOU1# ping 10.1.5.4

 

IOU1#sh mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  12    0050.7966.6800    DYNAMIC     Et0/0
  12    0050.7966.6801    DYNAMIC     Et0/1
  34    0050.7966.6802    DYNAMIC     Et0/2
  34    0050.7966.6803    DYNAMIC     Et0/3

 

ARP Access-list

 arp access-list VLAN1234
 permit ip 10.1.4.0 0.0.0.255 mac 0050.7966.6800 0050.7966.6801 log
 permit ip 10.1.5.0 0.0.0.255 mac 0050.7966.6802 0050.7966.6803 log

 

ARP Inspection 설정

IOU1(config)#ip arp inspection vlan 12,34

IOU1(config)#ip arp inspection filter VLAN1234 vlan 12,34

IOU1(config)#ip arp inspection validate ip src-mac

 

Ping testing from PC1 to all pc 

PC1> ping 10.1.4.2 
84 bytes from 10.1.4.2 icmp_seq=1 ttl=64 time=0.000 ms
84 bytes from 10.1.4.2 icmp_seq=2 ttl=64 time=1.000 ms
84 bytes from 10.1.4.2 icmp_seq=3 ttl=64 time=0.000 ms
84 bytes from 10.1.4.2 icmp_seq=4 ttl=64 time=0.000 ms
84 bytes from 10.1.4.2 icmp_seq=5 ttl=64 time=1.000 ms

 

PC1> ping 10.1.5.3
10.1.5.3 icmp_seq=1 timeout
10.1.5.3 icmp_seq=2 timeout
84 bytes from 10.1.5.3 icmp_seq=3 ttl=63 time=1.000 ms
84 bytes from 10.1.5.3 icmp_seq=4 ttl=63 time=1.000 ms
84 bytes from 10.1.5.3 icmp_seq=5 ttl=63 time=1.000 ms

 

PC1> ping 10.1.5.4
10.1.5.4 icmp_seq=1 timeout
10.1.5.4 icmp_seq=2 timeout
84 bytes from 10.1.5.4 icmp_seq=3 ttl=63 time=1.001 ms
84 bytes from 10.1.5.4 icmp_seq=4 ttl=63 time=1.000 ms
84 bytes from 10.1.5.4 icmp_seq=5 ttl=63 time=1.000 ms

 

Violation Testing 

PC2> ip 10.1.4.22/24 10.1.4.254
Checking for duplicate address...
PC1 : 10.1.4.22 255.255.255.0 gateway 10.1.4.254

PC1> ping 10.1.4.2
host (10.1.4.2) not reachable

 

 show ip arp inspection

 IOU1#show ip arp inspection

Source Mac Validation      : Enabled
Destination Mac Validation : Disabled
IP Address Validation      : Enabled

 Vlan     Configuration    Operation   ACL Match          Static ACL
 ----     -------------    ---------            ---------          ----------
   12     Enabled          Active         VLAN1234           No
   34     Enabled          Active         VLAN1234           No

 Vlan     ACL Logging      DHCP Logging      Probe Logging
 ----     -----------      ------------      -------------
   12     Deny             Deny              Off         
   34     Deny             Deny              Off         

 Vlan      Forwarded        Dropped     DHCP Drops      ACL Drops
 ----      ---------        -------     ----------      ---------
   12             14              8              8              0
   34              6              0              0              0

 Vlan   DHCP Permits    ACL Permits  Probe Permits   Source MAC Failures
 ----   ------------    -----------  -------------   -------------------
   12              0             14              0                     0
         
 Vlan   DHCP Permits    ACL Permits  Probe Permits   Source MAC Failures
 ----   ------------    -----------  -------------   -------------------
   34              0              6              0                     0

 Vlan   Dest MAC Failures   IP Validation Failures   Invalid Protocol Data
 ----   -----------------   ----------------------   ---------------------
   12                   0                        0                       0
   34                   0                        0                       0