Detect Windows NTLM Credential Leak via File Download Interaction in Elastic Security
CVE-2025-24054 is a Windows NTLM hash disclosure vulnerability triggered when a user interacts with a specially crafted file (e.g., .library-ms, .url, .lnk) that forces an outbound NTLM authentication attempt to an attacker-controlled server. Exploitation requires minimal user interaction — simply downloading or viewing a malicious file in Explorer can suffice. The leaked Net-NTLMv2 hash can be cracked offline or relayed for lateral movement. This vulnerability is actively exploited in the wild and listed in CISA's KEV catalog.
MITRE ATT&CK
Elastic Detection Query
sequence by host.id with maxspan=30s
[file where event.action in ("creation", "modification") and
file.extension in ("library-ms", "url", "lnk", "scf") and
process.name in ("explorer.exe", "svchost.exe", "chrome.exe", "msedge.exe", "firefox.exe")]
[network where event.action == "connection_attempted" and
destination.port in (445, 139) and
process.name in ("explorer.exe", "svchost.exe", "lsass.exe") and
not cidr_match(destination.ip, "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8")] EQL sequence rule that identifies file creation/modification of known NTLM-triggering extensions followed within 30 seconds by an outbound SMB connection to a non-RFC1918 address, indicating potential CVE-2025-24054 credential leak to an external attacker server.
Data Sources
Required Tables
False Positives & Tuning
- Users accessing legitimate external file sharing services via SMB (uncommon but possible in hybrid environments)
- VPN split-tunneling configurations where internal IPs appear as external
- Security testing or red team exercises using crafted files in authorized engagements
- Cloud sync clients (OneDrive, Dropbox) creating .lnk shortcuts to network locations
Other platforms for CVE-2025-24054
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1NTLM Credential Leak via Malicious .library-ms File
Expected signal: Sysmon Event ID 11 (FileCreate) for TestLib.library-ms; Sysmon Event ID 3 (NetworkConnect) from explorer.exe to ATTACKER_IP:445; Windows Security Event ID 4648 showing NTLM authentication attempt to ATTACKER_IP
- Test 2NTLM Credential Leak via Crafted .url Shortcut File
Expected signal: Sysmon Event ID 11 (FileCreate) for Important-Document.url on Desktop; Sysmon Event ID 3 (NetworkConnect) from explorer.exe to ATTACKER_IP:445; Windows Security Event ID 4625 if auth fails (Responder returns failure after capture)
- Test 3Net-NTLMv2 Hash Offline Cracking Simulation Post-Capture
Expected signal: On Windows DC (if auth attempted with cracked hash): Windows Security Event ID 4624 (successful logon) or 4625 (failed logon) with NTLM authentication from unexpected source IP; Kerberos fallback to NTLM is itself anomalous for modern AD environments
- Test 4NTLM Credential Leak via Crafted .scf File in Shared Folder
Expected signal: Sysmon Event ID 11 (FileCreate) for @trigger.scf; Sysmon Event ID 3 (NetworkConnect) from explorer.exe to ATTACKER_IP:445 triggered by shell icon resolution; Windows Security audit log showing NTLM authentication to external host
Unlock Pro Content
Get the full detection package for CVE-2025-24054 including response playbook, investigation guide, and atomic red team tests.