← Back to SOC feed Coverage →

Alert Events from Internal IP Address

kql MEDIUM Azure-Sentinel
AlertEvidence
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-22T11:00:00Z · Confidence: medium

Hunt Hypothesis

An adversary may be using an internal IP address to mask their activity and evade detection by blending in with legitimate internal traffic. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential lateral movement or data exfiltration attempts hidden within internal network communications.

KQL Query

let PivotTime = datetime(2021-01-02 20:57:02); //Fill out time
let TimeRangeStart = PivotTime-15m; // 15 Minutes Prior to Pivot Time
let TimeRangeEnd = PivotTime+15m; // 15 Minutes After Pivot Time
let IPAddress = "172.16.40.8";  // internal IP address to search
// Locate DeviceIds associated with IP
let FindDeviceIdbyIP = DeviceNetworkInfo
| where Timestamp between ((TimeRangeStart) ..TimeRangeEnd) 
	and IPAddresses contains strcat("\"", IPAddress, "\"") 
	and NetworkAdapterStatus == "Up"
| project DeviceName, DeviceId, Timestamp, IPAddresses;
// Query Alerts matching DeviceIds
FindDeviceIdbyIP 
| join kind=rightsemi AlertEvidence on DeviceId
| join AlertInfo on AlertId
// Summarizes alerts by AlertId with min and max event times
| summarize Title=any(Title), min(Timestamp), max(Timestamp), DeviceName=any(DeviceName) by AlertId

Analytic Rule Definition

id: f936ddfa-58e3-4db1-834b-fb50e8bd55c5
name: Alert Events from Internal IP Address
description: |
  Determines DeviceId from internal IP address and outputs all alerts in events table associated to the DeviceId.
  Example use case is Firewall determines Internal IP with suspicious network activity. Query WDATP based on date/time and Internal IP and see associated alerts for the endpoint.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceNetworkInfo
  - AlertEvidence
  - AlertInfo
query: |
  let PivotTime = datetime(2021-01-02 20:57:02); //Fill out time
  let TimeRangeStart = PivotTime-15m; // 15 Minutes Prior to Pivot Time
  let TimeRangeEnd = PivotTime+15m; // 15 Minutes After Pivot Time
  let IPAddress = "172.16.40.8";  // internal IP address to search
  // Locate DeviceIds associated with IP
  let FindDeviceIdbyIP = DeviceNetworkInfo
  | where Timestamp between ((TimeRangeStart) ..TimeRangeEnd) 
  	and IPAddresses contains strcat("\"", IPAddress, "\"") 
  	and NetworkAdapterStatus == "Up"
  | project DeviceName, DeviceId, Timestamp, IPAddresses;
  // Query Alerts matching DeviceIds
  FindDeviceIdbyIP 
  | join kind=rightsemi AlertEvidence on DeviceId
  | join AlertInfo on AlertId
  // Summarizes alerts by AlertId with min and max event times
  | summarize Title=any(Title), min(Timestamp), max(Timestamp), DeviceName=any(DeviceName) by AlertId

Required Data Sources

Sentinel TableNotes
AlertEvidenceEnsure this data connector is enabled

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/General queries/Alert Events from Internal IP Address.yaml