ETTERCAP - The Easy Tutorial - ARP 포이즈닝

Ettercap ARP 포이즈닝
최종 업데이트: 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 스푸핑 공격을 사용하여 Ettercap PC를 “중간자”로 설정해 보도록 한다.

[네트워크 시나리오 다이어그램]은 Ettercap 소개 페이지에서 확인할 수 있다.

가장 먼저 해야 할 것은 Ettercap이 설치된 PC의 IP주소를 공격할 PC와 같은 네트워크로 설정하는 것이다. 공격용 IP주소로는 192.168.1.100을 사용할 것이다. 리눅스 머신에서 IP주소를 설정하는 자세한 방법은 [네트워킹 설명서]에서 확인할 수 있다.

참고로 Ettercap이 처음 실행 될 때에는 루트 권한으로 실행이 되며 실행 후 ‘nobody’사용자로 전환된다.


1. ARP 스푸핑 2. ARP 트래픽 3. ARP 테이블 4. ARP 스푸핑 멈추기


1. ARP 스푸핑

Ettercap을 그래픽모드로 실행한다.

#ettercap -G
openmaniak ettercap

Sniff mode를 선택한다.

Sniff -> Unified sniffing
openmaniak ettercap man in the middle attack sniff united sniffing arrow blue
openmaniak ettercap
 
 
 
 
 

PC가 물려있는 서브넷의 호스트를 검색한다.

Hosts -> Scan for hosts
네트워크 대역 스캔은 IP 주소 설정에 의해 결정이 된다.

openmaniak ettercap man in the middle attack arrow blue
openmaniak ettercap  man in the middle attack sniff united sniffing
 
 
 
 
 
 
 
 

서브넷에 존재하는 호스트의 MAC주소와 IP주소를 확인한다..

openmaniak ettercap man in the middle attack


공격할 PC를 선택한다.

공격할 대상으로는 192.168.1.2 IP를 가진 윈도우 PC와 192.168.1.1 IP를 가진 라우터를 선택한다.
192.168.1.1을 선택하고 “target 1” 버튼을 누른다.
192.168.1.2을 선택하고 “target 2” 버튼을 누른다.
만약 타겟을 지정하지 않으면 서브넷에 연결되어 있는 모든 장치가 ARP 공격 대상으로 선택이 된다.

openmaniak ettercap man in the middle attack

타겟을 확인한다.

openmaniak ettercap man in the middle attack

man in the middle attack openmaniak ettercap

ARP 포이즈닝을 시작한다.

Mitm -> Arp 포이즈닝
man in the middle attack openmaniak ettercap arrow blue
man in the middle attack openmaniak ettercap
 
 
 
 
 

스니핑을 시작한다.

마지막으로 스니퍼를 구동하여 정보를 수집한다. statistics.

Start -> Start sniffing
man in the middle attack openmaniak ettercap

Top of the page



ARP 트래픽:

윈도우 PC에서 Wireshark 프로그램을 사용하여 공격 전후의 트래픽을 비교해 볼 수 있다.

참고로, 네트워크 다이어그램을 보기 바란다.
192.168.1.1
192.168.1.2
192.168.1.100
(Router)
(Windows)
(Pirate)
11:22:33:44:11:11
11:22:33:44:55:66
11:22:33:44:99:99
공격(포이즈닝) 전
서로 통신하기 전에, 윈도우 PC는 통신 상대의 MAC주소를 찾기 위해 ARP 브로드캐스팅을 수행한다.

No
1
2
3
4
Source
11:22:33:44:55:66
11:22:33:44:11:11
11:22:33:44:11:11
11:22:33:44:55:66
Destination
11:22:33:44:11:11
11:22:33:44:55:66
11:22:33:44:55:66
11:22:33:44:11:11
Prot
ARP
ARP
ARP
ARP
Info
who has 192.168.1.1? Tell 192.168.1.2
192.168.1.1 is at 11:22:33:44:11:11
who has 192.168.1.2? Tell 192.168.1.1
192.168.1.2 is at 11:22:33:44:55:66

                                        arrow blue

