代理DDoS攻防战(二):CC攻击工具实现与防御理论 _118

ddos攻击工具  时间:2021-01-09  阅读:()

我们将要实现一个进行应用层DDoS攻击的工具综合考虑 CC攻击方式是最佳选择并用bash shell脚本来快速实现并验证这一工具并在最后讨论如何防御来自应用层的DDoS攻击。

第一步获取大量可用代理ip:port列表

网上所处可见免费代理我们使用http的GET方法抓取html文档接着使用正则过滤出我们需要的ip port对然后逐一验证各代理的可用性最终得到可用的代理ip port对。

C

1 grab_proxy.sh

2 #!/bin/bash

3

4 #get proxy l ist

5 declare proxyListFi le="proxy.txt"

6 declaretmpFi le=`mktemp`

7 declareurl

8 declarel ine

9 declaretimes

10 declareip

11 declare port

12 declare i

13 declarej

14 declare mod

15

16 function quit() {

17 rm-f$tmpFi le

18 exit "$1"

19}

20

21 echo"get proxy l ist. . .please wait. .."

22

23 if[ -r "$proxyListFi le" ]

24then

25 rm-f$proxyListFi le

26 fi

27

28 touch$proxyListFi le

29

30 forurl in " http://www.youdai l i .cn/Dai l i/guonei/2215.html "\

32 " http://www.youdai l i .cn/Dai l i/guonei/2215_3.html"\

33 " http://www.youdai l i .cn/Dai l i/guonei/2215_4.html "

34 do

35 if GET"$url">$tmpFi le

36 then

37 grep-oE '^.*<br/>.*$' "$tmpFi le" |grep-Eo"([0-9]+) (\. [0-9]+){3}:([0-9]+)"\

38 | sort -n | uniq | awk-F: '{printf("%-15s%s\n",$1,$2); }'>>$proxyListFi le

39 else

40 exec1>&2

41 echo"error:get proxyl istfai l ! chechthe url :$urlorthe network"

42 quit1

43 fi

44 done

45

46 echo"done. total `cat$proxyListFi le |wc-l`proxy"

47

48 quit0

49#exit

参数declare proxyListFile=” proxy. txt” ?#抓取到的代理ip port对所存放的文件路径

C

1 check_proxy.sh

2 #!/bin/bash

3

4 #get proxy l ist

5 declarecheck_threads=10

6 declarel ine

7 declaretimes

8 declareip

9 declare port

10 declare i

11 declarej

12 declare mod

13

14 function quit() {

15 exit "$1"

16}

17

18#echo"start check proxy'sfunctional ity. . ."

19

20#retargetthe inputfi leto stdin

21 if[ "$#" -gt "0" ]

22then

23 exec0<$1

24 else

25 exec1>&2

26 echo"usage:bash$0 proxyListFi le.txt"

27 echo"error:musthaveone inputarg"

28 quit1

29 fi

30

31#check proxy'sfunctional ity

32times=0

33whi lereadl ine

34 do

35 times=$((times+1) )

36 j=0

37 for i in`echo$l ine | tr ' ' '\n' |grep-E'^[^\s].*$'`38 do

39 j=$((j+1) )

40 if[ "$j" -eq1 ]

41 then

42 ip=$i

43 else

44 port=$i

45 fi

46 done

47 #echo"times=$timesip=$ip port=$port"

48 #start test

49 if GET-t 5-p"http://$ip:$port" "http://baidu.com"&>/dev/nul l

50 then

51 echo"$ip$port"

52 echo":) ip=$ip port=$port "&>/dev/nul l

53 else

54 echo"inval id ip=$ip port=$port :please check ip:host or network"&>/proc/self/fd/2

55 fi&

56 mod=$((times%check_threads) )

57 if [ "$mod" -eq"0" ]

58 then

59 wait

60 fi

61 done

62

63#closethefdof inputfi le

64 exec 0>&-

65 quit0

66#exit

参数declare check_threads=10#验证代理可用性时的并发数看一下代码就会发现我们使用的是GET?http://baidu.com方法所以并发数请不要也太高: )除非你的目标就是……

总结应征入伍的士兵共计600人经过考核的共计449人如果你还想招募更多的士兵奉劝一句苦海无边 回头是岸。

第二步吹响战争号角

笔者在一台VPS上建立了一个薄弱的靶机各位读者请不要太暴力测试一下就可以了地址?http://eecs.cc:8080/

搬瓦工(季付46.7美元)新增荷兰(联通线路)VPS,2.5-10Gbps

搬瓦工最近新增了荷兰机房中国联通(AS9929、AS4837)线路的VPS产品,选项为NL - China Unicom Amsterdam(ENUL_9),与日本软银和洛杉矶(DC06)CN2 GIA配置一致可以互换,属于高端系列,2.5Gbps-10Gbps大带宽,最低季付46.7美元起。搬瓦工VPS隶属于老牌IT7公司旗下,主要提供基于KVM架构VPS主机,数据中心包括美国洛杉矶、凤凰城、纽...

[6.18]IMIDC:香港/台湾服务器月付30美元起,日本/俄罗斯服务器月付49美元起

IMIDC发布了6.18大促销活动,针对香港、台湾、日本和莫斯科独立服务器提供特别优惠价格最低月付30美元起。IMIDC名为彩虹数据(Rainbow Cloud),是一家香港本土运营商,全线产品自营,自有IP网络资源等,提供的产品包括VPS主机、独立服务器、站群独立服务器等,数据中心区域包括香港、日本、台湾、美国和南非等地机房,CN2网络直连到中国大陆。香港服务器   $39/...

Sparkedhost($8/月)美国迈阿密AMD Ryzen高性能VPS;免费100G高防

sparkedhost怎么样?sparkedhost主机。Sparkedhost于2017年7月注册在美国康涅狄格州,2018年收购了ClynexHost,2019年8月从Taltum Solutions SL收购了The Beast Hosting,同年10月从Reilly Bauer收购了OptNode Hosting。sparkedhost当前的业务主要为:为游戏“我的世界”提供服务器、虚拟...

ddos攻击工具为你推荐
虚拟主机推荐谁能推荐个性价比高的虚拟主机?域名主机什么是域名主机海外域名外贸网站如何选择合适的海外域名?虚拟主机管理系统我也想和你学虚拟主机管理系统的操作大连虚拟主机大连华企智源是做网站的吗?美国虚拟主机购买美国虚拟主机在国内那家卖的便宜,稳定,功能全??河南虚拟主机新网的虚拟主机怎么样?中文域名中文域名是怎么回事?域名批量查询有好米域名批量查询好用吗?域名抢注域名抢注是什么意思啊?
海外域名 虚拟主机试用30天 5折 fastdomain 美国主机网 wdcp 光棍节日志 双11抢红包攻略 godaddy 12306抢票助手 typecho 云图标 上海域名 静态空间 免费美国空间 ca187 cxz 西安主机 域名和主机 重庆服务器 更多