← Back to SOC feed Coverage →

File footprint (1)

kql MEDIUM Azure-Sentinel
DeviceNetworkEvents
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

Adversaries may be using a specific file to establish persistence or execute malicious payloads, as the presence of this file could indicate initial compromise or lateral movement. Proactively hunting for this file in Azure Sentinel helps identify potential threats early, allowing the SOC team to investigate and mitigate risks before significant damage occurs.

KQL Query

// Query # 2 - Shows you a list of distinct IP addresses and DNS names the endpoint had network communication with through a specific file. 
// Use this list to whitelist/blacklist IP addresses or understand if there are communication with IP you are not aware of.
// Update the filename to the name you wish to investigate network communication.
let filename = "FILENAME GOES HERE";
// Builds table for distinct URLs based off filename
DeviceNetworkEvents 
| where InitiatingProcessFileName =~ filename and ( isnotempty(RemoteIP) or isnotempty(RemoteUrl) )
| project DNS=RemoteUrl, IP=RemoteIP
| distinct IP, DNS

Analytic Rule Definition

id: 1f80f1cf-97e1-4fb8-ad5a-e573fac7b9e3
name: File footprint (1)
description: |
  Query #1 - Find the machines on which this file was seen.
  TODO - set file hash to be a SHA1 hash of your choice...
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceNetworkEvents
query: |
  // Query # 2 - Shows you a list of distinct IP addresses and DNS names the endpoint had network communication with through a specific file. 
  // Use this list to whitelist/blacklist IP addresses or understand if there are communication with IP you are not aware of.
  // Update the filename to the name you wish to investigate network communication.
  let filename = "FILENAME GOES HERE";
  // Builds table for distinct URLs based off filename
  DeviceNetworkEvents 
  | where InitiatingProcessFileName =~ filename and ( isnotempty(RemoteIP) or isnotempty(RemoteUrl) )
  | project DNS=RemoteUrl, IP=RemoteIP
  | distinct IP, DNS

Required Data Sources

Sentinel TableNotes
DeviceNetworkEventsEnsure 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/File footprint (1).yaml