zoukankan      html  css  js  c++  java
  • 20165218 《网络对抗技术》Exp7 网络欺诈防范

    Exp7 网络欺诈防范

    基础问题回答

    通常在什么场景下容易受到DNS spoof攻击

    公共网络下或者同一局域网内;

    在日常生活工作中如何防范以上两攻击方法
    • 钓鱼网站
      • 查验可信第三方
      • 核对网站域名
      • 查询网站备案
      • 查看安全证书
    • DNS欺骗
      • DNS欺骗攻击是很难防御的,因为这种攻击大多数本质都是被动的。通常情况下,除非发生欺骗攻击,否则你不可能知道你的DNS已经被欺骗,只是你打开的网页与你想要看到的网页有所不同。
      • 使用最新版本的DNS服务器软件,并及时安装补丁;
      • 关闭DNS服务器的递归功能。DNS服务器利用缓存中的记录信息回答查询请求或是DNS服务器通过查询其他服务获得查询信息并将它发送给客户机,这两种查询成为递归查询,这种查询方式容易导致DNS欺骗。
      • 不要依赖DNS:不要在高度敏感和保密要求高的系统上浏览网页,最好不要使用DNS。如果有软件依赖于主机名来运行,那么可以在设备主机文件里手动指定。
      • 使用入侵检测系统:只要正确部署和配置,使用入侵检测系统就可以检测出大部分形式的ARP缓存中毒攻击和DNS欺骗攻击。

    实践过程记录

    一、简单应用SET工具建立冒名网站
    • 由于要将钓鱼网站挂在本机的http服务下,所以需要将SET工具的访问端口改为默认的80端口。 使用sudo vi /etc/apache2/ports.conf命令修改Apache的端口文件,将端口改为80

    • netstat -tupln | grep 80,查看是否有进程占用80端口,如果有,用kill [进程号]杀死该进程(如图则没有占用)

    • apachectl start,开启Apache服务

    • setoolkit,打开set工具(第一次使用会提示同意xxx条款)

    • 选择1) Socail-Engineering Attacks进行社会工程学攻击

    • 选择 2) Website Attack Vectors ,网站攻击向量

    这里可以看到几种攻击方式的介绍

    The Web Attack module is a unique way of utilizing multiple web-based attacks in order to compromise the intended victim.
    Web攻击模块是一种利用多种基于Web的攻击以危害目标受害者的独特方式。

    The Java Applet Attack method will spoof a Java Certificate and deliver a metasploit based payload. Uses a customized java applet created by Thomas Werth to deliver the payload.
    Java Applet Attack方法将欺骗Java证书并提供基于metasploit的有效负载。使用由Thomas Werth创建的自定义Java小程序来提供有效负载。

    The Metasploit Browser Exploit method will utilize select Metasploit browser exploits through an iframe and deliver a Metasploit payload.
    Metasploit Browser Exploit方法将通过iframe利用选择的Metasploit浏览器漏洞并提供Metasploit有效负载。

    The Credential Harvester method will utilize web cloning of a web- site that has a username and password field and harvest all the information posted to the website.

    Credential Harvester方法将利用具有用户名和密码字段的网站的网络克隆,并收集发布到网站的所有信息。

    The TabNabbing method will wait for a user to move to a different tab, then refresh the page to something different.
    TabNabbing方法将等待用户移动到不同的选项卡,然后将页面刷新为不同的页面。

    The Web-Jacking Attack method was introduced by white_sheep, emgent. This method utilizes iframe replacements to make the highlighted URL link to appear legitimate however when clicked a window pops up then is replaced with the malicious link. You can edit the link replacement settings in the set_config if its too slow/fast.
    Web-Jacking Attack方法由white_sheep,emgent引入。此方法利用iframe替换使突出显示的URL链接显得合法,但是当单击时弹出一个窗口然后被恶意链接替换。如果set_config太慢/太快,您可以编辑set_config中的链接替换设置。

    The Multi-Attack method will add a combination of attacks through the web attack menu. For example you can utilize the Java Applet, Metasploit Browser, Credential Harvester/Tabnabbing all at once to see which is successful.
    Multi-Attack方法将通过Web攻击菜单添加攻击组合。例如,您可以同时使用Java Applet,Metasploit浏览器,Credential Harvester / Tabnabbing来查看哪个成功。

    The HTA Attack method will allow you to clone a site and perform powershell injection through HTA files which can be used for Windows-based powershell exploitation through the browser.
    HTA Attack方法允许您克隆站点并通过HTA文件执行powershell注入,这些文件可用于通过浏览器进行基于Windows的PowerShell攻击。

    • 选择3) Credential Harvester Attack Method登录密码截取攻击

    • 选择2) Site Cloner克隆网站

    • 输入攻击方(kali)IP地址

    • 输入被克隆的url(统一资源定位符)

    在询问Press {return} if you understand what we're saying here.后直接回车

    [*] The Social-Engineer Toolkit Credential Harvester Attack
    [*] Credential Harvester is running on port 80
    [*] Information will be displayed to you as it arrives below:
    [*] Looks like the web_server can't bind to 80. Are you running Apache or NGINX?
    Do you want to attempt to disable Apache? [y/n]: y
    

    系统提示web_server无法绑定到80端口,询问是否禁用Apache,选择y(是),回车

    提示“收割机”已经准备就绪,可以让受害主机访问网站

    • 靶机访问kali的url

    • 靶机输入用户名密码(不一定正确)登录,Kali已经抓取到了

    其实有点奇怪,既然harvester需要80端口,为什么学姐们的博客里讲的一开始还要把Apache打开占用端口80,最后再禁用,试了一下不开直接做也是可以的@-@


    二、ettercap DNS spoof
    • 将网卡改为混杂模式,ifconfig eth0 promisc

    • 使用ip route show或者netstat -r查看网关ip

    • 修改DNS缓存表,vi /etc/ettercap/etter.dns,添加几条,其中ip是攻击机(kali)的地址

    • ettercap -G,开启ettercap

    • 工具栏Sniff->unified sniffing,在弹出对话框中选择eth0,监听eth0网卡

    • 工具栏Hosts->Scan for hosts,扫描主机,可以看到此时子网内有四个主机

    • Hosts->Host list,将kali网关IP添加到Target 1,靶机IP添加到Target 2

    • Plugins->Manage the plugins,双击dns_spoof

    • Start->Start sniffing,开始嗅探

    • 靶机ping刚刚添加到dns缓存表上的两条网址,发现连接的都是kali的IP

    ettercap也成功捕获访问记录


    三、结合应用两种技术,用DNS spoof引导特定访问到冒名网站

    用(一)中步骤复制登录界面,用(二)中步骤进行DNS欺骗

    graph LR
    虚假登录界面-->10.1.1.178; 10.1.1.178-->www.helloworld.com;
    


    实验心得体会

    又学习了一种网络攻击的方法……看来外面的公共WiFi是真的不能随便连0-0


    参考资料

    [1] 如何在Debian 9上设置Apache虚拟主机
    [2] ettercap局域网内DNS欺骗(隔壁的哥们轻一点 ...)
    [3] Linux下查看网关方法:

  • 相关阅读:
    w3c盒子模型与ie盒子模型
    前端入门
    连接数据库好用工具
    前端开发工具
    刚发现的取色工具
    使用val()另一个妙用------选中select/checkbox/radio的值
    z-index的妙用
    react生命周期函数
    react中虚拟dom的diff算法
    React中的虚拟DOM
  • 原文地址:https://www.cnblogs.com/zicerain/p/10809242.html
Copyright © 2011-2022 走看看