← Back to SOC feed Coverage →

Devices In Subnet - IPAddressV4

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-05-08T23:00:01Z · Confidence: medium

Hunt Hypothesis

Devices in a specific IPv4 subnet may indicate lateral movement or unauthorized access within the network. SOC teams should proactively hunt for this behavior to identify potential compromise or reconnaissance activities in their Azure Sentinel environment.

KQL Query

// Specify the relevant subnet in IpV4Range
let IpV4Range = "172.22.138.0/24";
DeviceNetworkInfo
| summarize arg_max(Timestamp, *) by DeviceId
| mv-expand IPAddressEntry=todynamic(IPAddresses)
| extend IPAddress=tostring(IPAddressEntry.IPAddress)
| where ipv4_is_in_range(IPAddress, IpV4Range)

Analytic Rule Definition

id: 7f4a9010-4948-4e0c-b668-7a2f603c7dc8
name: Devices In Subnet - IPAddressV4
description: |
  This query surfaces devices that are in a specific IPAddressV4 subnet
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceInfo
tactics: []
relevantTechniques: []
query: |
  // Specify the relevant subnet in IpV4Range
  let IpV4Range = "172.22.138.0/24";
  DeviceNetworkInfo
  | summarize arg_max(Timestamp, *) by DeviceId
  | mv-expand IPAddressEntry=todynamic(IPAddresses)
  | extend IPAddress=tostring(IPAddressEntry.IPAddress)
  | where ipv4_is_in_range(IPAddress, IpV4Range)

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Device Inventory/Devices In Subnet - IPAddressV4.yaml