LLMNR/NBT-NS Poisoning | Taking Advantage of NTLM Security Weaknesses
In this write-up we will talk about LLMNR/NBT-NS Poisoning as this attack vector is still prevalent nowadays. Vast majority of assessments result in obtaining NTLMv1 and NTLMv2 hashes which can be taken advantage to crack these hashes and gain Administrator access.
In our example, we will use the tool called "RESPONDER" to intercept traffics from the network and to gather these NTLMv1 and NTLMv2 hashes to our advantage then we will talk about the overview on how these attack's kind of work.
LLMNR/NBT-NS Poisoning Overview
Attackers can spoof an authoritative source for name resolution on a victim network by responding to LLMNR(UDP 5355)/NBT-NS (UDP 137) traffic as if they know the identity of the requested host, effectively poisoning the service so that the victims will communicate with the adversary controlled system.
What is LLMNR?
-Used to identify hosts when DNS fails to do so
-Previously NBT-NS
-Key flaw is that the services utilize a user's username and NTLMv2 hash when appropriately responded to
To start with, let's run our virtual environment which consist of Active Directory/Domain Controller. Along with our target Computer joined to a Domain named "TESLA" and our Attacker's machine (KALI).
We start by running, RESPONDER from our attacker machine to listen and intercept any traffic from the network.
┌──(root㉿kali)-[/home/kali]
└─# responder -I eth0 -wdv
On our victim's machine, we tried to access a shared folder to generate a traffic and intercepted by our attacker's machine and capture NTLMv2 hashes.
As you can see, right after the victim attempted to access the "File Share" our listener (Attacker's machine) were able to intercept and capture the hashes. Now, the attacker's machine is listening in the network and was able to establish connection and poisoned other machines in the network including the "File Share" which was accessed in our example earlier.
The gathered NTLM hashes can now then be used to further escalate the attack. These hashes can be used to escalate privileges and owned the victim's "Domain".
In this example, we will use "hashcat" to crack these NTM hashes. By running "hashcat" as shown below and using the password dictionary "rockyou.txt" we are able to crack the password of user "fcastle" and we can do further damage to the network by escalating our privileges using the cracked credential.
┌──(root㉿kali)-[/home/kali]
└─# hashcat -m 5600 ntlmhash.txt /usr/share/wordlists/rockyou.txt --force
Now, let's talk about defenses and mitigation against this attack. In this case, is to disable LLMNR and NBT-NS.
-To disable LLMNR, select "TURN OFF Multicast Name Resolution" under Local Computer Policy > Computer Configuration > Administrative Templates > Network > DNS Client in the GPO editor.
-To disable NBT-NS, navigate to Network Connections > Network Adapter Properties > TCP/IPv4 Properties > Advanced tab > WINS tab > and select "Disable NetBIOS over TCP/IP".
Other mitigation:
-Implement Network Access Control
-Require strong user passwords (e.g. > 14 characters long and limit common word usage)
Comments
Post a Comment