ETTERCAP - The Easy Tutorial - 대응책

Ettercap Countermeasures
최종 업데이트: Jul 21 2011


Tool
Install
Ergonomy
Forum



Details Ettercap은 무엇인가?
설치방법
ARP 포이즈닝
중간자 공격 (MITM, Man-in-the-middle Attack)
통계
대응책

Korean translation by Youngbin Benjamin Im helped by powerhan96.



⚠️⚠️⚠️
Please check our website about
attractions in Western Switzerland !! (Please use english translation).

⚠️⚠️⚠️
Merci de consulter notre site sur les
activités à faire en Suisse romande !!


ARP 포이즈닝을 효과적으로 방어한다는 것은 쉬운 일이 아니다. ARP 프로토콜은 패킷을 실질적으로 보내는 서버와의 연결 무결성을 확인할 수 있는 방법을 제공하지 않기 때문이다.
상황은 이러하지만 이런 방법을 악용하는 스푸퍼에 대응할 수 있는 몇 가지 방법을 제안하려고 한다.

1. 고정 ARP 2. 감시툴 3. 포트 보안 4. 결론



1. 고정 ARP

고정 ARP를 사용한다는 것은 직접 IP와 MAC주소를 매핑한다는 것이다.

윈도우 PC

C:\Documents and Settings\administrator>arp -s 192.168.1.1   11-22-33-44-11-11
ARP 캐시 테이블을 다음과 같이 볼 수 있다:

C:\Documents and Settings\administrator>arp -a
Interface : 192.168.1.2 --- 0x2
Internet Address
192.168.1.1
192.168.1.100
Physical Address
11-22-33-44-11-11
11-22-33-44-99-99
Type
static
dynamic
리눅스 PC

#arp -s 192.168.1.1 11:22:33:44:11:11
ARP 캐시 테이블을 다음과 같이 볼 수 있다:

#arp
Address
192.168.1.1
HWtype
ether
HWaddress
11:22:33:44:11:11
Flags Mask
CM
Iface
eth0
시스코 라우터

router#configure terminal
router(config)#arp 192.168.1.2 1122.3344.5566 ARPA
고정적인 IP – MAC주소 매핑을 사용하면 ARP 포이즈닝을 막을 수 있지만 두 가지의 큰 단점이 있다.
-
 
-
일일이 설정해야 하기 때문에 운영자에게 추가적인 부하가 발생하고 노트북을 사용하는 경우처럼 사용자가 빈번히 바뀔 수 있는 환경에서는 이런 방법이 불가능 할 수 있다.
포트 훔치기(port stealing)와 같은 다른 종류의 ARP 공격은 막을 수 없다.
Top of the page



2. 감시툴

Arpwatch

Arpwatch는 네트워크 환경에서 ARP 활동을 모니터링 하는 툴로써 특히, MAC주소와 IP주소 조합에 변경이 생겼을 때 이를 감지하는데 유용하다. ARP 스푸핑과 같은 ARP 공격이 이루어지려고 할 때나 의심되는 ARP 활동이 모니터링 되었을 때 관리자에게 메일이 발송된다. (Arpwatch에서 ARP 매핑이 변경되는 것을 flip-flop이라고 한다).

#apt-get install arpwatch
Arpwatch는 디폴트로 /var/log/syslog로 로그를 남긴다. “tail /var/log/syslog”를 사용하여 로그를 실시간 감시할 수 있다.
설정파일은 /etc/arpwatch.conf 파일이다.

Ettercap

Ettercap을 그래픽모드로 인스톨한다.

#apt-get install ettercap-gtk
Ettercap을 그래픽모드로 실행한다.

#ettercap -G
Sniff -> Unified sniffing...
Unified sniffing sniff man in the middle attack openmaniak ettercap
Unified sniffing sniff man in the middle attack  openmaniak ettercap
 
 
 
 
 

Plugins -> Manage the plugins
Arp_corp 플로그인을 클릭하여 활성화 시킨다.

Manage the plugins plugins man in the middle attack  openmaniak ettercap

Start -> Start Sniffing
Start Sniffing  start man in the middle attack  openmaniak ettercap

Snort IDS

Snort IDS와 같은 침입탐지시스템은 ARP의 비정상적인 활동을 감시하며 관리자에게 메일을 발송하여 알려준다.

Top of the page



3. 포트 보안

포트-보안은 몇몇 고급 스위치(High-end switches)에서 제공되는 기능이다.
특정 MAC주소를 가진 디바이스만 스위치 포트에 접근이 가능하다. 만약 인증되지 않은 접속이 시도될 경우, 스위치에서 관리자에게 SNMP트랩을 사용하여 경고를 보내거나 잘못된 포트를 바로 닫아버릴 수도 있다.

