LLMNR(Link-Local Multicast Name Resolution,链路本地多播名称解析)协议是一种基于DNS包格式的协议。它可以将主机名解析为IPv4和IPv6的IP地址。这样用户就可以直接使用主机名访问特定的主机和服务,而不用记忆对应的IP地址。该协议被广泛使用在Windows Vista/7/8/10操作系统中。

该协议的工作机制很简单。例如,计算机A和计算机B同处一个局域网中。当计算机A请求主机B时,先以广播形式发送一个包含请求的主机名的UDP包。主机B收到该UDP包后,以单播形式发送UDP的响应包给主机A。由于整个过程中,都是以UDP方式进行,主机A根本不能确认响应主机B是否为该主机名对应的主机。这就造成欺骗的可能。

针对这个漏洞,Kali Linux提供了Responder工具。该工具不仅可以嗅探网络内所有的LLMNR包,获取各个主机的信息,还可以发起欺骗,诱骗发起请求的主机访问错误的主机。为了渗透方便,该工具还可以伪造HTTP/s、SMB、SQL Server、FTP、IMAP、POP3等多项服务,从而采用钓鱼的方式获取服务认证信息,如用户名和密码等。

In this article, we will show you how the default behaviour of Microsoft Window's name resolution services can be abused to steal authentication credentials.

If a windows client cannot resolve a hostname using DNS, it will use the Link-Local Multicast Name Resolution (LLMNR) protocol to ask neighbouring computers. LLMNR can be used to resolve both IPv4 and IPv6 addresses.

If this fails, NetBios Name Service (NBT-NS) will be used. NBT-NS is a similar protocol to LLMNR that serves the same purpose. The main difference between the two is NBT-NS works over IPv4 only.

On these occasions when LLMNR or NBT-NS are used to resolve a request, any host on the network who knows the IP of the host being asked about can reply. Even if a host replies to one of these requests with incorrect information, it will still be regarded as legitimate.

A number of attack tools have been developed which will reply to all of these queries in the hope of receiving sensitive information. Responder, developed by Trustwave SpiderLabs, is one of these tools that can answer LLMNR and NBT-NS queries giving its own IP address as the destination for any hostname requested.

Using Responder

To demonstrate the attack, we will be using Kali Linux to steal the credentials of a Windows 7 user. Kali has Responder pre-installed and can be found at the directory “/usr/share/responder/”.

By typing “responder –h” we can see a list of options available:

# responder -hOptions:   --version             show program's version number and exit   -h, --help            show this help message and exit   -A, --analyze         Analyze mode. This option allows you to see NBT-NS,                         BROWSER, LLMNR requests without responding.   -I eth0, --interface=eth0                         Network interface to use   -b, --basic           Return a Basic HTTP authentication. Default: NTLM   -r, --wredir          Enable answers for netbios wredir suffix queries.                         Answering to wredir will likely break stuff on the                         network. Default: False   -d, --NBTNSdomain     Enable answers for netbios domain suffix queries.                         Answering to domain suffixes will likely break stuff                         on the network. Default: False   -f, --fingerprint     This option allows you to fingerprint a host that                         issued an NBT-NS or LLMNR query.   -w, --wpad            Start the WPAD rogue proxy server. Default value is                         False   -u UPSTREAM_PROXY, --upstream-proxy=UPSTREAM_PROXY                         Upstream HTTP proxy used by the rogue WPAD Proxy for                         outgoing requests (format: host:port)   -F, --ForceWpadAuth   Force NTLM/Basic authentication on wpad.dat file                         retrieval. This may cause a login prompt. Default:                         False   --lm                  Force LM hashing downgrade for Windows XP/2003 and                         earlier. Default: False   -v, --verbose         Increase verbosity.

For our first demonstration, the only arguments we need to provide to Responder are the interface we wish to run it on:

# responder –I eth0


With this running, if a client now tries to resolve a name not in the DNS, our instance of Responder should poison the LLMNR and NBT-NS requests that are sent out.

Now on a Windows 7 machine, we will request a network resource that does not exist within our DNS. For this example, we will use the file explorer and request access to a network resource “\\fielshare”.


If a user accidentally typed this instead of a legitimate hostname in the DNS which could be “\\fileshare” Responder should say that its IP is the location of “fielshare”. The Windows 7 machine will then try to connect to “\\fielshare” using SMB which it believes is located on the Kali host. The SMB process will send the Windows 7 username and hashed password to the Kali host.
Above, you can see Responder has sent a poisoned answer to the LLMNR request sent by our Windows 7 machine for the name “fielshare”. The Windows 7 machine then tried to connect to our rogue SMB server, thinking it was the host “fielshare” and therefore provided their username and hashed password.

If we look at the packets, we can see each step of the process:

In packet number nine we can see the Windows 7 machine (192.168.1.101) sending a multicast query using the LLMNR protocol to resolve the name “fielshare”. Packet eleven shows the Kali machine (192.168.1.102) responding and saying fielshare can be found at 192.168.100.102, its own IP address.

