Security

Mirage2FA: The Microsoft 365 Phishing Kit That Bypasses Conventional MFA

OrasecAugust 26, 20264 min read

Written by the OraSec security research team — offensive security engineers and penetration testers.

mirage2fa-microsoft-365-phishing

<span style="white-space: pre-wrap;">Mirage2FA turns a Microsoft 365 phishing page into a live relay, capturing the session cookie after the user has already passed MFA.</span>

Your user got the phishing email and was careful. They checked the login page, entered their password, approved the MFA prompt, and signed in.

The attacker could then reuse the stolen authenticated session.

What Is Mirage2FA?

Mirage2FA is a phishing-as-a-service toolkit built to steal Microsoft 365 credentials and sessions through adversary-in-the-middle (AiTM) attacks. ANY.RUN attributes the Mirage2FA brand/operator to "LinX Coders" based on recurring LINX markers, bot names, and related infrastructure. (ANY.RUN)

An AiTM attack does not guess the password or defeat the MFA code. It sits between the user and Microsoft, relaying everything in real time. The victim genuinely logs in, and the attacker copies the session cookie that login produces.

How Does the Attack Work?

The chain is short and entirely browser-based:

  1. A phishing email delivers an .htm, .xhtml, or .svg attachment, or a QR code
  2. Opening it runs obfuscated script that decodes the recipient's email address
  3. The script fetches harvesting logic from the attacker's infrastructure
  4. A counterfeit Microsoft 365 login page appears, backed by a reverse proxy
  5. The victim enters their username, password, and MFA challenge or code
  6. Credentials relay to real Microsoft services over a WebSocket
  7. Authentication succeeds, and the attacker captures the session cookie
  8. The stolen session may let the attacker access Microsoft 365 without repeating the password and MFA flow until the session is revoked, expires, or is otherwise invalidated

No malware executable is involved. ANY.RUN's samples were dominated by browser-readable files. Obfuscation was especially common in the .htm samples: 453 of 629 were obfuscated. ANY.RUN also observed obfuscated .xhtml and .svg samples.

Why Does It Matter?

MFA remains worth having. It is not sufficient on its own here, because the attack does not target the second factor. It targets what the second factor produces.

ANY.RUN identified 9,426 targeted email addresses, with 4,532 potentially compromised, or about 48%. Its dataset contained 9,332 potential compromise events, including 4,561 cookie-theft events, 3,044 password/2FA events, and 1,339 SSO logins. (ANY.RUN)

63.7% of the identified victims were in the United States. Technology accounted for 19.2% of observed activity, manufacturing 11.1%, and education 9.9%. (ANY.RUN)

Common Mistakes

  • Treating MFA as the finish line. It raises the cost of an attack but does not close this route.
  • Resetting the password and stopping there. A password reset alone may not remove stolen session access. Response teams should revoke active sessions and tokens and investigate activity performed through the account. (ANY.RUN)
  • Trusting attachment type as a safety signal. An .svg is treated as an image but can carry script.
  • Assuming users will spot the page. The proxy serves genuine Microsoft content, so it looks right.
  • Not checking what happened after access. After session theft, review mail-forwarding rules and OAuth grants because they may provide additional or persistent access. ANY.RUN specifically recommends checking both during response. (ANY.RUN)

How to Reduce the Risk

  • Move high-risk accounts to phishing-resistant authentication such as passkeys/FIDO2 security keys, Windows Hello for Business, or certificate-based authentication (Microsoft Learn)
  • Block or quarantine .htm, .xhtml, and .svg email attachments where feasible
  • Use Conditional Access, Continuous Access Evaluation, and Microsoft Entra Token Protection where supported. Do not rely on shorter token lifetimes alone. Microsoft notes that CAE can revoke access near real time after critical events, while Token Protection reduces token replay by binding supported tokens to a device. (Microsoft Learn)
  • Alert on unusual sign-in locations, impossible travel, and new OAuth grants
  • Treat session theft as an identity incident, not a password incident
  • Train staff that a successful login does not prove the page was genuine

What Should Security Testing Cover?

Ask your testers to establish:

  • Whether a proxied login page can capture a working session for your tenant
  • What a stolen session reaches before an alert fires
  • Whether session revocation is part of your response process
  • Which accounts still rely on OTP-based MFA
  • Whether new mail rules or OAuth grants would be noticed

How OraSec Can Help

OraSec tests the identity layer the way attackers approach it. We assess how far a captured session reaches, whether detection catches the sign-in, and whether your response actually invalidates access. You get a demonstrated path, not a policy review.

Conclusion

Mirage2FA is not a new idea, but it is a well-packaged one sold as a service and used at scale.

The lesson is narrow and useful. If your MFA produces a session cookie that can be relayed, MFA alone is not enough. Move critical accounts to phishing-resistant methods and make token revocation part of your standard response.

FAQs

Does MFA still help? Yes. It stops credential stuffing and password reuse. It does not stop a real-time proxy that captures the resulting session.

Would passkeys have prevented this login-relay attack? Phishing-resistant passkeys use origin-bound public-key cryptography, so credentials created for the real Microsoft sign-in origin cannot simply be replayed through an attacker-controlled phishing origin. (Microsoft Learn)

Why are SVG files a problem? SVG is an image format that can also contain active script when opened as a document. Mirage2FA used SVG files as browser-based stagers, so security teams should not automatically treat .svg attachments as harmless. (ANY.RUN)

How do we know if we were affected? Review sign-in logs for unfamiliar locations or devices, and check for mail-forwarding rules and OAuth grants nobody asked for.

Explore related services

Need hands-on help? Our security testing services put this research into practice.

bgp-hijack-virtualizor-update

BGP Hijack Delivered a Backdoored Virtualizor Update

The update came from the right domain over valid TLS. The route to the vendor had been stolen, so the traffic reached an attacker-controlled server instead. What Happened? Between 28 and 30 August 2026, attackers announced a BGP route they had no authority over, pulling Softaculous update traffic to a server they controlled. Any Virtualizor installation that checked for updates during one of the diverted routing intervals could have received the backdoored package. AlbaHost, a hosting provid

·4 min read
jfrog-artifactory-vulnerability

JFrog Artifactory Vulnerability: Exploited in Three Days

JFrog released patches on 28 August 2026. By 1 September, watchTowr was publicly reporting active exploitation — roughly three and a half days after disclosure. What Is the Vulnerability? CVE-2026-82329 is an authentication bypass in JFrog Artifactory, rated CVSS 9.8. In default configurations, an unauthenticated attacker with network access can obtain administrative privileges, with no user interaction required. Self-hosted deployments require customer action. JFrog says affected cloud envi

·3 min read
dll-sideloading-signed-software

DLL Sideloading: How ValleyRAT Hides Behind Signed Software

The malicious code was not signed. The program that loaded it was. What Is DLL Sideloading? When an application loads a DLL by name rather than a fully qualified path, Windows searches a defined set of locations. If an attacker can place a malicious DLL in a directory searched before the legitimate copy, the application may load it. Microsoft documents this as DLL preloading/binary planting behavior. (Microsoft Learn) The signed executable runs. The signature checks out. The malicious DLL ex

·3 min read