# Real-time proxy MFA relay (AiTM)

Post-MFA tokens replayed from hosting ASNs, odd device names/builds, and device registrations that outlive password resets

_Area: Web authentication and account takeover. Seen in 4 disclosed reports; latest 2026-12-03. Updated 2026-12-05._

## How it works
MFA proves a human approved a login, not that the token stays with that human. In an adversary-in-the-middle (AiTM) relay, the attacker's proxy sits between victim and real IdP, forwarding credentials and the genuine MFA challenge in real time. The IdP is satisfied and issues a post-MFA session token — but the proxy sees it first and keeps it. The broken assumption: possession of a valid token equals the legitimate user. Tokens are bearer credentials, replayable from any host without re-passing MFA [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md).

## Where it shows up
- Sign-ins from cloud-VPS/hosting ASNs using `node`, `axios`, or bare `Mozilla/5.0` user agents [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)
- Microsoft Office / Authentication Broker client IDs used from non-native tooling [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)
- Device names like `DESKTOP-`+8 hex (not Windows' 7-char default) or stale hardcoded builds (ROADtools 10.0.19041.928) with no hardware identifiers [E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)[E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md)
- Device Registration Service / PRT issuance shortly after a token replay [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)[E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md)
- Two distinct ASNs (cloud-VPS then residential) authenticating the same user within minutes [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)
- Org-tailored `{company}.*` subdomains posing as SSO/passkey/IT portals; renamed AiTM handlers (`api_*.php`) [E3](https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md)

## How to review
Check the invariant: every session token must be bound to the device and client that completed MFA, and any new device registration or MFA-method change must require re-authentication, not just a bearer token. Ask: can a stolen refresh token mint a PRT or register a device? Does that PRT survive password reset and satisfy Conditional Access? [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md) Treat token replay from a new ASN/UA as a boundary crossing, not normal roaming.

## How finders spotted it
- Decompiled kit JavaScript to map anti-analysis layers, then correlated sign-in, token, and device telemetry to fingerprint relay vs operator console [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)
- Flagged sign-ins from a hosting /24 with `node` UAs and non-standard `DESKTOP-`+8hex names, plus OAuth2:Token replays to Graph/Exchange/Device Registration [E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)
- Tracked impersonation subdomains and shared kit endpoints; pivoted on extension hashes to a second variant sharing C2 [E3](https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md)
- Correlated device-code-phishing incidents with Entra audit logs showing ROADtools' hardcoded build and no hardware IDs, then pivoted on device name/build across tenants [E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md)

## Variants seen
- Reverse-proxy AiTM relaying real MFA, minting device-bound PRTs [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)
- Token spray/replay of captured post-MFA tokens from rented IPs [E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md)
- Vishing into AiTM proxies plus rogue MFA enrollment and sideloaded browser extension [E3](https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md)
- Device-code phishing yielding tokens that register rogue Entra devices [E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md)

## Why fixes fail
Password resets don't evict PRTs obtained without the password [E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md); session revocation is bypassed by PRTs that survive it [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md); rotated IPs and VPN hosts evade replay detection [E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md).

## Impact and severity
Full account takeover and business email compromise: 79 orgs [E2](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md), 326 identities across 305 orgs [E4](https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md), extortion via cloud data theft [E3](https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md). Severity rises with persistence (rogue MFA/devices, OAuth apps) and reach (token brokering to any first-party client) [E1](https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md)[E3](https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md).

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **ROADtools** (version not stated): M365 Device Code Phishing Campaign Leads to Hundreds of Rogue Entra ID Registrations. Report: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md
- **Microsoft Entra ID** (version not stated): M365 Token Spray and Replay Campaign Compromises Business Email Accounts. Report: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md

## Evidence
- E1: https://bugbountylibrary.com/r/blog%3Aelastic-co-security-labs-threat-command-tycoon-2fa-aitm-detection-engineering.md
- E2: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-token-replay-spray.md
- E3: https://bugbountylibrary.com/r/blog%3Aunit42-paloaltonetworks-com-com-affiliate-vishing-attacks.md
- E4: https://bugbountylibrary.com/r/blog%3Ahuntress-com-blog-device-code-phishing-m365-registrations.md
