← Back to SOC feed Coverage →

Windows Anitivirus and EDR Elevation of Privilege Vulnerability

kql MEDIUM Azure-Sentinel
Tt1574
DeviceFileEvents
exploithuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-24T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may exploit a TOCTOU vulnerability in EDR and AV solutions to elevate privileges by creating malicious files during a race condition. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect and mitigate potential privilege escalation attacks targeting endpoint security solutions.

KQL Query

DeviceFileEvents
| where Timestamp > ago(7d)
| where ActionType == "FileCreated"
| where FileName endswith "ndis.sys"
| where FolderPath startswith "C:\\temp\\Windows\\System32\\drivers\\"

Analytic Rule Definition

id: a9eb9b06-4345-47f2-abe6-29f7200ddf83
name: Windows Anitivirus and EDR Elevation of Privilege Vulnerability
description: |
  The query for malicious file creations via TOCTOU Vulnerability in Leading Endpoint Detection and Response (EDR) and Antivirus (AV) Solutions.
  - Microsoft Defender (CVE-2022-37971)
  - Defender for Endpoint (CVE-2022-37971)
  - SentinelOne EDR
  - TrendMicro Apex One (CVE-2022-45797)
  - Avast Antivirus (CVE-2022-4173)
  - AVG Antivirus (CVE-2022-4173)
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceFileEvents
tactics:
- PrivilegeEscalation
- LateralMovement
relevantTechniques:
- t1574
query: |
  DeviceFileEvents
  | where Timestamp > ago(7d)
  | where ActionType == "FileCreated"
  | where FileName endswith "ndis.sys"
  | where FolderPath startswith "C:\\temp\\Windows\\System32\\drivers\\"

Required Data Sources

Sentinel TableNotes
DeviceFileEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Privilege escalation/detect-av-edr-privileged-delete-vulnerability.yaml