Query Details
// Detecting Zero-Day CVE-2025-21333 Privilege Escalation // https://securityonline.info/windows-hyper-v-zero-day-cve-2025-21333-poc-drops-system-access-exposed/ // https://github.com/MrAle98/CVE-2025-21333-POC let QueryPeriod = 30d; let DetectionPeriod = 1h; let HyperVEnabledEndpoint = DeviceProcessEvents | where Timestamp > ago(QueryPeriod) | where FileName == "WindowsSandboxServer.exe" | distinct DeviceId; let VulnerableEndpoint = DeviceTvmSoftwareVulnerabilities | where CveId == "CVE-2025-21333" | distinct DeviceId; let NewExePOCCreation = DeviceFileEvents | where Timestamp > ago(DetectionPeriod) | where ActionType == "FileCreated" | where FileName endswith ".exe" | distinct FileName; DeviceEvents | where Timestamp > ago(DetectionPeriod) | where ActionType == "ProcessPrimaryTokenModified" | where FileName has_any(NewExePOCCreation) | where DeviceId has_any(HyperVEnabledEndpoint) and DeviceId has_any(VulnerableEndpoint)
This query is designed to detect potential exploitation of a zero-day vulnerability, specifically CVE-2025-21333, which involves privilege escalation in Windows Hyper-V environments. Here's a simplified breakdown of what the query does:
Query Period and Detection Period:
QueryPeriod) and focuses on events from the last hour (DetectionPeriod).Identify Hyper-V Enabled Endpoints:
Identify Vulnerable Endpoints:
Detect New Executable Files:
Detect Privilege Escalation Attempts:

Steven Lim
Released: March 6, 2025
Tables
Keywords
Operators