ettercap + driftnet achieve deception under the same network segment traffic

Preface:

  Since the LAN, the gateway will continue to send ARP packets to ask whether there is currently a new client on the line, if we can fool the current LAN segments hosts under,

  Us as a gateway address , and we deceive traffic forwarded to the real gateway address , so that we can sniff to other people's information

 

lab environment:

  1, the virtual machine A (kali)

  2, the experimental host B (win 10)

  3, to ensure that virtual machines and hosts in the same network segment , there is a method to write on

 

Experimental Procedure:

  1, kali in use netdiscover -i eth0 [-r range ...] to obtain the IP address of the target host, the direct use of IP and gateway host B's here

  2, kali terminal uses ettercap -i eth0 -Tq -M arp: remote /// /// to deceive the flow front of a /// B of the IP , which is the gateway

NOTE: /// wording is complete the MAC / IPs / the IPv6 / the PORTs , all default, the MAC address as a physical, IPs as IPv4, PORTs for the port number

  If ettercap operation fails, we need to be put right

  修改 /etc/ettercap/etter.conf 文件,将 ec_uidec_gid 的值改为 0,可以使用  leafpad、vim 等进行操作

 

  3、打开一个新的终端,通过 driftnet -i eth0 -a -d dir 来把 B(目标主机)浏览的图片保存在目录 dir 里,也可以通过 -b 弹窗直接查看浏览的图片

 

  4、打开主机 B 的浏览器查看图片(需要 http 的)

 

  5、在 kali 里打开相应文件夹,查看里面的内容

 

扩展: 

  1、netdiscover

    a、基于 ARP 协议

    b、主动被动地发现WIFI或交换网络的主机

    c、常用参数选项:

      -i :接口。选择你监控的接口,比如eth0

      -r :range 比如192.168.0.0/24(/24 表示网络号为 24 位)

      -l :从文件读取range列表

      -p :被动模式

      -t :每个ARP请求之间等待时长,单位为毫秒。这个可以用来规避检测系统的告警

      -c :对每个IP发多少个探针

      -P :输出形式更适合重定向到一个文件中。

注:具体可以使用 man netdiscovernetdiscover -h 来查询详细操作

  ARP 协议是将 IP 地址转换为 MAC 地址(物理地址)地网络协议

  局域网中主机的通讯是通过 MAC 地址来实现的,区分 IPv4 里的网络号和主机号

 

  2、ettercap [OPTIONS] [TARGET1] [TARGET2]:

    a、两种运行方式:UNIFIED 方式是以中间人方式嗅探;BRIDGED 方式是在双网卡情况下,嗅探两块网卡之间的数据包

    b、常用参数:

      -i :指定接口

      -T :文本模式,常配合 -q 安静模式使用,-s 表示加载脚本

      -M :指定中间人模式

        ·ARP 欺骗:arp:remote(双向)、arp:oneway(单向,欺骗目标一到目标二的通讯)

        ·ICMP 欺骗:icmp:(MAC/IP)

        ·DHCP 欺骗:dhcp:(ip_pool/netmask/dns)

      如:-M dhcp:/255.255.255.0/192.168.0.1 不提供 IP 地址,只欺骗目标子网掩码和 DNS 服务器

    c、常见参数组合:

      ARP 毒化 eth0 所在的网段,安静模式文本显示:ettercap -Tqi eth0 -M ARP /// ///

      对 192.168.1.120 进行 DNS 欺骗,使用默认网卡 eth0,文本模式安静显示:ettercap -Tq -P dns_spoof -M arp:remote /192.168.1.120// ///

 

  3、driftnet [options] [filter code]:

    a、driftnet 是一款使用简单的图片捕获工具,可以很方便的在网络数据包中抓取图片

    b、参数命令:

      -b :捕获到新的图片时发出嘟嘟声

      -i :选择监听接口

      -f:读取一个指定 pcap 数据包中的图片

      -p :不让所监听的接口使用混杂模式

      -a :后台模式,将捕获的图片保存到目录中(不会显示在屏幕上)

      -m :指定保存图片数的数目

      -d :指定保存图片的路径(目录)

      -x:指定保存图片的前缀名

Guess you like

Origin www.cnblogs.com/lemonyam/p/10957978.html