QR phishing hides the destination URL inside an image, in the email body or a PDF attachment, so text-based URL scanners see nothing. The victim scans with a personal phone, outside endpoint and proxy controls. Detection therefore centres on decoding the image at the gateway, hunting message shape and watching identity telemetry for the sign-in that follows.
Signals at a Glance
| Signal | Where | ATT&CK |
|---|---|---|
| Image-only body or PDF with a QR code and almost no text | Email gateway | T1566 |
| URL extracted from a QR code pointing to a rare or newly registered domain | Defender for Office, gateway | T1566.002 |
| QR drawn from text characters instead of an image (ASCII-style) | Email gateway body rules | T1566 |
| Lure themed on multi-factor authentication, password expiry or shared documents | Subject and body analysis | T1598.003 |
| Sign-in from an unmanaged mobile or new location minutes after delivery | Entra ID sign-in logs | T1078 |
Gateway and Message Hunting
If your gateway decodes QR codes, treat the extracted URL as a first-class field. Hunt for it joined to message attributes that suggest a lure. In Defender for Office the URL table records where a link was found, including QR codes:
// Defender XDR (KQL) - URLs recovered from QR codes in delivered mail
EmailUrlInfo
| where Timestamp > ago(7d)
| where UrlLocation in ("QRCode","Attachment") // validate the exact UrlLocation values in your tenant
| join kind=inner (
EmailEvents
| where Timestamp > ago(7d)
| where DeliveryAction == "Delivered" and EmailDirection == "Inbound"
| project NetworkMessageId, SenderFromAddress, RecipientEmailAddress, Subject, SenderIPv4
) on NetworkMessageId
| summarize recipients=dcount(RecipientEmailAddress), subjects=make_set(Subject, 3)
by UrlDomain, SenderFromAddress
| where recipients >= 3
| order by recipients desc
// tune/validate: marketing mail uses QR codes legitimately; enrich UrlDomain with age and reputation
Add a rule for messages with no readable text, which is the shape of an image lure designed to defeat content filters:
// Defender XDR (KQL) - inbound messages with image attachments, tiny body and a themed subject
EmailAttachmentInfo
| where Timestamp > ago(7d)
| where FileType in ("png","jpg","jpeg","gif","pdf")
| join kind=inner (
EmailEvents
| where Timestamp > ago(7d) and EmailDirection == "Inbound"
| where Subject matches regex @"(?i)(mfa|authenticat|password|expire|verify|shared|invoice|benefit|payroll)"
| project NetworkMessageId, SenderFromAddress, RecipientEmailAddress, Subject
) on NetworkMessageId
| summarize attachments=count(), recipients=dcount(RecipientEmailAddress)
by SenderFromAddress, Subject
| where recipients >= 2
// tune/validate: add a first-contact sender filter if you maintain that watchlist
The Follow-On Sign-In
- Correlate delivery with Entra ID sign-in logs for the same recipient: a new device or location, an unmanaged mobile browser or a failed then successful MFA sequence within minutes of delivery.
- Watch for adversary-in-the-middle tooling behind the landing page: a token issued to one IP and used from another soon after.
- Add a safe-to-scan advisory in awareness training and give users a one-tap report path on mobile.
- Where mobile management is in place, enforce conditional access that requires a compliant device for corporate resources.
Use Microsoft Defender for Office 365 guidance on QR-code protection, your gateway's image analysis documentation and Entra ID sign-in log guidance for session and token anomalies. Baseline your own environment — legitimate QR use in marketing, ticketing and shared-document mail is common.
Build Detections That Fire
Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.
- Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
- Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
- 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Stay ahead of emerging threats. Get notified when we publish new intelligence reports and advisories.
Subscribe to Alerts