DDOS 대응방법
DDOS공격시 아파치웹상으로 대응하는 방법을 기술한다.
- DDOS탐지
탐지는 보통 System팀에서 Report가 오게 되지만, 웹팀내에서도 확인이 필요합니다.
- 아파치 로그상에서 IP별 request건수 측정
tail -n 10000 access_log | cut -f1 -d' ' | sort | uniq -c | sort -nk 1
- 특정 IP/Agent에 대한 request건수 측정
grep 'A cat' access_log | cut -f1 -d' ' | sort | uniq -c
아파치 로그파일의 위치는 /usr/local/apache/log/access
- 아파치 로그상에서 IP별 request건수 측정
- IP Block
해당 호스트의 아파치 VirtualHost셋팅내의 Directory 부분에 Deny From 추가<Directory "/usr/local/tomcat/webapps/ROOT"> Options -Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all Deny from xxx.xxx.xxx.xxx FileETag None </Directory>
- Agent Block
해당 호스트의 아파치 VirtualHost셋팅내에 아래와 같이 Agent pattern을 deny from에 추가<Location ~ "/*"> Order allow,deny Allow from all Deny from env=bad_req </Location> SetEnvIfNoCase User-Agent "^Mozilla/4.0.*MyIE 3.01" bad_req
- Syn Flooding
'Hacking' 카테고리의 다른 글
"Apache Killer" a DDoS using the Range HTTP Header (0) | 2011.09.07 |
---|---|
SYN Flooding 공격이란? (1) | 2011.08.31 |
Penetration Testing for Web Applications (Part Three) (1) | 2011.08.31 |
Penetration Testing for Web Applications (Part Two) (0) | 2011.08.31 |
Penetration Testing for Web Applications (Part One) (0) | 2011.08.31 |