← Back to SOC feed Coverage →

Malicious Emails with QR code Urls

kql MEDIUM Azure-Sentinel
T1566
EmailEventsEmailUrlInfo
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 emails containing QR codes to deliver payloads or redirect users to phishing sites, leveraging the QR code’s ability to bypass traditional email filtering. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and disrupt QR code-based phishing campaigns before they cause significant damage.

KQL Query

EmailUrlInfo
| where UrlLocation == "QRCode"
| join kind=inner (
    EmailEvents
    | where isnotempty(ThreatTypes)
    | project NetworkMessageId, ThreatTypes
) on NetworkMessageId
| summarize count() by ThreatTypes
| render piechart

Analytic Rule Definition

id: 13260191-fb10-4a36-9ca1-2bbc0aaf77d0
name: Malicious Emails with QR code Urls
description: |
  Visualises emails containing QR code URLs that have been detected as malicious, helping analysts identify QR code-based attack campaigns.
  Based on Defender for Office 365 workbook: https://techcommunity.microsoft.com/blog/microsoftdefenderforoffice365blog/part-2-build-custom-email-security-reports-and-dashboards-with-workbooks-in-micr/4411303
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - EmailUrlInfo
      - EmailEvents
tactics:
  - InitialAccess
relevantTechniques:
  - T1566
query: |
  EmailUrlInfo
  | where UrlLocation == "QRCode"
  | join kind=inner (
      EmailEvents
      | where isnotempty(ThreatTypes)
      | project NetworkMessageId, ThreatTypes
  ) on NetworkMessageId
  | summarize count() by ThreatTypes
  | render piechart
version: 1.0.0

Required Data Sources

Sentinel TableNotes
EmailEventsEnsure this data connector is enabled
EmailUrlInfoEnsure 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/Malicious Emails with QR code Urls.yaml