AegisAI Perspectives · 062

How to detect QR code phishing in email

Detect QR code phishing in email by decoding the image to its URL, checking the real domain and redirects, and setting Microsoft 365 and Gmail controls.

How to detect QR code phishing in email

To detect QR code phishing in email, decode the QR image to its URL and judge that URL like any other link, because the link is hidden inside an image15. Users rarely check it themselves: 73% of Americans scan QR codes without verification of any kind14. AegisAI decodes each QR code to a URL and detonates it like any other link24, so the verdict rests on the destination, not on the picture.

What you can do by the end

  • Turn on the Microsoft 365 and Google Workspace settings that reach a URL hidden in a QR image.
  • Check the decoded domain and the redirect chain of a reported QR email before anyone scans it.
  • Run a first-hour response that pulls every copy and locks any account that entered credentials.

What is QR code phishing and why does it bypass email security?

QR code phishing, also called quishing, puts the phishing link inside a QR image instead of in the message text. A filter that reads text and links sees a picture, so the link never reaches its URL checks.

The UK National Cyber Security Centre says not all security tools designed to detect phishing emails will scan images, so a QR code pointing to a malicious website might slip through21. The scan then happens on a phone. Users are more likely to scan with a personal phone, which lacks the protections of an employer computer.

Attackers also move the code into attachments. One campaign reported by Microsoft sent PDF attachments with QR codes to more than 2,300 organizations18. The same gap explains why a gateway that only rewrites text links misses these messages, a pattern covered in why a secure email gateway misses phishing.

Set up Microsoft 365 to find URLs hidden in QR codes

Microsoft 365 already records URLs it extracts from QR codes, and you can hunt for them. In Defender advanced hunting, the UrlLocation column of the EmailUrlInfo table carries QRCode for URLs extracted from QR codes1.

  • Save a hunting query on EmailUrlInfo filtered to UrlLocation == "QRCode", joined to EmailEvents on NetworkMessageId, and review the domains it returns each morning.
  • Keep zero-hour auto purge on. ZAP for phishing is enabled by default in anti-spam policies3, and it acts on delivered mail later found to be phishing.
  • Know its window. ZAP searches only the last 48 hours of delivered email, so a QR message found on day three needs a manual removal.
  • Give the right people the Search and Purge role. Admins can choose remediation actions, but that role is required to get those actions approved5.

Set up Google Workspace to catch links behind images

Google Workspace covers QR phishing through its advanced phishing and malware protection settings and the security investigation tool. Turn on the links and external images settings in the Admin console.

  • Turn on Identify links behind shortened URLs, which allows discovery of harmful links hidden behind shortened URLs10. QR campaigns use short links to hide the final domain.
  • Turn on Scan linked images, which scans images referenced by links to find hidden malicious content. Google's help page does not describe QR decoding for images attached to a message, so do not treat this setting as QR cover on its own.
  • Change the action. The default keeps the email in the inbox with a warning. Choose quarantine for the protections you trust, so the message never reaches a phone camera.
  • Plan the clean-up path. In the security investigation tool, admins can select Gmail messages and delete them, mark them as phishing or send them to quarantine13.

Run a step-by-step URL destination analysis before scanning

Decode first, then judge the destination on a machine you control, never on a user's phone. These seven steps take a reported QR email from image to verdict to clean-up.

  1. Decode the QR code on a workstation or in a sandbox. Copy the URL as text; do not open it on a phone.

  2. Parse the registered domain, not the brand words in the URL. Defenders should parse the registered domain, not just look for brand keywords17.

  3. Follow every redirect in an isolated browser. Do not try to judge long, complex, unfamiliar, or internationalized URLs by eye20.

  4. Compare the final page with the message. A payroll notice that ends on a sign-in page for a domain your company does not own is a phish. If a CAPTCHA blocks the page, treat that as a signal, as explained in how CAPTCHA pages hide phishing from link scanners.

  5. Find every copy. In Microsoft 365 run the QRCode hunting query; in Google Workspace search Gmail messages in the investigation tool.

  6. Remove the copies. In Threat Explorer an analyst can pick up to 100 emails by hand, or submit a whole query of up to 200,000 emails6. A soft delete keeps the message recoverable by the user and admins4.

  7. Contain anyone who entered a password. Disable the account until the investigation is complete7, then revoke active sessions, which invalidates access that uses the stolen credentials.

Which visual and contextual red flags appear in QR code emails?

The strongest red flags sit in the decoded URL and the request, not in how the code looks. Score them together: good detection combines weak signals until the pattern becomes strong19.

SignalWhat to look forWhere to check it in Microsoft 365Where to check it in Google Workspace
Decoded domainRegistered domain that does not belong to the brand or service named in the emailEmailUrlInfo, UrlLocation QRCodeInvestigation tool, Gmail messages
Short linkA shortener in front of the real destinationSame hunting query, UrlDomain columnIdentify links behind shortened URLs
Code locationQR code as the only content, or inside a PDF or image attachmentMessage entity in Threat ExplorerMessage details in the investigation tool
RequestSign in, re-enroll MFA, sign a payroll or benefits formUser report and message bodyUser report and message body
Device switchText that asks the reader to use a phone, which leaves employer protections behindUser reportUser report
ReachThe same image or URL sent to many staff at onceHunting query grouped by URLInvestigation tool grouped by subject

What happens in the first hour of a QR phishing wave?

