← Back to SOC feed Coverage →

Windows filtering events (Firewall)

kql MEDIUM Azure-Sentinel
DeviceEvents
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-05-24T23:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may leverage Windows filtering events to bypass firewall rules and establish unauthorized network connections. SOC teams should proactively hunt for this behavior to identify potential evasion tactics and detect stealthy network activity in their Azure Sentinel environment.

KQL Query

DeviceEvents
| where ActionType in ("FirewallOutboundConnectionBlocked", "FirewallInboundConnectionBlocked", "FirewallInboundConnectionToAppBlocked")
| project DeviceId , Timestamp , InitiatingProcessFileName , InitiatingProcessParentFileName, RemoteIP, RemotePort, LocalIP, LocalPort
| summarize MachineCount=dcount(DeviceId) by RemoteIP
| top 100 by MachineCount desc

Analytic Rule Definition

id: fb02b8f1-1eb9-43f9-b6e6-cca78a323f2b
name: Windows filtering events (Firewall)
description: |
  Get all filtering events done by the Windows filtering platform.
  This includes any blocks done by Windows Firewall rules, but also blocks triggered by some 3rd party firewalls.
  When no Firewall rules are configured, the default behavior is to block all incoming network connections.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceEvents
query: |
  DeviceEvents
  | where ActionType in ("FirewallOutboundConnectionBlocked", "FirewallInboundConnectionBlocked", "FirewallInboundConnectionToAppBlocked")
  | project DeviceId , Timestamp , InitiatingProcessFileName , InitiatingProcessParentFileName, RemoteIP, RemotePort, LocalIP, LocalPort
  | summarize MachineCount=dcount(DeviceId) by RemoteIP
  | top 100 by MachineCount desc

Required Data Sources

Sentinel TableNotes
DeviceEventsEnsure this data connector is enabled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Protection events/Windows filtering events (Firewall).yaml