Packet seventeen then shows the Windows 7 host sending a SMB connection request. From packets nineteen and twenty-one to twenty-nine you can see the SMB process. The Windows 7 host is supplying their credentials to the Kali host in packet twenty-three.

This type method of attack will only work if the hostname that the client wants to connect to cannot be resolved by DNS.

WPAD

A more reliable way to get usernames and password hashes is through the WPAD protocol. If a browser is configured to automatically detect proxy settings, then it will make use of WPAD protocol to try and locate and download the wpad.dat Proxy Auto-Config (PAC) file. A PAC file defines proxy servers that a web browser should use for different URLs.

The WPAD protocol works through attempting to resolve the hostname "wpad"through a series of name requests. Further information on why this can be a security issue can be found at https://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol#Security.

By default, Internet Explorer has WPAD enabled:


Google Chrome and Firefox are configured by default to use the systems settings for locating the PAC file:

Responder has support for poisoning WPAD requests and serving a valid wpad.dat PAC file.

For this second demonstration we use the following arguments for Responder:

# responder -I eth0 -wF

Now when a user on the local network uses Internet Explorer, the browser should fetch the wpad.dat file from Responder. Because we supplied the argument –F, Responder will also force the client to authenticate when they try to request the wpad.dat file. Sneaky, huh?

As our Responder attack is performed from the local network, Internet Explorer should recognise the service as being in the Intranet security zone and automatically provide the user’s credentials without any prompt from the user. Google Chrome will also automatically do this however Firefox prompts the user to manually enter their credentials, something to bear in mind if you are testing a network that has Firefox users.

Firefox does not automatically provide Windows credentials

If successful, the Responder output will look like below:

Here you can see Responder is answering the request from the Windows host for the name “wpad” with its own IP as the location. It has also logged that it has sent the WPAD file to the Windows 7 host at 192.168.100.101.

Again, Wireshark can be used to further analyse the process step by step:

The first highlighted section shows the LLMNR query for the host “wpad” being sent by the Windows 7 host and answered by the Kali host running Responder. The last highlighted section shows the Windows 7 host getting the wpad.dat file by providing their credentials to the Kali host.

On both of the above occasions, the captured hashes are output into the logs file of Responder (/usr/share/responder/logs).

In the above image, you can see we have captured hashes from both the SMB and HTTP example that was just shown. Since they contain the hashed password of the same user (user2) it doesn’t really matter which one we use.

I’m going to use the “SMB-NTLMv2-SSP-192.168.100.101.txt” file. For demonstration, the password cracker john is going to be used with the “rockyou.txt” wordlist. The following command will be used:

# john SMB-NTLMv2-SSP-192.168.100.101.txt –wordlist=/usr/share/wordlists/rockyou.txt

Since the password was in the wordlist, the password hash was cracked successfully.

In our experience of using this technique during penetration testing engagements, we have very often captured and cracked credentials for Domain Admin accounts, leading to rapid compromise of the entire Active Directory domain and its resources. One further reason why administrators should not use privileged accounts for non-administrative activities such as Internet browsing.

The Solution

To mitigate this attack from potentially happening in your local network domain, it is best to disable LLMNR and NBT-NS. Note that in the above attack scenarios, these protocols were only used when no DNS entries existed for the queries. Providing your DNS server resolves the names that need to be found in your network, the other protocols do not need running.

