Potential Local NTLM Relay via HTTP
Adversaries may coerce local NTLM authentication over HTTP via WebDAV named-pipe paths (Print Spooler, SRVSVC), then relay credentials to elevate privileges.
This detection identifies attempts to coerce local NTLM authentication over HTTP through WebDAV named-pipe paths, focusing on Print Spooler and SRVSVC. Attackers can exploit this vulnerability, often combined with tools like NTLMRelay2Self, PetitPotam, or modified versions of krbrelayx’s printerbug.py, to relay the obtained credentials and escalate their privileges within the network. This technique allows attackers to bypass traditional security measures by leveraging legitimate Windows protocols for malicious purposes. Successful exploitation can lead to domain dominance and unauthorized access to sensitive resources. This activity is often associated with post-exploitation activity following initial access via other means.
Attack Chain
- An attacker gains initial access to a Windows system.
- The attacker executes
rundll32.exeto loaddavclnt.dllusing theDavSetCookiefunction. - The
rundll32.exeprocess is invoked with arguments specifying a named pipe path over HTTP, such ashttp*/print/pipe/*,http*/pipe/spoolss, orhttp*/pipe/srvsvc. - The system attempts to authenticate to the specified HTTP endpoint using NTLM.
- The attacker intercepts the NTLM authentication request.
- Using a relay tool like NTLMRelay2Self or ntlmrelayx, the attacker relays the captured NTLM credentials to another service or machine.
- The attacker leverages the relayed credentials to escalate privileges or gain unauthorized access to network resources.
- The attacker may then perform lateral movement, data exfiltration, or other malicious activities.
Impact
Successful exploitation allows attackers to escalate privileges within the compromised system and potentially the entire domain. This can lead to unauthorized access to sensitive data, deployment of ransomware, or other destructive activities. The impact ranges from data breaches and financial losses to complete system compromise. Depending on the targeted accounts, the attacker may be able to achieve domain administrator privileges.
Recommendation
- Deploy the Sigma rule “Potential Local NTLM Relay via HTTP” to your SIEM to detect the execution of
rundll32.exewith specific arguments indicative of NTLM relay attempts. - Enable Sysmon process creation logging to ensure the necessary data is available for the Sigma rule to function correctly.
- Monitor network connections originating from processes that load
davclnt.dllto identify potential NTLM relay traffic. - Investigate and block the usage of tools like NTLMRelay2Self, PetitPotam, and ntlmrelayx within the environment.
- Implement mitigations for NTLM relay attacks, such as enabling Extended Protection for Authentication (EPA) and disabling NTLM where possible.
- Review and restrict the usage of WebClient service and Print Spooler service where not required.
Detection coverage 2
Potential Local NTLM Relay via HTTP
highDetects rundll32.exe executing davclnt.dll,DavSetCookie targeting HTTP pipe paths indicative of NTLM relay attempts.
Suspicious DavClient Usage
mediumDetects the loading of davclnt.dll by uncommon processes, potentially indicating WebDAV abuse.
Detection queries are kept inside the platform. Get full rules →