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

RAKsmart推出7.59美元/月,云服务器产品Cloud Server,KVM架构1核1G内存40G硬盘1M带宽基础配置

近期RAKsmart上线云服务器Cloud Server产品,KVM架构1核1G内存40G硬盘1M带宽基础配置7.59美元/月!RAKsmart云服务器Cloud Server位于美国硅谷机房,下单可选DIY各项配置,VPC网络/经典网络,大陆优化/精品网线路,1-1000Mbps带宽,支持Linux或者Windows操作系统,提供Snap和Backup。RAKsmart机房是一家成立于2012年...

VoLLcloud(月付低至2.8刀)香港vps大带宽,三网直连

VoLLcloud LLC是一家成立于2020年12月互联网服务提供商企业,于2021年1月份投入云计算应用服务,为广大用户群体提供云服务平台,已经多个数据中心部署云计算中心,其中包括亚洲、美国、欧洲等地区,拥有自己的研发和技术服务团队。现七夕将至,VoLLcloud LLC 推出亚洲地区(香港)所有产品7折优惠,该产品为CMI线路,去程三网163,回程三网CMI线路,默认赠送 2G DDoS/C...

舍利云30元/月起;美国CERA云服务器,原生ip,低至28元/月起

目前舍利云服务器的主要特色是适合seo和建站,性价比方面非常不错,舍利云的产品以BGP线路速度优质稳定而著称,对于产品的线路和带宽有着极其严格的讲究,这主要表现在其对母鸡的超售有严格的管控,与此同时舍利云也尽心尽力为用户提供完美服务。目前,香港cn2云服务器,5M/10M带宽,价格低至30元/月,可试用1天;;美国cera云服务器,原生ip,低至28元/月起。一、香港CN2云服务器香港CN2精品线...

ddos攻击工具为你推荐
海外主机租用国外服务器租用有几十块钱一年的么免费注册域名怎么注册免费域名?已备案域名查询如何查询已备案域名是不是万网/阿里云接入的备案海外主机美国主机哪个好,最好是速度和稳定性能跟得上?免费虚拟主机申请永久免费虚拟主机查询ip怎么查询IP地址me域名me域名怎么样?php虚拟空间php虚拟主机空间如何连接mysql免费网站空间哪里有永久免费的网站空间?美国网站空间我想买个国外的网站空间,那家好,懂的用过的来说说
便宜虚拟主机 万网域名 什么是域名解析 万网域名证书查询 七牛优惠码 bluehost 香港主机 59.99美元 payoneer 宕机监控 gateone windows2003iso 免费ddos防火墙 mysql主机 申请个人网页 个人域名 qq云端 最漂亮的qq空间 电信网络测速器 石家庄服务器托管 更多