If your network environment includes computers running Windows versions 2000 and earlier, NBT-NS may need to stay enabled (see https://technet.microsoft.com/en-us/library/cc728457(v=ws.10).aspx). Mind you, if this is the case, you've got a whole load of other security considerations!

Disabling LLMNR

To disable LLMNR in your domain for DNS clients, open gpedit.msc.

Navigate to Computer Configuration->Administrative Templates->Network->DNS client.

Locate the option “Turn off multicast name resolution” and click “policy setting”:

Once the new window opens, enable this option, press Apply and click OK:

Disabling NBT-NS

One option for disabling NBT-NS is to use DHCP scope options.

If using Microsoft's DHCP server, select the scope that you want to disable NBT-NS for. Right click “Scope Options” and click “Configure Options”. In the example below, the DHCP scope in which I want to disable NBT-NS for is 192.168.1.100.

In the Scope Options window, navigate to the advanced tab, change the drop down window to “Microsoft Windows 2000 Options”:
Select the option “001 Microsoft Disable Netbios Option” from the list and change its value to “0x2”, click Apply and then OK:

WPAD

To mitigate against the WPAD attack, you can add an entry for "wpad" in your DNS zone. Note that the DNS entry does not need to point to a valid WPAD server. As long as the queries are resolved, the attack will be prevented.

转载于:https://www.cnblogs.com/skyus/p/8580266.html

LLMNR欺骗工具Responder相关推荐

  1. 嗅探/欺骗工具 Responder

    responder 这个工具首先是一个LLMNR和NBT-NS响应者,它将根据它们的名字后缀来回答特定的NBT-NS(NetBIOS名称服务)查询 .默认情况下,该工具只会回答针对SMB的文件服务器服 ...

  2. 网络欺骗工具Ettercap大学霸IT达人

    网络欺骗工具Ettercap大学霸IT达人 Ettercap是一个基于中间人攻击方式的网络嗅探工具,主要适用于交换局域网络.借助于Ettercap嗅探功能,管理员可以检测网络内明文数据通讯的安全性,即 ...

  3. ARP欺骗工具arpspoof的用法

    ARP欺骗工具arpspoof的用法 ARP工具 ARP断网攻击 ARP欺骗 ARP工具 arpspoof 是一款进行arp欺骗的工具,攻击者可以通过它来毒化受害者arp缓存,将网关mac替换为攻击者 ...

  4. 局域网arp攻击_python制作ARP欺骗工具

    前面给大家做一些扫描工具,今天小菜给大家带来了ARP欺骗工具.当然啦,工具实现起来也是几行代码呢!(是不是依旧如此简单).这个可以让目标器断网,还可以把数据包转到自己机器上,自己机器开启转发数据包功能 ...

  5. 关于fi dd ler 手机抓包 网卡地址地址_网络抓包的高级手段:ARP欺骗工具的应用...

    网络数据包的捕获有时会遇到条件不具备的情况,就会人为利用一些手段来创造抓包环境,来完成"尴尬"局面下的数据抓取.这里我们介绍一款ARP欺骗工具-Cain&Abel. 主界面 ...

  6. 遭遇auto.exe,Hack.ArpCheater.a(ARP欺骗工具),Trojan.PSW.ZhengTu等2

    遭遇auto.exe,Hack.ArpCheater.a(ARP欺骗工具),Trojan.PSW.ZhengTu等2 endurer 原创 2007-07-24 第1版 很奇怪,今天中午在一位网友的电 ...

  7. 遭遇auto.exe,Hack.ArpCheater.a(ARP欺骗工具),Trojan.PSW.ZhengTu等1

    遭遇auto.exe,Hack.ArpCheater.a(ARP欺骗工具),Trojan.PSW.ZhengTu等1 endurer 原创 2007-07-23 第1版 一位网友说他的电脑昨晚使用时出 ...

  8. kali不能使用arpspoof命令_kali不能使用arpspoof命令_ARP欺骗工具arpspoof的用法

    arpspoof是一个好用的ARP欺骗工具,Kali linux中自带了该工具,在ubuntu中,安装它只需运行命令: sudo apt-get install dsniff 安装完成后,输入命令:m ...

  9. Responder 嗅探/欺骗工具

    responder 这个工具首先是一个LLMNR和NBT-NS响应者,它将根据它们的名字后缀来回答特定的NBT-NS(NetBIOS名称服务)查询 .默认情况下,该工具只会回答针对SMB的文件服务器服 ...

最新文章

  1. 一道有意思的阶乘计算题
  2. python计算四元素组合算法_python – 算法,列表元素之间的最近点
  3. SAP WM 有无保存WM Level历史库存的Table?
  4. python 类函数 成员函数_python中的类函数、静态函数、成员函数以及类变量、成员变量...
  5. 新建文件注释_PDF汇总注释原来如此简单
  6. pythonpil库过滤图像contour_一秒钟带你走进P图世界-----(python)PIL库的使用
  7. Javascript、Dom、JQuery
  8. 【2016年第1期】农业大数据研究生培养模式探索
  9. imei 物联卡_物联卡设备信息判重(DoIotIsImeiExist)
  10. EXCEL-VBA函数:公历转农历,返回格式YYYY-MM-DD
  11. 第四届中国金融风云榜9月在深圳盛大揭晓
  12. 什么是知识库管理系统?如何搭建企业知识库系统?
  13. 整数幂C语言1005,zzuli1005: 整数幂 - 菜鸟头头
  14. 含泪整理最优质花朵 鲜花 花卉VRay材质球素材,你想要的这里都有
  15. 欧文分校的计算机科学博士,加州大学欧文分校
  16. 信息系统项目管理师 第三章-项目立项管理
  17. 工作站 显卡 测试软件,绝对专业!14块工作站显卡测试(图)
  18. 使用 GPG 为极狐GitLab git commit 签名
  19. 【原创】【I2C】I2C介绍
  20. Linux 挂载4T硬盘到根目录

热门文章

  1. 由 lc1373 总结二叉树题目的做法
  2. R语言作图:散点图矩阵
  3. 2012年第三届c b组省赛蓝桥杯
  4. 【论文学习】行人检测——CVPR:通过MIMS在低分辨率图像中做行人检测
  5. android中的标签,如何在Android中使用标签
  6. springboot log4j2.xml读取application.yml中的属性值
  7. pycharm配置crypto环境
  8. 01背包问题、完全背包、多重背包、恰好装满
  9. Fluentd语法速记
  10. 19_ue4进阶末日生存游戏开发[关联UI和数据]