'DDOS 대응방법'에 해당되는 글 1건

  1. 2011.08.31 DDOS 대비 방법 by CEOinIRVINE 1

DDOS 대비 방법

Hacking 2011. 8. 31. 07:34

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 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
Posted by CEOinIRVINE
l