SquarePhish 2.0
Where
Talks
Disobey 2026
Duration
23 min
Shows how QR code lures and device code flow capture Microsoft tokens and convert them into primary refresh tokens.
Summary
The talk revisits device code phishing, where an attacker starts a Microsoft device code sign-in and the victim completes it on a legitimate login page, yielding post-authentication tokens that arrive after MFA. The speakers explain why earlier approaches struggled with the flow's 15-minute expiry and with getting consent for SMS lures, and why QR codes hide the malicious link and shift scanning to a phone outside corporate controls.
They present SquarePhish 2.0, a rewrite from Python command line to Go with a web portal for managing campaigns, configuration and captured tokens. The first email carries a QR code that does not expire and only triggers the server; a second email, sent once the victim is already engaged, carries the device code, which keeps the window tight. The update defaults to the authentication broker client ID, automates device registration and converts a refresh token into a primary refresh token, which gives single sign-on access. A new option applies a technique from Dennis Kneep that enters the code automatically for federated users. A live demo walks through the full chain, from inbox to a browser signed in with the PRT.
For defenders, the talk recommends hunting for the broker client ID in device code logs, allow-listing rare legitimate uses, and blocking device code flow through conditional access. Location limits, compliant or hybrid-joined device requirements and impossible travel alerts are also suggested.
Related talks
Talks·50 min
Mike Bailey · Ariyan Suroosh
Explains how red teams combine phone pretexting, spoofed caller ID and self-hosted telephony to gain initial access.
Talks·45 min
Dr Nestori Syynimaa
Shows how stolen signing keys and primary refresh tokens let attackers forge logins and bypass MFA in Entra ID.
Talks·41 min
Wietze Beukema
Shows how small command-line changes slip past EDR rules, and how a fuzzed model of Windows binaries generates working obfuscations.


