Query Details
// New URL File NTLM Hash Disclosure Vulnerability Detection (0day) // https://blog.0patch.com/2024/12/url-file-ntlm-hash-disclosure.html // A highly accurate DefenderXDR exposure management detection for URL File NTLM Hash Disclosure Vulnerability (0day): // 1. NTLM hash presence on endpoint // 2. New .LNK file creation // 3. NTLM authentication over SMB connection to Internet IP // Conditions 1 + 2 + 3 => 💥 let EndpointWithNTLMHash = ExposureGraphEdges | where EdgeLabel == @"has credentials of" | where EdgeProperties.rawData.ntlmHash.ntlmHash == "true" // Endpoint with NTLM hash stored | distinct SourceNodeName; let DeviceLNKCreation = DeviceFileEvents | where ActionType == @"FileCreated" | where FileName endswith ".lnk" | where DeviceName has_any(EndpointWithNTLMHash) | distinct DeviceName; // Endpoint with NTLM hash and LNK creation DeviceNetworkEvents // NTLM authentication over SMB connection | where RemotePort == "445" and RemoteIPType == "Public" | where ActionType == "ConnectionSuccess" | where DeviceName has_any (DeviceLNKCreation)
This KQL query is designed to detect a specific security vulnerability related to NTLM hash disclosure through URL files. Here's a simplified breakdown of what the query does:
Identify Endpoints with NTLM Hashes:
Detect New .LNK File Creation:
Monitor NTLM Authentication over SMB:
The query combines these three conditions to identify a potential security threat. If all three conditions are met on the same device, it indicates a possible NTLM hash disclosure vulnerability, which is a serious security risk.

Steven Lim
Released: December 6, 2024
Tables
Keywords
Operators