MSD0109 Account Takeover Detection

Design the account takeover detection system for a consumer platform with hundreds of millions of accounts. Attackers use credential-stuffing lists and phishing to log in with a user’s real password, so “correct credentials” is not proof of legitimate access. The system must decide in real time at login whether to allow, challenge (step-up auth), or block. After login, it must also decide whether suspicious account behavior (new device, changed payout address, unusual purchase) warrants a freeze.

How would you design this system? Cover the login-time risk score (device fingerprint, IP/ASN reputation, velocity, impossible travel, typing/navigation behavioral signals versus credential correctness), step-up authentication as the middle path between false accept and false block, post-login behavioral monitoring for the window where credentials were right but the actor is wrong, false-positive cost (locking out a traveling user), and adversary adaptation as defenses deploy.

Line-art scene: a traveling account owner, an attacker script with a leaked list of 10 million pairs, and a phisher with a fake login page all pass the same password check; a question mark asks who is typing, and a second question mark asks whether the session after login, with a new device, a changed payout address, and a 900-dollar gift-card order, still belongs to the owner

The Problem: the owner, a credential-stuffing script, and a phisher all pass the same password check, so the platform must decide who is really typing at login and whether the session is still the owner’s afterward.

Answer

The design is a layered risk engine that treats a correct password as necessary but never sufficient. A cheap edge tier absorbs credential-stuffing bursts with velocity counters before any model runs. A calibrated gradient-boosted model then scores every password-correct login from possession and context signals. Those signals include device history, IP/ASN reputation, impossible travel, behavioral cadence, and whether the exact username and password pair sits in a breach corpus. Two cost-derived thresholds map the score to allow, challenge, or block, and because a challenge costs cents while a wrongful lockout costs a support ticket, step-up absorbs nearly all of the gray zone. A session monitor keeps scoring after login, since phished cookies and correct-password attackers do their damage in the minutes after the gate.

(1) Credential Correctness Is One Feature: the score is built from what the attacker usually lacks (the owner’s device, network, location history, and typing rhythm) and not from the password check, which the attacker passes by construction.
(2) Edge Velocity Tier: per-IP, per-ASN, per-fingerprint, and global failure-ratio counters drop or tarpit stuffing bursts so the model path only sees plausible logins.
(3) Calibrated Score, Two Thresholds: a GBDT outputs a calibrated P(\text{ATO}), and thresholds derived from the costs of fraud, friction, and lockout split it into allow, challenge, and block.
(4) Risk-Adaptive Step-Up: pick the challenge the attacker most likely cannot pass, preferring a known-device prompt or passkey over SMS, and never block on a single soft signal like geography.
(5) Post-Login Session Monitor: re-score on every sensitive event (recovery change, payout change, high-value order), with step-up, cooling-off holds, and freezes that notify the owner on old channels.
(6) Label Loop With Exploration: delayed labels from “this wasn’t me” reports and chargebacks retrain the model weekly, and a small exploration budget keeps blocked traffic from becoming a blind spot.

Account takeover pipeline: a login request passes an edge tier that drops bot bursts, a risk model fed by a feature store, and a policy engine that routes to block, challenge, or allow; allowed sessions flow into a session monitor that can hold, step up, or freeze, and delayed labels feed weekly retraining of the risk model

Figure 1: The edge tier drops stuffing bursts, the calibrated risk model and policy engine route each login to block, challenge, or allow, and allowed sessions stay under a session monitor whose outcomes become delayed labels for weekly retraining.

Clarify Before Designing:
(1) Traffic & Scale: how many login attempts per day, what share comes from already-known devices, and how large are credential-stuffing bursts at peak?
(2) Latency Budget: how many milliseconds may the risk call add to the login path, and must post-login checks block a sensitive action synchronously?
(3) Available Factors: what fraction of accounts has a verified phone, a signed-in trusted device, or a passkey? That decides which challenges exist at all.
(4) What an Attacker Can Steal: stored cards, payouts, gift cards, or messaging reach? That sets the cost of a takeover and which post-login actions need holds.
(5) Label Sources: do we receive “this wasn’t me” reports, recovery claims, and chargebacks, and with what delay?
(6) Lockout Tolerance: what does a wrongful block cost in support load and churn, and is there a regulatory requirement such as strong customer authentication for payments?


Login to view more content
Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *