Query Details
// Custom Detection for CVE-2024-38200 NTLMv2 Hash Exposure 🎫 // https://github.com/passtheticket/CVE-2024-38200 // CVE-2024-38200 is a high-severity spoofing vulnerability in Microsoft Office. This flaw allows attackers to exploit a weakness in Microsoft Office, potentially exposing sensitive information such as NTLM hashes (NTLMv2) to unauthorized actors. The vulnerability affects multiple versions of Microsoft Office, including Office 2016, Office 2019, and the Office Long Term Servicing Channel (LTSC) 2021. It was discovered by Metin Yunus Kandemir (passtheticket), and the proof of concept (POC) and details are shared below. // Although the vulnerability was addressed in the August 2024 security updates for Microsoft Office, organizations without automated patching solutions may still be exposed. If you use Microsoft Defender for Office 365, you can create a custom detection on DefenderXDR to identify potential abuse of this vulnerability. I have shared the KQL for this detection on my GitHub. let OfficeURIs = dynamic(["ms-word:", "ms-powerpoint:", "ms-excel:", "ms-visio:", "ms-access:", "ms-project:", "ms-publisher:", "ms-spd:", "ms-infopath:"]); let OfficeURICommands = dynamic(["ofv", "ofe"]); UrlClickEvents | where ActionType == @"ClickAllowed" | where UrlChain has_any (OfficeURIs) and UrlChain has_any (OfficeURICommands) | project Timestamp, ReportId, AccountUpn, IPAddress, Workload, UrlChain // MITRE ATT&CK // Technique: User Execution (T1204) // Sub-technique: Malicious File (T1204.002) // Technique: Application Layer Protocol (T1071) // Sub-technique: Web Protocols (T1071.001)
This KQL query is designed to detect potential exploitation of a high-severity vulnerability (CVE-2024-38200) in Microsoft Office, which could expose NTLMv2 hashes. Here's a simple summary of what the query does:
Context: CVE-2024-38200 is a spoofing vulnerability in Microsoft Office that can expose sensitive information like NTLMv2 hashes. It affects multiple Office versions and was patched in August 2024. Organizations without automated patching might still be at risk.
Purpose: The query aims to identify instances where this vulnerability might be exploited by monitoring specific URL clicks in Microsoft Defender for Office 365.
Steps in the Query:
ClickAllowed).MITRE ATT&CK Techniques:
In essence, this query helps organizations detect potential abuse of the CVE-2024-38200 vulnerability by monitoring specific URL clicks related to Office applications, thereby identifying possible exposure of NTLMv2 hashes.

Steven Lim
Released: September 29, 2024
Tables
Keywords
Operators