代理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/

LOCVPS(29.6元/月)KVM架构 香港/美国机房全场8折

LOCVPS商家我们还是比较熟悉的老牌的国内服务商,包括他们还有其他的产品品牌。这不看到商家的信息,有新增KVM架构轻量/迷你套餐,提供的机房包括香港云地和美国洛杉矶,适用全场8折优惠,月付29.6元起。LOCVPS是一家成立于2011年的稳定老牌国人商家,主要从事XEN、KVM架构的国外VPS销售,主推洛杉矶MC、洛杉矶C3、香港邦联、香港沙田电信、香港大埔、日本东京、日本大阪、新加坡等数据中心...

webhosting24:€28/年,日本NVMe3900X+Webvps

webhosting24决定从7月1日开始对日本机房的VPS进行NVMe和流量大升级,几乎是翻倍了硬盘和流量,当然前提是价格依旧不变。目前来看,国内过去走的是NTT直连,服务器托管机房应该是CDN77*(也就是datapacket.com),加上高性能平台(AMD Ryzen 9 3900X+NVMe),这样的日本VPS还是有相当大的性价比的。官方网站:https://www.webhosting...

欧路云(22元/月),美国CERA弹性云服务器!香港弹性云服务器15元/月起;加拿大高防vps仅23元/月起

欧路云怎么样?欧路云主要运行弹性云服务器,可自由定制配置,可选加拿大的480G超高防系列,也可以选择美国(200G高防)系列,也有速度直逼内地的香港CN2系列。所有配置都可以在下单的时候自行根据项目 需求来定制自由升级降级 (降级按天数配置费用 退款回预存款)。2021年7月14日美国 CERA 弹性云服务器 上新 联通CUVIP 线路!8折特惠中!点击进入:欧路云官方网站地址付款方式:PayPa...

ddos攻击工具为你推荐
域名空间注册免费空间域名注册?注册域名怎么注册域名美国虚拟主机最好的美国虚拟主机在哪里找啊。。国际域名国际域名和国内域名有什么不同,什么叫顶级域名?企业虚拟主机企业虚拟主机和个人虚拟主机选择有差别吗?租服务器租个服务器?哪里租?注册国际域名哪里的国际域名注册便宜?网站空间域名什么是网站域名和网站空间虚拟空间哪个好虚拟主机哪家的最好?免费网站空间申请哪里有免费申请空间的(网页制作)
n点虚拟主机管理系统 亚洲大于500m sharktech hawkhost优惠码 godaddy续费优惠码 wdcp 网站保姆 网通ip 免费mysql 架设服务器 vip购优惠 hkt 网游服务器 申请网页 双线机房 创建邮箱 空间首页登陆 移动服务器托管 便宜空间 湖南idc 更多