When untrusted callers cross a trust boundary, static SMS/push MFA fails against AiTM reverse-proxy phishing and push bombing; pair a <50 ms risk-scoring engine with origin-bound FIDO2/WebAuthn passkeys and number-matched push fallback.
TL;DR30-second simplified summary▾
Core Mechanics: Risk-Based Authentication (RBA) evaluates contextual signals at login time in <50 ms—device posture/cookie, IP reputation (Tor/VPN/residential proxy ASN), impossible travel (>800 km/h), and JA4 TLS fingerprint—and routes.
Visual & Structural Flow: Depicts Real-Time Risk Scoring & Authentication Decision Tree (LOW RISK (0-29) -> MEDIUM (30-69) -> HIGH (70-100)); Why WebAuthn Defeats Evilginx Reverse-Proxy Phishing (User Browser -> evil-login.com -> corp-idp.com).
Trade-Offs & Production: Compare MFA factors across phishing resistance, UX, and recovery complexity. Even with WebAuthn, a stolen session cookie (Set-Cookie) can be replayed from another machine.
Failure Modes & Application: Connect adaptive MFA to OAuth2/OIDC flows, JWT validation, and zero-trust service authentication.
What is Risk-Based MFA (RBA) & WebAuthn.
Why this matters: The mechanism: understand how Risk-Based MFA (RBA) & WebAuthn works from first principles.
Risk-Based Authentication (RBA) evaluates contextual signals at login time in <50 ms—device posture/cookie, IP reputation (Tor/VPN/residential proxy ASN), impossible travel (>800 km/h), and JA4 TLS fingerprint—and routes to frictionless SSO, number-matched push, or FIDO2/WebAuthn step-up.
FIDO2/WebAuthn signs a server challenge using a hardware/passkey private key cryptographically bound to the exact TLS origin (rpId), neutralizing reverse-proxy phishing.
Real-Time Risk Scoring & Authentication Decision Tree
Trusted corporate devices stay frictionless while anomalous sessions trigger origin-bound FIDO2 step-up.
Why AiTM Phishing Proxies and Push Bombing defeat legacy MFA.
Why this matters: The problem: see what breaks without Why AiTM Phishing Proxies and Push Bombing defeat legacy MFA under real concurrency or scale.
Credential stuffing and Adversary-in-the-Middle (AiTM) phishing proxies (e.g., Evilginx) relay passwords, SMS OTPs, and TOTP codes in real time, stealing the resulting Set-Cookie session token.
Meanwhile, MFA Fatigue (Push Bombing) floods a victim's phone with push prompts until they tap Approve by mistake.
Why WebAuthn Defeats Evilginx Reverse-Proxy Phishing
The browser signs the actual address-bar origin; an AiTM proxy on a lookalike domain cannot forge a valid rpId signature.
- Problem
- How to implement MFA & Risk-Based Authentication without hitting unbounded tail latency, state divergence, or operational fragility.
- Naive Solution
- Use a single unpartitioned path with unbounded retries and synchronous global coordination.
- Why It Fails
- Global coordination serializes throughput under load, while unbounded retries amplify transient stalls into full outages.
- Alternatives
- Compare synchronous strict-consistency paths against bounded asynchronous replication, local caching, or partitioned ownership.
- Engineering Decision
- When untrusted callers cross a trust boundary, static SMS/push MFA fails against AiTM reverse-proxy phishing and push bombing; pair a <50 ms risk-scoring engine with origin-bound FIDO2/WebAuthn passkeys and number-matched push fallback.
- Trade-Offs
- Gains predictable p99 latency and fault isolation in exchange for explicit bounding, observability, and slightly higher implementation complexity.
When MFA & Risk-Based Authentication experiences a sudden 5x traffic spike alongside a slow downstream dependency, which engineering choice best protects system stability?
Where Adaptive MFA applies (and where Workload Identity wins).
Why this matters: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.
Think of Where Adaptive MFA applies (and where Workload Identity wins) as the intuition layer for MFA & Risk-Based Authentication: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.
Use RBA + WebAuthn for human interactive logins; use cryptographic workload identities for machines.
| Choice | What it buys | What it costs |
|---|---|---|
| Good Candidate: Human SSO & High-Risk Transfers | Protects OIDC/SAML gateways, admin consoles, and financial transfers without punishing known MDM devices. | Must maintain offline break-glass recovery keys for P0 datacenter outages. |
| Avoid: Machine-to-Machine (M2M) Service Accounts | Use short-lived OIDC workload identity tokens, SPIFFE/mTLS certificates, or asymmetric JWTs. | Interactive MFA cannot run in headless automated pipelines. |
Deterministic Risk Evaluation & Number-Matched Push Fallback.
Why this matters: Operational control: configure bounds, failure handling, and safe production defaults.
Think of Deterministic Risk Evaluation & Number-Matched Push Fallback as the intuition layer for MFA & Risk-Based Authentication: Operational control: configure bounds, failure handling, and safe production defaults.
Evaluate ASN, impossible travel, and device trust in <50 ms, enforce WebAuthn rpId verification, and cap push attempts (e.g., max 3 per 15 min) with 2-digit number matching.
Deterministic Risk Evaluation & Number-Matched Push Fallback
def evaluate_login_risk(ctx: dict) -> str:
score = 0
if ctx["asn_type"] in ("tor_exit", "hosting_vps"):
score += 55
if ctx["travel_kmh"] > 800 and not ctx["known_corporate_vpn"]:
score += 45
if not ctx["trusted_device_binding"]:
score += 25
if score >= 70:
return "STEP_UP_WEBAUTHN_ONLY" # Block TOTP/SMS; require FIDO2
if score >= 30:
return "STEP_UP_NUMBER_MATCH" # 2-digit push or WebAuthn
return "ALLOW_SESSION"
Alternatives: FIDO2/WebAuthn vs. Number-Matched Push vs. TOTP/SMS.
Why this matters: The trade-off: compare competing approaches across latency, consistency, and operational cost.
Think of Alternatives: FIDO2/WebAuthn vs. Number-Matched Push vs. TOTP/SMS as the intuition layer for MFA & Risk-Based Authentication: The trade-off: compare competing approaches across latency, consistency, and operational cost.
Compare MFA factors across phishing resistance, UX, and recovery complexity.
Alternatives: FIDO2/WebAuthn vs. Number-Matched Push vs. TOTP/SMS
| Choice | What it buys | What it costs |
|---|---|---|
| FIDO2 / WebAuthn / Passkeys | Origin-bound (immune to AiTM phishing), zero server shared secrets, one-tap biometric UX. | Requires cross-device passkey sync or hardware backup keys for lost-device recovery. |
| Number-Matched Push MFA | Defeats blind MFA fatigue bombing by requiring the user to type a 2-digit screen code. | Still vulnerable to social-engineered real-time AiTM proxies if the user reads the code aloud/into a proxy. |
| SMS / TOTP | Universal fallback across any phone. | Vulnerable to SIM swapping (SMS) and real-time AiTM phishing relays (both). |
Device-Bound Sessions (DBSC) + Offline Break-Glass.
Why this matters: Production architecture: see how the components compose end to end under real load.
Think of Device-Bound Sessions (DBSC) + Offline Break-Glass as the intuition layer for MFA & Risk-Based Authentication: Production architecture: see how the components compose end to end under real load.
Even with WebAuthn, a stolen session cookie (Set-Cookie) can be replayed from another machine. Modern IdPs pair WebAuthn with Device Bound Session Credentials (DBSC) / mTLS token binding and keep hardware-key break-glass admin accounts outside the risk engine.
CGNAT False-Positive Tuning
Mobile carriers rotate CGNAT IPs across cities; weight device-bound cookies and JA4 TLS fingerprints higher than raw GeoIP city hops.
Rate-Limit Push Prompts
Cap push notifications at 3 per 15 minutes and auto-lock/alert on repeated denials.
Related Security & Identity Concepts.
Why this matters: Applied problems: connect these internals to concrete system design and debugging scenarios.
Think of Related Security & Identity Concepts as the intuition layer for MFA & Risk-Based Authentication: Applied problems: connect these internals to concrete system design and debugging scenarios.
Connect adaptive MFA to OAuth2/OIDC flows, JWT validation, and zero-trust service authentication.
Related Security & Identity Concepts
Practice: Make the trade-off yourself.
Why is FIDO2/WebAuthn immune to Adversary-in-the-Middle (AiTM) reverse-proxy phishing attacks like Evilginx?