공격(포이즈닝) 후
이전 캡처 정보와 비교해 봤을 때 라우터의 ARP 브로드캐스트 요청에 응답한 윈도우PC의 응답정보가 상당히 비슷한 것처럼 보인다.
차이점이 있다면, 윈도우PC(192.168.1.2)에서 라우터(192.168.1.1)의 MAC주소를 찾으려고 할 때 공격자PC는 지속적으로 ARP 패킷을 보내 192.168.1.1 IP주소는 라우터의 MAC주소(11:22:33:44:11:11)가 아닌 공격자 PC의 MAC주소(11:22:33:44:99:99)로 보이는 것이다.

No
1
2
3
4
Source
11:22:33:44:11:11
11:22:33:44:55:66
11:22:33:44:99:99
11:22:33:44:99:99
Destination
11:22:33:44:55:66
11:22:33:44:11:11
11:22:33:44:55:66
11:22:33:44:55:66
Prot
ARP
ARP
ARP
ARP
Info
who has 192.168.1.2? Tell 192.168.1.1
192.168.1.2 is at 11:22:33:44:55:66
192.168.1.1 is at 11:22:33:44:99:99
192.168.1.1 is at 11:22:33:44:99:99
Top of the page



ARP 테이블:

라우터와 윈도우PC의 ARP 테이블을 분석해 보면 Ettercap이 실행중인 리눅스PC의 공격에 의해 MAC주소가 공격자의 MAC주소로 변경된 것을 확인할 수 있다.
이 말은 곧 라우터에서 PC로 또는 PC에서 라우터로 전송되는 모든 패킷이 Ettercap이 설치된 PC을 경유하게 됨을 뜻한다.

-------------------- Windows machine 192.168.1.2 --------------------
윈도우에서 다음과 같은 명령어를 실행시킨다.
Start -> Run -> cmd

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
dynamic
dynamic

              arrow blue

Interface : 192.168.1.2 --- 0x2
Internet Address
192.168.1.1
192.168.1.100
Physical Address
11-22-33-44-99-99
11-22-33-44-99-99
Type
dynamic
dynamic

-------------------- Linux machine 192.168.1.100 --------------------
#arp -a
?
?
(192.168.1.1)
(192.168.1.2)
at
at
11:22:33:44:11:11
11:22:33:44:55:66
[ether]
[ether]
on
on
eth0
eth0
-------------------- router openmaniak cisco Router 192.168.1.1 --------------------
>show arp
Protocol
Internet
Internet
Address
192.168.1.2
192.168.1.100
Age (min)
194
128
Hardware Addr
1122.3344.5566
1122.3344.9999
Type
ARPA
ARPA
interface
FastEthernet0/0
FastEthernet0/0
              arrow blue

Protocol
Internet
Internet
Address
192.168.1.2
192.168.1.100
Age (min)
194
128
Hardware Addr
1122.3344.9999
1122.3344.9999
Type
ARPA
ARPA
interface
FastEthernet0/0
FastEthernet0/0
Netscreen(Juniper)를 사용 중이라면 아래와 같은 명령어를 사용하여 ARP테이블을 확인할 수 있다.

>get arp
Vyatta 라우터에서는 다음과 같은 명령어를 사용한다.

>show arp

Top of the page



ARP 스푸핑 멈추기:

openmaniak ettercap

Ettercap은 공격을 완료한 후, 피해자의 ARP 테이블을 원상 복구 하는 기능을 가지고 있다. 즉, 공격대상 PC의 ARP 캐쉬가 정상적인 정보를 가질 수 있는 것이다.

만약 캐쉬에 공격자의 IP - MAC주소 정보가 남아있다면 캐쉬 스스로 리프레쉬 할 수 있도록 그냥 몇 분간 기다리거나, 더 좋은 방법으로 ARP 캐쉬를 초기화 하면 된다.

마이크로소프트 PC

C:\Documents and Settings\admin>arp -d *
Ubuntu 혹은 Debian 리눅스:

#arp -d ip_address

Fatal error: Uncaught Error: Undefined constant "php" in /home/clients/2092070cc529a092f88d8480f1925281/web/kr/ettercap_arp.php:509 Stack trace: #0 {main} thrown in /home/clients/2092070cc529a092f88d8480f1925281/web/kr/ettercap_arp.php on line 509