QR code phishing: how to analyze and contain quishing
By Hari PatelPublished Updated
Quishing (QR code phishing) is a phishing email that hides its link in a QR code, so the click happens on a phone outside your mail filter, proxy and EDR. The code usually leads to a credential or adversary-in-the-middle page, so the evidence of compromise is in sign-in logs, not click logs.
A QR code moves the link out of the text where filters look and onto a phone where your proxy and EDR can't see. Triage has to decode the image, judge the destination, and find the sign-in that followed.
Drop the reported email and QR codes in its images are decoded in your browser, then unwrapped and checked like any other link.
Decode a QR code safelyOn this page
How a quishing lure reaches a phone
- EmailA lure about MFA, benefits, a document or a payment carries a QR code in an image, a PDF or an HTML table.
- ScanThe user scans it with a personal phone, outside Safe Links, the web proxy and endpoint protection.
- GateA CAPTCHA or bot check shows scanners and desktop browsers a harmless page.
- Sign-in pageA fake or proxied Microsoft or Google sign-in collects the password and the MFA response.
- SessionAn adversary-in-the-middle kit keeps the session cookie and replays it from attacker infrastructure.
- EvidenceA successful mobile sign-in from a new IP soon after delivery is often the only trace.
Why does quishing get past email filters?
The code sits in an inline image, inside an attached PDF or Word document, or is drawn as an HTML table of black and white cells that no image scanner sees. The user scans it with a personal phone, outside Safe Links, the web proxy and endpoint protection.
The lures are built for a phone: re-register MFA, enroll in benefits, sign a document, pay a parking fine, listen to a voicemail. The destination is usually a credential page, often an adversary-in-the-middle proxy that steals the session as well as the password.
How do you decode a phishing QR code safely?
- 01Do not scan it with your own phone.
- 02Decode the image offline. The workbench decodes QR codes in the message in your browser and adds the result to the link list.
- 03Treat the decoded text as a link: unwrap redirectors and rewriters with the URL decoder, note the recipient's address if it is embedded (often base64 in the fragment), and check the domain's age.
- 04Expect a gate. Many kits put a CAPTCHA or bot check in front of the page and show scanners and desktop browsers a harmless page, so a clean scan does not clear the link.
Containment
Purge the messages and block the domain at the mail gateway and DNS filter, but remember the phone may never touch either. The control that works is identity: revoke sessions for any recipient with a successful sign-in from a new IP after delivery, then reset the password and check for new MFA methods. The AiTM session token theft playbook walks through the sign-in, token and mailbox logs for each account. For the long term, require compliant devices or phishing-resistant MFA for the apps these kits target.
How each role works it
- SOC analyst
- Decodes the code, rates the destination, and searches for the campaign by sender and subject rather than URL, since QR campaigns often vary the code per recipient.
- Incident responder
- Assumes the click is invisible and pivots to sign-ins: a successful sign-in from a mobile user agent and a new IP shortly after delivery is the compromise signal.
- DFIR
- Keeps the original image and the decoded URL as evidence, and correlates sign-ins, token issuance and mailbox audit events on any account that signed in.
- Malware analyst
- Usually no payload. When the URL serves a file, often an Android package, it is analyzed statically and in a mobile sandbox.
What the workbench checks
Drop the reported email into the free workbench and these are checked in your browser before you read a line. Nothing is uploaded.
- Decodes QR codes in images in the message and adds them to the links
- Flags QR codes in credential, MFA, benefits and payroll lures
- Unwraps, scores and looks up the decoded URL like any other link
- Writes the sign-in hunt for every recipient
Hunting queries
KQL to scope the campaign and look for impact. The workbench writes these with the real sender, subject, domains and hashes filled in.
EmailUrlInfo
| where Timestamp > ago(7d) and UrlLocation == "QRCode"
| join kind=inner (
EmailEvents
| where Timestamp > ago(7d)
| project NetworkMessageId, RecipientEmailAddress, SenderFromAddress, Subject, DeliveryLocation
) on NetworkMessageId
| summarize Recipients = dcount(RecipientEmailAddress), Subjects = make_set(Subject, 5)
by UrlDomain, SenderFromAddress
| sort by Recipients desclet recipients = EmailEvents
| where Timestamp > ago(7d) and Subject has "benefits enrollment"
| distinct RecipientEmailAddress;
SigninLogs
| where TimeGenerated > ago(7d) and ResultType == "0"
| where UserPrincipalName in~ (recipients)
| where tostring(DeviceDetail.operatingSystem) has_any ("iOS", "Android")
| project TimeGenerated, UserPrincipalName, IPAddress, AppDisplayName, UserAgent,
Country = tostring(LocationDetails.countryOrRegion)
| sort by TimeGenerated ascDefender XDR advanced hunting with Microsoft Sentinel connected (unified portal). In Sentinel alone, use TimeGenerated for Timestamp.
Questions
Can email filters read QR codes?
Most major filters now decode QR codes in images. Attackers respond by putting the code in a PDF or document, splitting it across images, or drawing it with an HTML table, which is why triage still has to look.
A user scanned the code. Is changing the password enough?
No. Many quishing pages are adversary-in-the-middle proxies that capture the session cookie. Revoke the user's sessions first, then reset the password and remove any MFA method the user did not add.
Is a QR code in an email always malicious?
No. Event tickets, payment slips and some marketing use them. A QR code that asks the reader to sign in, re-register MFA or open a document is a different matter.
References
- MITRE ATT&CK T1566.002 Spearphishing Link
- Microsoft: EmailUrlInfo table
- MITRE ATT&CK T1557 Adversary-in-the-Middle
Related on WETNav