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

LightNode($7.71/月)香港cn2精品线路

LightNode官网LightNode是一家位于香港的VPS服务商.提供基于KVM虚拟化技术的VPS.在提供全球常见节点的同时,还具备东南亚地区、中国香港等边缘节点.满足开发者建站,游戏应用,外贸电商等应用场景的需求。为用户带来高性能服务器以及优质的服务的同时还提供丰厚的促销活动,新用户注册最高送$20。注册用户带新客即可得10%返佣。商家支持PayPal,支付宝等支付方式。官网:https:/...

PIGYUN:美国联通CUVIPCUVIP限时cuvip、AS9929、GIA/韩国CN2机房限时六折

pigyun怎么样?PIGYunData成立于2019年,2021是PIGYun为用户提供稳定服务的第三年,目前商家提供香港CN2线路、韩国cn2线路、美西CUVIP-9929、GIA等线路优质VPS,基于KVM虚拟架构,商家采用魔方云平台,所有的配置都可以弹性选择,目前商家推出了七月优惠,韩国和美国所有线路都有相应的促销,六折至八折,性价比不错。点击进入:PIGYun官方网站地址PIGYUN优惠...

Webhosting24:$1.48/月起,日本东京NTT直连/AMD Ryzen 高性能VPS/美国洛杉矶5950X平台大流量VPS/1Gbps端口/

Webhosting24宣布自7月1日起开始对日本机房的VPS进行NVMe和流量大升级,几乎是翻倍了硬盘和流量,价格依旧不变。目前来看,日本VPS国内过去走的是NTT直连,服务器托管机房应该是CDN77*(也就是datapacket.com),加上高性能平台(AMD Ryzen 9 3900X+NVMe),还是有相当大的性价比的。此外在6月30日,又新增了洛杉矶机房,CPU为AMD Ryzen 9...

ddos攻击工具为你推荐
云服务器租用云服务器租用费用是多少北京网站空间网站空间哪里的好,韩国虚拟主机大家用的虚拟主机是国内的还是香港的还是韩国的还是美国的虚拟主机软件哪种虚拟机软件好用1g虚拟主机打算买个1G的虚拟主机,用来做什么好?天津虚拟主机天津有代理店掌柜的公司吗?在哪?西安虚拟主机西部数码虚拟主机怎么样,西部数码云主机怎么样虚拟主机提供商找个比较好的虚拟主机提供商域名邮箱哪个免费域名邮箱最好域名网怎样申请域名网站?
企业域名备案 便宜服务器 BWH 68.168.16.150 天猫双十一抢红包 服务器怎么绑定域名 2017年万圣节 赞助 adroit 网络空间租赁 太原网通测速平台 web服务器安全 便宜空间 日本代理ip 国内空间 留言板 neobux 大容量存储方案 服务器监测软件 更多