软件攻击测试的原理是什么,软件安全测试·dos·http慢速攻击.docx

DoS测试·HTTP慢速攻击

一、攻击原理

本攻击测试方式依赖于HTTP协议的设计机制——HTTP要求服务器在处理完毕后才能完全接收到该请求,如果HTTP请求未完成,或者传输速率非常低(比如要传输1024K的数据,发送的每个数据包值仅传递1个字符,3秒发送一个),服务器将保持其资源正常等待其余的数据。 如果服务器资源占用太多,这会造成拒绝服务(DoS)。

此种攻击方式不会造成异常的数据流量,比较隐蔽,不过可以通过检查http连接的数据传送速度进行甄别。

Slowloris and Slow HTTP POST DoS attacks rely on the fact that the HTTP protocol, by design, requires requests to be completely received by the server before they are processed. If an HTTP request is not complete, or if the transfer rate is very low, the server keeps its resources busy waiting for the rest of the data. If the server keeps too many resources busy, this creates a denial of service.

二、测试用例设计

测试用例编号

SEC_WEB_ DoS_01

测试用例名称

HTTP慢速DoS攻击测试

测试目的

DoS攻击危害大,可导致正常的用户无法访问web应用(服务器拒绝提供服务),攻击方式多样,此处采用相对隐蔽的HTTP慢速攻击方式进行攻击。

测试用例级别

基本

设计者

评审者

测试条件

Web应用(站点)可正常访问;

测试机(Linux)上部署了slowhttptest工具。

wget /files/slowhttptest-1.5.tar.gz && tar -vxf slowhttptest-1.5.tar.gz && cd slowhttptest-1.5/ && ./configure && make && make install

测试步骤

在终端启动slowhttptest工具,;

使用http连接数1000尝试攻击;

slowhttptest -c 1000 -H -g -o slowhttp -i 10 -r 200 -t GET -u :8888/PageView.jsp -x 24 -p 3

观察输出结果。

预期结果

测试期间Web应用仍可正常访问。

备注

如果web应用可用,可增大http连接数继续尝试,比如每次递增1000。

测试结果

三、测试用例执行结果

测试用例编号

SEC_WEB_ DoS_01

测试用例名称

HTTP慢速DoS攻击测试

测试目的

DoS攻击危害大,可导致正常的用户无法访问web应用(服务器拒绝提供服务),攻击方式多样,此处采用相对隐蔽的HTTP慢速攻击方式进行攻击。

测试用例级别

基本

测试条件

Web应用可正常访问;

测试机上部署了slowhttptest工具。

测试步骤

在终端启动slowhttptest工具,;

使用http连接数1000尝试攻击;

slowhttptest -c 1000 -H -g -o slowhttp -i 10 -r 200 -t GET -u :8888/PageView.jsp -x 24 -p 3

观察输出结果。

预期结果

测试期间Web应用仍可正常访问

备注

如果web应用可用,可增大http连接数继续尝试,比如每次递增1000。

测试结果

被测系统瞬间拒绝服务,且攻击测试期间被测系统无法自动恢复。

附:slowhttptest工具使用介绍

1. 官方示例

Use 1000 connections?(-c 1000)?with the Slowloris mode?(-H), and generate statistics?(-g>?with the output file name?(-o slowhttp). Use 10 seconds to wait for data?(-i 10), 200 connections?(-r 200)?with GET requests?(-t GET)?against the target URL?(-u 02/index.php)?with a maximum of length of 24 bytes?(-x 24)?and a 3 second time out?(-p 3):

root@tcf:~# slowhttptest

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值