- 구성과 계획
- 네트워크 구성도
win10 - 192.168.10.146/AC-7B-A1-B2-3B-D0
공격자 att7 - 192.168.10.150/00:0c:29:a1:3f:e0
감시자 att6 - 192.168.10.149/00:0C:29:4F:41:6E
피해자 att5 - 192.168.10.148/00:0C:29:C6:9A:42
winXP - 192.168.10.147/00:0c:29:26:42:b6
- 과정 정리
step1. 감시자 arpwatch 셋팅 및 구동
step2. 감시자 sendmail 셋팅 및 구동
step3. 공격자 arpspoof
step4. mail, arp 확인
- 관련내용정리
sendmail : arpwatch를 이용하여 알림을 받기 위한 메일 프로그램이다.
arpwatch : arp 변경사항을 감지하여 메일로 보내주는 프로그램이다.
- 실습과정
step1. 감시자 arpwatch 셋팅 및 구동
// arpwatch 설치
yum -y install arpwatch
// arpwatch 셋팅
vi /etc/sysconfig/arpwatch
//7 이상
OPTIONS="-u arpwatch -i ens32
-e '메일주소'
-s 'arpwatch150'
-n
'192.168.10.0/24'"
//6 이하
OPTIONS="-u arpwatch -i eth0
-e '메일주소'
-s 'arpwatch149'
-n
'192.168.10.0/24'"
//7 이상
arpwatch 구동
systemctl stop arpwatch
systemctl start arpwatch
//6 이하
arpwatch 구동
service arpwatch stop
service arpwatch start
step2. 감시자 sendmail 셋팅 및 구동
// sendmail 설치
yum install -y install sendmail sendmail-cf
//7 이상 sendmail 구동
systemctl restart sendmail
//6 이하 sendmail 구동
service sendmail restart
// 메일 테스트
echo '149this is test.' | mail -s
'sendmail test' 메일주소
// 확인
step3. 공격자 arpspoof
arpspoof -i ens32 -t 192.168.10.148 192.168.10.1
arpspoof -i ens32 -t 192.168.10.1 192.168.10.148
fragrouter -B1
step4. mail, arp 확인 및 비교
- 피해자 arp 확인
공격 전과 후의 게이트웨이 mac 주소가 바뀌었다.
- arpwatch 메일 확인
- 새로운 Mac 주소가 추가될 경우 : new station
- 기존 정보가 변경된 경우 : changed ethernet address
기존 정보가 변경된 것으로 150번의 mac 주소가 없을때 변경된것이다. 자세히 보면 150번 공격자와 맥주소가 같다.
- MAC주소가 중복된 경우 : flip flop
arp spoofing의 징조로 150번과 중복되기 때문에 메일이 온것이다.
- 결론
원천적으로 arp spoofing을 차단하기 어렵지만 이상한 징후를 메일로 알림을 받아 대응할 수 있는 arpwatch를 사용함으로써 arp spoofing을 탐지할 수 있다.
댓글 없음:
댓글 쓰기