← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing NTLM Relay to LDAP/SMB Dataset

This hunt covers T1557.001: Adversary-in-the-Middle - LLMNR/NBT-NS Poisoning and SMB Relay, where an adversary on the local network poisons name-resolution broadcast requests to coerce a victim host into authenticating to an attacker-controlled listener, then relays the captured NTLM authentication to a high-value target (a domain controller's LDAP service) to perform privileged actions as the victim - all without ever cracking a password hash.

Step 1: Hypothesis Formation

Hypothesis: Adversary running Responder (or ntlmrelayx) on the local subnet answers a broad/multicast LLMNR or NBT-NS name-resolution request from a victim host (triggered by, e.g., a mistyped share path), causing the victim to authenticate directly to the attacker's IP over SMB. The attacker relays this NTLM authentication in real time to the domain controller's LDAP service to add a computer account or modify a privileged group membership - a relay-to-LDAP escalation (the "RemotePotato0"/"ntlmrelayx to LDAP" pattern). Indicators:

Null Hypothesis: Legitimate NetBIOS/LLMNR fallback resolution during normal name-resolution failures with no attacker present (a very common, usually benign broadcast pattern). Invalidate via the presence of an unexpected unicast responder, the victim's subsequent SMB connection to a workstation (not a server) IP, and - most conclusively - the IP/hostname mismatch on the relayed LDAP authentication at the DC.

Rationale: This is a distinct credential-abuse path from the Kerberoasting, DCSync, and Pass-the-Hash hunts already in this series - it requires no prior credential theft at all, just network position, making it one of the most "zero-to-domain-admin" techniques an internal hunt team needs to actively watch for.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (8 shown) confirm the full poison-capture-relay chain, ending in an attacker-controlled computer account added to a privileged group via relayed LDAP write access.

Timestamp (UTC)SourceKey DetailsIOC/Why Suspicious?
2022-11-14 14:02:00Network capture (UDP/5355)WORKSTATION27 broadcasts LLMNR query for "\\FILESRV01\Reports" (typo of \\FILESERVER01\Reports).Benign typo triggers fallback broadcast resolution - the actual vulnerability trigger is entirely user-error, not malicious in itself.
2022-11-14 14:02:00Network capture (UDP/5355)WORKSTATION41 answers the broadcast with its own IP (172.18.39.88) as "FILESRV01" - no legitimate DNS record exists for this name.Core IOC: Unsolicited, incorrect name resolution answer from a peer workstation - the Responder/poisoning fingerprint.
2022-11-14 14:02:01Sysmon (WORKSTATION27)EventID=3; Image=explorer.exe; DestinationIp=172.18.39.88; DestinationPort=445.Trigger IOC: Victim connects via SMB to a workstation peer, not a file server - this pattern almost never occurs legitimately.
2022-11-14 14:02:01(relay, not directly logged)Attacker's ntlmrelayx captures the NTLM authentication attempt and immediately relays it to MORDORDC:389 (LDAP) before it expires.Relay happens in real time; no artifact on the relay host itself beyond the outbound LDAP connection (see next row).
2022-11-14 14:02:02Sysmon (WORKSTATION41)EventID=3; Image=python.exe (ntlmrelayx); DestinationIp=172.18.39.5 (MORDORDC); DestinationPort=389.Relay IOC: Attacker workstation itself initiates the outbound LDAP connection to the DC immediately after capturing the victim's auth attempt.
2022-11-14 14:02:03Security (MORDORDC)EventID=4624; TargetUserName=wkline (WORKSTATION27's logged-on user); LogonType=3; AuthenticationPackageName=NTLM; WorkstationName=WORKSTATION27; IpAddress=172.18.39.88 (WORKSTATION41's IP, not WORKSTATION27's).Definitive IOC: WorkstationName claims WORKSTATION27 but the actual source IP is WORKSTATION41 - the unambiguous fingerprint of a relayed (not direct) authentication.
2022-11-14 14:02:04Security (MORDORDC)EventID=4741 (Computer Account Created); ComputerName=ATTACKERPC$; SubjectUserName=wkline (via the relayed session).Escalation IOC: A new computer account is created using wkline's relayed authentication - abusing default ms-DS-MachineAccountQuota rights that most authenticated users hold.
2022-11-14 14:02:05Security (MORDORDC)EventID=4728 (Member Added to Security-Enabled Group); GroupName=Domain Admins (indirectly, via a delegated OU/group chain in the full dataset); SubjectUserName=wkline (relayed).Core IOC: The relayed session is used to grant the newly created ATTACKERPC$ computer account privileged group membership - full domain compromise achieved without ever knowing wkline's or any admin's password.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - LLMNR poisoning and real-time NTLM relay to LDAP resulting in full domain compromise, requiring zero prior credential access! The WorkstationName/IpAddress mismatch on the DC's 4624 event was the single most conclusive piece of evidence in this entire hunt.