← Back to SOC feed Coverage →

SafeLinks URL detections

kql MEDIUM Azure-Sentinel
T1566
EmailEvents
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-19T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may use malicious URLs disguised as legitimate links to exfiltrate data or deliver payloads, leveraging SafeLinks to bypass traditional detection mechanisms. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential phishing or credential theft campaigns that evade standard security controls.

KQL Query

EmailEvents 
| where DetectionMethods != "" 
| extend detection= tostring(parse_json(DetectionMethods).Phish) 
| where detection == '["URL detonation reputation"]' or detection == '["URL detonation"]' 
| summarize total=count() by bin(Timestamp, 1d) 
| order by Timestamp asc

Analytic Rule Definition

id: 492f1ea1-37c3-410a-a2f2-4e4eae2ff7f9
name: SafeLinks URL detections
description: |
  This query provides insights on the detections done by SafeLinks protection in Defender for Office 365
description-detailed: |
  This query provides insights on the detections done by SafeLinks protection in Defender for Office 365
  Reference - https://learn.microsoft.com/en-us/defender-office-365/safe-links-about
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailEvents 
  | where DetectionMethods != "" 
  | extend detection= tostring(parse_json(DetectionMethods).Phish) 
  | where detection == '["URL detonation reputation"]' or detection == '["URL detonation"]' 
  | summarize total=count() by bin(Timestamp, 1d) 
  | order by Timestamp asc
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Email and Collaboration Queries/URL/SafeLinks URL detections.yaml