아래는 시스코 스위치에서 first port(FastEthernet 0/1)를 포트-보안으로 설정한 예제이다.
스위치 포트에서 sticky 키워드를 사용해 승인되는 첫번째 고유 MAC주소만 사용할 수 있도록 설정한다. 만약 스위치 포트의 first port에서 다른 MAC주소가 감지되면 즉시 포트를 꺼버리게 된다.

Switch# configure terminal
Switch(config)# interface FastEthernet 0/1
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security maximum 1
Switch(config-if)# switchport port-security violation shutdown
스위치 설정 작업이 끝났다면 1122.3344.5566의 MAC주소를 가지고 있는 디바이스를 FastEthernet 0/1 포트로 연결한다. 지금 이 포트는 하나의 MAC주소만 승인하도록 설정이 되어있다.

Switch# show port-security
Secure Port   MaxSecureAddr   CurrentAddr   SecurityViolation   Security Action
                         (Count)          (Count)            (Count)
---------------------------------------------------------------------------
   Fa1/0/1               1                    1                    0          Shutdown
---------------------------------------------------------------------------
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 6272

Switch# show port-security interface FastEthernet 0/1
Port Security
Port Status
Violation Mode
Aging Time
Aging Type
SecureStatic Address Aging
Maximum MAC Addresses
Total MAC Addresses
Configured MAC Addresses
Sticky MAC Addresses
Last Source Address:Vlan
Security Violation Count
:
:
:
:
:
:
:
:
:
:
:
:
Enabled
Secure-up
Shutdown
0 mins
Absolute
Disabled
1
1
0
1
1122.3344.5566:1
0
Switch#show port-security address
          Secure Mac Address Table
----------------------------------------------------------------------------
Vlan    Mac Address        Type                  Ports            Remaining Age
                                                                              (mins)
----    -----------          ----                    -----          -------------
1        1122.3344.5566    SecureSticky        Fa0/1              -
----------------------------------------------------------------------------
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 6272


현재 연결된 장치(MAC: 1122.3344.5566)의 연결을 해제하고 다른 장치(MAC: 1122.3344.9999)를 연결한다. 아래와 같이 스위치에서 first port를 바로 끄는 것을 볼 수 있으며 err-disable 상태로 변경한다.

Switch# show port-security interface FastEthernet 0/1
Port Security
Port Status
Violation Mode
Aging Time
Aging Type
SecureStatic Address Aging
Maximum MAC Addresses
Total MAC Addresses
Configured MAC Addresses
Sticky MAC Addresses
Last Source Address:Vlan
Security Violation Count
:
:
:
:
:
:
:
:
:
:
:
:
Enabled
Secure-down
Shutdown
0 mins
Absolute
Disabled
1
1
0
1
1122.3344.9999:1
0
Switch#show logging
00:06:28:
 
00:06:28
 
00:06:29:
 
00:06:30:
%PM-4-ERR_DISABLE: psecure-violation error detected on Fa0/1, putting Fa0/1 in err-disable state
%PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 1122.3344.9999 on port FastEthernet0/1.
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down
Switch#show interfaces status | include 0/1
Port
-------
Fa0/1
Name
------------------
 
Status
------------
err-disabled
Vlan
--------
1
Duplex
------
auto
Speed
-------
auto
Type
----
10/100BaseTX
만약 포트에서 err-disable 상태를 다시 활성화 하려면 다음과 같은 명령어를 사용하면 된다:

Switch# configure terminal
Switch(config)# interface FastEthernet 0/1
Switch(config-if)# shutdown
Switch(config-if)# no shutdown
포트-보안 활동은 ARP 스푸핑을 막지는 못한다. 그러나 공격자가 네트워크에 접속할 수 있는 가능성을 줄여준다.



4. 결론

ARP 스푸핑을 완벽히 막을 수 있는 마법 같은 해결책은 없다. 그러나 여러 공격을 사전에 방지할 수 있는 몇 가지 방법을 아래에 제안해 보겠다.
ARP 스푸핑을 완벽히 막을 수 있는 마법 같은 해결책은 없다. 그러나 여러 공격을 사전에 방지할 수 있는 몇 가지 방법을 아래에 제안해 보겠다.
포트 보안을 통해 제한적인 네트워크를 구성하거나 또는 더 나아가 RADIUS와 같은 서버인증 프로그램을 통해 인증된 PC만 접근하도록 하는 802.1x 프로토콜 기반의 환경을 구성한다.
IDS와 같은 네트워크 감시 툴을 사용한다.
Pirate: 사전적 의미는 해적이다. 위의 문서에서 사용되는 의미는 인증과정 없이 관리자 모르게 네트워크를 사용하는 사람을 의미한다.

Top of the page