By default, when a user logs in to a Windows Machine, whether it is domain-joined or not, any process run under that user is associated with an Access Token, which is, in turn, related to a Logon Session through an specific attribute
If the user login to the system Interactively (2) or Remotelye Interactively (10), its credentials are automatically tied to the Logon Session generated, and cached
The latter thing does not happen when we are talking about Network Authentication
To prevent the user from having to put repeteadly its credentials each time he asks for a network resource, which implies an authentication, Windows introduced SSO (Single Sign On
Because of this behaviour, if an attacker forces or coerces a Windows Machine to connect to a controlled SMB Server, which requires authentication, the victim will authenticate to the rogue server and then the credentials of that user will be grabbed
Likewise, a user, which is logged in to a Windows Machine, could misstype a single character on the hostname when introducing a UNC at the File Explorer, therefore indicanting an incorrect hostname
Then, the SMB Client would perform a DNS Query to its Primary DNS Server, which, in a domain-joined computer, is usually de DC, requesting for the Canonical Name and Address related to that hostname
Since the give hostname does not exist, the DNS Server will respond that there is no registry for the supplied name
At this point, the Windows Machine will use the following Multicast Name Resolution Protocols as a fallback β
mDNS β Multicast Domain Name System
LLMNR β Local Link Multicast Name Resolution
NBT-NS β NetBios Name Service
As its name suggests, those protocols are multicast, so the clientβs name resolution query is sent to all the hosts within the Multicast Range
If an attacker is listenting for those queries using a poisoning LLMNR, NBTNS and MDNS tool such as responder, which sets up an SMB Server, among any other things, he could respond to the victim indicating that the supplied hostname resolves to the Address of the attacker itself
So first, the SMB Client would negotiate with the rogue SMB Server the Protocol Version and Authentication Mechanisms, and then the victim would authenticate to SMB Server
At this point, the attacker would receive a Net-NTLMv2 Response, from which several actions can be carried out β