Abstract
MITRE ATT&CK™
[https://attack.mitre.org/] “is a globally-accessible cognition base of adversary tactics and techniques based on real-world observations” which recommends the Conveigh honeypot [https://github.com/Kevin-Robertson/Conveigh] for detection of the LLMNR/NBT-NS Poisoning and Relay (T1171) [https://attack.mitre.org/techniques/T1171/] attack. This kind of attack is presently 1 of the most popular attack on Windows networks. nevertheless most honeypots utilized for detecting it can be easy bypassed by detecting the honeypot itself.
Outsmarting the smart a.k.a. honeypot detection
When you deploy a honeypot 1 of the most crucial things is to not uncover to everyone in the vicinity that this is actually a honeypot.
Honeypot Conveigh approach is simple, it sends random LLMNR and NBNS requests at random intervals. If individual in the network responds to these random requests, then it is most likely an attacker who wants to spoof specified request, what leads to MITM attack.
In case of Windows strategy a NBNS (NBT-NS, NetBIOS Name Service) query is sent utilizing broadcast address based on your network settings, including mask, so for 192.168.1.0/24 it is 192.168.1.255.
However this honeypot is sending each NBNS query always to 255.255.255.255 [https://github.com/Kevin-Robertson/Conveigh/blob/master/Conveigh.ps1#L295]
> New-Object System.Net.IPEndpoint([IPAddress]::broadcast,137)
AddressFamily Address Port
------------- ------- ----
InterNetwork 255.255.255.255 137
Windows is never sending NBNS queries on that peculiar broadcast address (it means “this network”). You can detect Conveigh honeypot by simply utilizing the following Wireshark display filter nbns && ip.dst == 255.255.255.255.
Another problem is that Conveigh is sending another queries, erstwhile with LLMNR, the another time with NBNS, erstwhile in reality Windows is querying both protocols utilizing the same name and at the same time. If 1 of these protocols will be disabled then Windows will always send a query utilizing only the enabled 1 – it means that actually there can never be specified situation like for example Windows is querying any name with LLMNR only, and then after 5 minutes is querying another name with NBNS only etc, but this is how Conveigh actually works.
NBNS is utilizing broadcast on port 137/udp, LLMNR is utilizing multicast IP address 224.0.0.252 on port 5355/udp. delight note that there is besides a 3rd protocol – mDNS, which is utilizing multicast IP address 224.0.0.251 port 5353/udp, but we will not focus on it as this blog post is about a circumstantial honeypot related to LLMNR and NBNS.
Additional problem arises due to Conveigh’ creation of random looking hostnames in LLMNR/NBNS queries, which are actually random strings between 5 and 10 characters [https://github.com/Kevin-Robertson/Conveigh/blob/master/Conveigh.ps1#L264]. It can work, but only as a script kiddie detector. Well prepared attackers can't be fooled utilizing this simple technique, specified detection method can work on people who just blindly run poisoning attacks without any first recon.
During a red teaming engagement it is simply a good thought to run Responder [https://github.com/lgandx/Responder] initially for any time with the -A option (“Analyze mode. This option allows you to see NBT-NS, BROWSER, LLMNR requests without responding [poisoning]”). Then just ignore specified honeypot IP address during the actual poisoning attack. At least that way we can fool specified primitive and reckless tools.
> New-Object System.Net.IPEndpoint([IPAddress]::broadcast,137)
AddressFamily Address Port
------------- ------- ----
InterNetwork 255.255.255.255 137