Curl: NTLM hash leakage via NTLM authentication
The Microsoft-shipped version of curl can be abused to leak a user NTLMv2 challenge-response for offline cracking by triggering NTLM authentication with empty credentials.
Triage facts
Revision 1- Applicability
- Windows 10, Windows Server 2019
- Evidence
- Unknown
- Severity
- High
- Action
- Elevated
- Sources
- 1 public source
- Freshness
- Revision 1Nov 10, 02:49 UTC
- Detection
- 1 rule
- Source quality
- A1Likely
The Microsoft-shipped curl binary (included in Windows 10 and Windows Server 2019 and later) can be leveraged to capture the current user's NTLMv2 challenge-response. When executed with the '--ntlm' flag and an empty user credential specification ('-u :' or '--user :'), the binary passes a NULL identity to the Windows SSPI layer. This triggers a fallback that authenticates using the current user's logon session credentials stored in LSASS without requiring a plaintext password. This artifact can be transmitted to an attacker-controlled listener, facilitating offline cracking or relay attacks.
Impact
Successful exploitation results in the disclosure of an NTLMv2 hash, which can be cracked offline to recover cleartext credentials or used in relay attacks against other internal network resources.
Recommendation
- Deploy the detection rule below to identify suspicious curl invocations.
- Audit environment scripts and automation tasks for the use of 'curl --ntlm -u :' or variants, which are likely candidates for abuse.
- Restrict outbound SMB/HTTP authentication attempts from sensitive workstations to untrusted destinations to limit the feasibility of credential relaying.
Immediate actions
Deploy the provided Sigma rule to catch NTLM hash leakage attempts.
Threat Hunt
Identify systems frequently invoking curl with empty user flags.
Data: Process command line arguments
Mitigations
Identify and refactor any existing automation scripts using insecure curl NTLM calls.
T1187
Detection coverage 1
Detect NTLM Hash Leak via Curl
highDetects the use of the Microsoft-shipped curl binary with NTLM authentication and empty credentials, which triggers an NTLM handshake using the current user session.
Detection queries are available on the platform. Get full rules →