The first hour decides whether a QR wave stays a set of emails or becomes an account takeover. This box shows the order of work on one fictional tenant.

Illustrative example, figures are fictional. Harbor Lane Dental Group (fictional) has 240 staff on Microsoft 365. At 9:05 a user reports a "benefits enrollment" email whose only content is a PDF with a QR code. By 9:15 the analyst has decoded the code to a sign-in page on a domain registered last week. The QRCode hunting query finds 37 copies; the analyst soft deletes all 37 by 9:25. Sign-in logs show 3 users opened the page and 1 entered a password. By 9:40 that account is disabled and its sessions are revoked. Its inbox rules are then checked for forwarding. At 10:00 the IT lead sends staff a two-line note: do not scan, report instead.

Check the containment step against Microsoft's list of compromise symptoms. Inbox rules that automatically forward email to unknown addresses are a listed sign of a compromised mailbox9.

Is it possible to block emails containing a QR code in Defender for Office 365?

Microsoft Learn documents a way to hunt URLs taken from QR codes, not a switch that quarantines every email with a QR code. A blanket block would also catch real event tickets and MFA enrollment notices.

A QR code alone should not automatically block a message16. Block on the decoded destination instead. An unknown registered domain that serves a sign-in page, sent with an unexpected request, is enough. That is the same multi-signal logic used for evasive phishing links and attachments.

How do legitimate security codes differ from phishing attempts?

A legitimate security code arrives because you started a process, and it leads to a domain the service owns. A phishing code arrives unasked and leads somewhere else.

  • Expected or not. An MFA enrollment code shown on the screen where you just signed in is expected. An email that tells you to rescan a code before your MFA expires is not.
  • Domain owned or not. Read the registered domain of the decoded URL, not the brand words in it.
  • Request in proportion or not. A real code finishes a step you began. A phishing code asks for a password, an MFA code or payment details on a new page.

Build QR code phishing detection training for employees

Train staff to report a QR email, not to judge it. The decision belongs on a managed machine, because a personal phone lacks employer protections.

  • Teach one rule: an unexpected QR code in email goes to the report button, not to the camera.
  • Show why eyeballing fails. Do not try to judge long, complex, unfamiliar, or internationalized URLs by eye.
  • Run a simulated QR email each quarter and track the report rate, not only the scan rate.
  • Close the loop. Tell the reporter what the code led to, so the next report comes faster.

How AegisAI handles this

AegisAI opens every link, file and QR code in a sandbox, follows it to the end, and judges what it finds there23. A QR code is decoded to a URL and detonated like any other link. When the destination hides behind a CAPTCHA or another gate, AegisAI treats the gate itself as evidence and never scores the hidden page clean.

How to measure it in 30 days

Track three numbers from the day you turn on the settings above.

  • Messages with a QR code URL delivered per week. In Microsoft 365 count rows in EmailUrlInfo where UrlLocation is QRCode; in Google Workspace count matching Gmail messages in the investigation tool.
  • Minutes from the first user report to the last copy removed. Read both times from the remediation history in the Defender portal, or from the investigation tool's action log.
  • Accounts that needed containment after a QR email. Count disabled accounts and revoked sessions per incident.

To compare those numbers with a second reader on your own tenant, see the demo page.

Questions people ask

How do you detect QR code phishing in email?

Decode the QR image to its URL on a managed machine, then judge where the URL lands after every redirect, by its registered domain. Hunt for other copies in Microsoft 365 with UrlLocation QRCode in EmailUrlInfo, or in the Google Workspace investigation tool.

What is quishing?

Quishing is phishing that hides the link in a QR code, usually as an image in the email body or inside a PDF. The URL is hidden inside an image, so text-based link checks do not see it until the code is decoded.

Does Microsoft 365 scan QR codes in email?

Defender records URLs it extracts from QR codes in the EmailUrlInfo table with UrlLocation set to QRCode, so you can hunt for them. ZAP removes delivered phishing it finds later, within the last 48 hours of delivered email.

Does Gmail scan QR codes in email?

Google's admin help names two related settings: discovery of links behind shortened URLs and scanning of images referenced by links. It does not describe QR decoding for attached images, so pair those settings with the investigation tool for clean-up.

What should I do if I scanned a QR code phishing link?

Report it to IT straight away and say whether you typed a password. If you did, IT disables the account and revokes active sessions, which invalidates access that uses the stolen credentials.

Should you block every email that contains a QR code?

No. A QR code alone should not automatically block a message. Block on the decoded destination and the request, and combine weak signals until the pattern is strong.

Sources

  1. SucuriLabs, How to detect QR phishing
  2. Security.org, Quishing
  3. AegisAI, Email phishing prevention
  4. UK National Cyber Security Centre, QR codes: what's the real risk?
  5. Microsoft Learn, EmailUrlInfo table in the advanced hunting schema
  6. Microsoft Learn, Zero-hour auto purge
  7. Microsoft Learn, Remediate malicious email delivered in Office 365
  8. Microsoft Learn, Respond to a compromised email account
  9. Google Workspace Admin Help, Advanced phishing and malware protection
  10. Google Workspace Admin Help, Take action based on search results
  11. SucuriLabs, How to verify URLs and QR codes
  12. AegisAI, Why a secure email gateway misses phishing
  13. AegisAI, CAPTCHA phishing detection
  14. AegisAI, Evasive phishing links and attachments
  15. AegisAI, Demo page

Recent posts

Every email, investigated.