← Back to SOC feed Coverage →

Teams Message with URL listed on OpenPhish

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

Hunt Hypothesis

Adversaries may use malicious URLs from OpenPhish in Teams messages to deliver phishing payloads, leveraging the platform’s trusted communication channels. SOC teams should proactively hunt for this behavior to identify and mitigate potential spear-phishing attacks before they lead to credential compromise or data exfiltration.

KQL Query

//This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious Teams message with a URL from OpenPhish.
let PhishingURLs = externaldata(url: string)
[
"https://raw.githubusercontent.com/openphish/public_feed/refs/heads/main/feed.txt"
]
with (format="txt"); // CSV and JSON formats are also valid formats if using the premium feeds
MessageUrlInfo
 | where Url in (PhishingURLs)
 | join MessageEvents on TeamsMessageId
 //| where IsOwnedThread==0 and IsExternalThread==1

Analytic Rule Definition

id: 0d0a865b-7ed4-4e32-8b57-24cbf6b301b9
name: Teams Message with URL listed on OpenPhish
description: |
  This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious Teams message with a URL from OpenPhish was delivered.
description-detailed: |
  This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious Teams message with a URL from OpenPhish was delivered.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - MessageUrlInfo
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  //This query can be used as a Custom Detection Rule (CDR) to trigger when a potentially malicious Teams message with a URL from OpenPhish.
  let PhishingURLs = externaldata(url: string)
  [
  "https://raw.githubusercontent.com/openphish/public_feed/refs/heads/main/feed.txt"
  ]
  with (format="txt"); // CSV and JSON formats are also valid formats if using the premium feeds
  MessageUrlInfo
   | where Url in (PhishingURLs)
   | join MessageEvents on TeamsMessageId
   //| where IsOwnedThread==0 and IsExternalThread==1
version: 1.0.0

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/Microsoft Teams protection/Teams Message with URL listed on OpenPhish.yaml