Risk-based authentication and step-up challenges
Scoring each sign-in from signals such as the device, the IP address and the account's location history, then allowing, challenging or blocking on that score. Step-up asks for stronger or more recent authentication before a risky action inside a session.
What it is
Risk-based authentication stops treating each sign-in the same way; Auth0 sells a version of it under the name Adaptive MFA. The server collects signals about the attempt, turns them into a confidence score, and picks one of three outcomes: let the user in, ask for something more (a second factor or a puzzle), or refuse. OWASP's credential stuffing guidance lists the situations that usually earn the extra ask: a browser, device or IP address the account hasn't used before, an unusual country, an IP on a denylist or behind a proxy or VPN service, an IP that has tried many accounts, and traffic that looks scripted. Auth0's product combines three assessments (NewDevice, UntrustedIP and a travel-speed check) into an overall confidence, and in its default policy a low confidence requires MFA while medium and high do not.
| Signal | What it compares | What a hit suggests |
|---|---|---|
Device fingerprint | Headers (OS, browser, language) plus JavaScript-visible traits (screen, fonts, plugins) against the account's remembered devices | A new device; prompt for more, don't block, since people own several devices |
IP reputation and class | The address against denylists, anonymizer lists (Tor, VPN) and hosting-provider ranges | Someone hiding their origin or running from a server, not a home connection |
Location against history | Two sign-ins from distant places, weighing the time between them against the travel time and whether a location is unusual for this user (Entra ID Protection's atypical travel detection) | Two different people using the same credentials |
Unfamiliar properties | IP, ASN, location, device and browser against the account's past sign-ins | Someone other than the owner may be signing in; it is a signal to weigh, since owners change devices and networks too |
Velocity across accounts | How many accounts one IP, subnet or connection fingerprint has tried | A spray or stuffing run, even when each account sees a single attempt |
Leaked credentials | The user's valid credentials against known breach dumps | The password is already in attackers' hands; force a change |
Signals from the client can be faked. The user agent is trivial to spoof and JavaScript fingerprints can be spoofed with more effort, so treat device fingerprinting and JavaScript challenges as one layer among several, and have each defense emit metrics of what it detected and what it mitigated so you notice when a layer stops working. Connection fingerprinting (JA3, HTTP/2 settings, header order) tends to be more accurate because it describes how the connection was made rather than what the client claims: a user agent that says iPhone over a connection shaped like a Python script is a strong hint.
Step-up moves the question from sign-in time to the moment a session tries something that matters: does the authentication behind this session meet the strength or recency this action needs? Large currency transactions and privileged configuration changes are the usual examples: the session was fine for browsing, but this action needs a fresh or stronger factor. The trigger can be a policy on the action, a risk evaluation of the request, or both. RFC 9470 standardizes the hand-off for OAuth APIs. The resource server rejects the request with the error code insufficient_user_authentication and may add acr_values (the strength it wants) and max_age (how recent the authentication must be) to the WWW-Authenticate challenge; the client sends the user back to the authorization server with those parameters and returns with a token that meets them.
Some detectors are too slow to run while the user waits. Microsoft's Entra ID Protection documentation labels each of its detections real-time or offline: anonymous IP and unfamiliar sign-in properties are scored in real time and can gate the sign-in, while leaked credentials and the travel check that comes from Defender for Cloud Apps are computed offline and raise the user's risk afterwards. For your own design that means two paths: a synchronous score on the hot path built from cheap lookups, and an asynchronous pipeline over the sign-in log that can force a password reset or revoke sessions when a slower detector fires.
When to use it
Reach for risk scoring when you face credential stuffing or password spraying against a large user base. The three attacks differ in shape: brute force tries many passwords against one account, stuffing tries leaked username and password pairs, and spraying tries one weak password across many accounts. The last two can be spread thinly, touching each account just once or twice, and then a per-account failure counter sees nothing unusual. Attack toolkits also route through proxy networks so that each IP sends a low volume, which defeats per-IP limits and blocklists. What does notice the attack is correlation: the failure rate across all accounts, the share of attempts coming from hosting-provider or proxy ranges, and connection fingerprints that don't match the claimed browser. OWASP's example mitigation is to require a CAPTCHA from any request that originates in a hosting provider's address space.
Make the response graduated and temporary rather than a single volume threshold. Thresholds should consider both short bursts and long, low-and-slow patterns, move with IP class and geolocation, and expire once the abuse stops. Store each account's IP sign-in history, and if an address that recently signed in lands on a mitigation list, lock the account and tell the owner. Telling users about unusual security events also turns them into a detector: the owner knows whether they were in that city.
Pay the real user as little as possible. A person who signs in from a new phone should see one challenge, after which the device is remembered and the next sign-in from it is familiar. People use several devices and browsers, so a fingerprint mismatch should prompt rather than block, and users should be able to view their device history and remove devices they don't recognize. A puzzle is cheaper than a second factor but weaker: CAPTCHA-solving services break them often enough that it's better to show one just to suspicious attempts, and to watch solve rates for both frustrated humans and suspiciously perfect bots.
Decide what happens when the scoring service is slow or down before it happens. A fail-open sign-in path lets an attack through during the outage; a fail-closed one locks out legitimate users. Failing open or failing closed covers how to pick. Our advice: fall back to a cheaper rule (challenge anything from a hosting range, allow remembered devices) while the scorer is unavailable.
When not to
Don't use risk scoring as a reason to skip MFA where you could simply require it. OWASP calls MFA the most effective defense against password attacks and notes that even when not all users can be made to enroll, administrators should be. For admin consoles, payment operators and other high-value roles, a required factor on each sign-in is simpler and safer than a score that might read a careful attacker as familiar.
Don't make the step-up a second knowledge factor. ASVS 5.0 excludes security questions as an additional challenge, and adding a PIN or memorable word to a password is still one kind of factor, not two. If a secondary secret exists for legacy reasons, verify the whole secret rather than selected characters.
Detectors that compare a sign-in with the account's own history have little to work with for a new account. Entra's unfamiliar sign-in detection sits in a learning mode for a new user, five days at minimum, and a long-idle user can drop back into it. In your design that means a brand-new account leans on signals that need no personal baseline (IP class, connection fingerprint, velocity across accounts, threat intelligence), and account creation itself needs its own abuse controls. And for a small internal tool with a few hundred users, mandatory MFA plus plain rate limits is a better use of effort than a signal pipeline you'd have to tune.
Compared
| Defense | What it notices | Cost to a real user | When it is the right choice |
|---|---|---|---|
Per-account lockout after N failures | Brute force against one account | The owner is locked out after someone else's guesses | As a floor under everything else; it misses one attempt per account |
Per-IP rate limit or block | High volume from one source | Shared NAT and office networks get caught | Less sophisticated attacks; keep blocks temporary and don't make it the main defense |
CAPTCHA on each sign-in | Simple bots | Friction for everyone; solver services exist | When MFA is not possible and the audience accepts puzzles |
MFA on each sign-in | Most password-based attacks, since a stolen password is not enough on its own | A factor on each sign-in | Administrators, high-value roles, and anywhere enrollment is feasible |
Risk-based challenge | Anomalies against history and IP intelligence | A challenge on unfamiliar sign-ins, none on remembered devices | A large consumer base where universal MFA is not practical |
Step-up on the action (RFC 9470) | A session reaching a high-risk operation | A fresh factor at transfer or settings time | Long-lived sessions where actions differ widely in risk |
In a picture
Step 1 of 4
Just a password
The starting point: a correct password opens a session. This path treats a sign-in from a leaked credential list exactly like the owner's own.