← Back to SOC feed Coverage →

Microsoft Defender AV mode device count

kql MEDIUM Azure-Sentinel
huntingmicrosoftofficial
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-06-02T11:00:00Z · Confidence: medium

Hunt Hypothesis

A large number of devices in a specific Microsoft Defender AV mode may indicate an adversary attempting to evade detection by leveraging AV mode configurations. SOC teams should proactively hunt for this behavior to identify potential evasion tactics and assess the effectiveness of endpoint protection in their Azure Sentinel environment.

KQL Query

DeviceTvmInfoGathering
| extend AvMode = iif(tostring(AdditionalFields.AvMode) == '0', 'Active', iif(tostring(AdditionalFields.AvMode) == '1', 'Passive',iif(tostring(AdditionalFields.AvMode) == '2', 'Disabled', iif(tostring(AdditionalFields.AvMode) == '5', 'PassiveAudit',iif(tostring(AdditionalFields.AvMode) == '4', 'EDR Blocked' ,'Unknown')))))  
| summarize DeviceCount = count() by AvMode

Analytic Rule Definition


id: 9FDDF2F5-88AC-4186-BA48-7A4187A4F755
name: Microsoft Defender AV mode device count
description: |
  'Provides the Anti virus mode and device count falling under that AV mode.'
requiredDataConnectors: []
tactics: []
relevantTechniques: []
query: |
    DeviceTvmInfoGathering
    | extend AvMode = iif(tostring(AdditionalFields.AvMode) == '0', 'Active', iif(tostring(AdditionalFields.AvMode) == '1', 'Passive',iif(tostring(AdditionalFields.AvMode) == '2', 'Disabled', iif(tostring(AdditionalFields.AvMode) == '5', 'PassiveAudit',iif(tostring(AdditionalFields.AvMode) == '4', 'EDR Blocked' ,'Unknown')))))  
    | summarize DeviceCount = count() by AvMode

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/TVM/Microsoft Defender AV mode device count.yaml