← Back to SOC feed Coverage →

URL Threat Protection Summary

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

Hunt Hypothesis

This hypothesis targets phishing campaigns (T1566) where adversaries use malicious URLs to compromise users, detected through anomalies in Safe Links click outcomes and distinct URL volumes in email traffic. Proactively hunting for these metrics in Azure Sentinel allows the SOC to identify emerging phishing trends or targeted attacks before they result in successful credential theft or malware execution.

KQL Query

let clicks = UrlClickEvents | where Timestamp > ago(30d);
union
(clicks | where ActionType in ("ClickBlocked","ClickBlockedByTenantPolicy") | summarize Count = count() | extend Details = "Malicious Clicks Blocked", Ord = 1),
(clicks | where ActionType == "ClickAllowed" | summarize Count = count() | extend Details = "Clicks Allowed Through", Ord = 2),
(clicks | summarize Count = dcount(AccountUpn) | extend Details = "Users Clicking Links", Ord = 3),
(EmailUrlInfo | where Timestamp > ago(30d) | summarize Count = dcount(Url) | extend Details = "Distinct URLs in Email", Ord = 4)
| sort by Ord asc
| project Count, Details

Analytic Rule Definition

id: 074959c6-2e9d-4f11-b9c8-971b7387aa99
name: URL Threat Protection Summary
description: |
  This query summarises URL threat protection activity (Safe Links click outcomes and distinct URLs seen in email) as a set of headline metrics for the selected period.
description-detailed: |
  This query summarises URL threat protection activity in Microsoft Defender for Office 365 as headline metrics: malicious clicks blocked, clicks allowed through, distinct users clicking links (from UrlClickEvents), and distinct URLs seen in email (from EmailUrlInfo).
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - UrlClickEvents
  - EmailUrlInfo
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  let clicks = UrlClickEvents | where Timestamp > ago(30d);
  union
  (clicks | where ActionType in ("ClickBlocked","ClickBlockedByTenantPolicy") | summarize Count = count() | extend Details = "Malicious Clicks Blocked", Ord = 1),
  (clicks | where ActionType == "ClickAllowed" | summarize Count = count() | extend Details = "Clicks Allowed Through", Ord = 2),
  (clicks | summarize Count = dcount(AccountUpn) | extend Details = "Users Clicking Links", Ord = 3),
  (EmailUrlInfo | where Timestamp > ago(30d) | summarize Count = dcount(Url) | extend Details = "Distinct URLs in Email", Ord = 4)
  | sort by Ord asc
  | project Count, Details
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailUrlInfoEnsure this data connector is enabled
UrlClickEventsEnsure 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 Click/URL Threat Protection Summary.yaml