Linux/모의해킹

ARP 정적 변경하기

GGkeeper 2022. 1. 11. 02:59

실습> ARP 정적 변경하기

리눅스 : arp -s IP주소 MAC주소
윈도우 XP : arp -s IP주소 MAC주소

ARP Spoofing 공격이 발생하지 않은 상태의 MAC주소를 확인한다.
C:\>ping 8.8.8.8
C:\>ping 192.168.108.102
C:\>arp -a

Interface: 192.168.108.105 --- 0x20002
  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  <-- 서로 다르다.


ARP Spoofing 공격이 일어나면 Gateway MAC주소가 변경된다.
Attacker# arpspoof2.py 2 105
>>> arp spoofing 공격 실행중 !!! <<<
arpspoof -t 192.168.108.2 192.168.108.105 > /dev/null 2>&1 &
arpspoof -t 192.168.108.105 192.168.108.2 > /dev/null 2>&1 &
fragrouter -B1 > /dev/null 2>&1

C:\>arp -a

Interface: 192.168.108.105 --- 0x20002
  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  <-- 서로 같다.

윈도우 XP가 정적으로 설정한 이후에는 arp 변조가 일어나지 않는다.
C:\>arp -s 192.168.108.2 00-50-56-e2-02-72
C:\>arp -a

Interface: 192.168.108.105 --- 0x20002
  Internet Address      Physical Address      Type
  192.168.108.2         00-50-56-e2-02-72     static   <-- 바꾸지 않는다.
  192.168.108.102       00-0c-29-e6-4d-4a     dynamic