Abuse Detection System Low-Level Design: Multi-Signal Risk Scoring, Account Takeover Detection, and Automated Response

Abuse Detection System Overview

An abuse detection system protects users and the platform from account takeover, credential stuffing, scraping, fake account creation, and payment abuse. The core mechanism is real-time risk scoring that combines multiple signals and triggers proportional responses — from CAPTCHA challenges to full account lockout.

Abuse Type Taxonomy

  • Account takeover (ATO): Attacker uses stolen credentials to log in as a legitimate user.
  • Credential stuffing: Automated tool tries username/password pairs from leaked databases across many accounts simultaneously.
  • Scraping: High-rate automated data extraction exceeding any legitimate use pattern.
  • Fake account creation: Bulk creation of inauthentic accounts for spam, manipulation, or fraud.
  • Payment abuse: Fraudulent transactions, card testing, chargebacks.

Account Takeover Signals

ATO events have characteristic patterns distinguishable from legitimate logins:

  • New device: Login from a device fingerprint not seen in the last 90 days for this account.
  • New location: Login from a country or city not in the account's location history.
  • Impossible travel: Same account logged in from New York and London 30 minutes apart — physically impossible. Calculated as distance between last login location divided by time elapsed; if result exceeds max human travel speed (~900 km/h for air), flag as impossible travel.
  • High-value action shortly after login: Password change, email change, or large transfer within minutes of a login from a new device — strong ATO indicator.

Credential Stuffing Detection

Credential stuffing targets many accounts, not just one. Detection operates at the population level:

  • Many failed logins across different accounts from the same IP or ASN within a time window.
  • Failed login rate per IP monitored with Redis sliding window counters.
  • Threshold exceeded → rate limit and serve CAPTCHA for subsequent attempts from that IP.
  • ASN-level blocking for persistent attackers using rotating IPs within the same network.

Multi-Signal Risk Scoring

Every authentication event is scored in real time by combining multiple signals:

  • Device fingerprint match score (does this device match known devices for this account?).
  • Geo velocity score (how unusual is this location relative to login history?).
  • Behavioral biometrics score (does typing pattern and mouse movement match the account owner?).
  • Login history score (is this login time/day pattern normal for this account?).
  • Network reputation score (is this IP on abuse databases?).

Signals combine into a risk score from 0 (safe) to 100 (high risk).

Risk-Based Authentication Challenges

Responses are proportional to risk score:

  • Low risk (0–30): Allow without additional friction.
  • Medium risk (31–70): Require 2FA (SMS/TOTP) or CAPTCHA challenge.
  • High risk (71–100): Block the session, invalidate all active sessions for the account, send security alert email to the registered address, require password reset before next login.

Behavioral Biometrics

Behavioral biometrics fingerprint how a user interacts, not just what they know:

  • Typing rhythm and keystroke timing patterns.
  • Mouse movement velocity and click patterns.
  • Touch pressure and gesture patterns on mobile.

A machine learning model trained on each account's historical behavior scores new sessions. Automation (bots) produces very different patterns from human users. Models run passively in the background without adding user friction for legitimate users.

Impossible Travel Detection

Implementation details:

  • Store last login timestamp and geolocation (lat/lng from IP geolocation) per account in Redis.
  • On each new login: compute Haversine distance from last location, divide by time since last login.
  • If implied speed exceeds 900 km/h (commercial air travel), flag as impossible travel.
  • Consider VPN/proxy as a prior: if last IP was a known datacenter IP, suppress impossible travel alert.

Automated Account Protection

When high-risk event is detected:

  1. Block the current session immediately.
  2. Invalidate all other active sessions for the account (force logout everywhere).
  3. Send security alert to the account's verified email and phone.
  4. Require identity re-verification (password reset + 2FA) before restoring access.
  5. Log the full event with all signals for forensic analysis.

Honeypot Accounts and Velocity Controls

Honeypot accounts are fake accounts seeded into the system. Any attempt to scrape, follow, or message a honeypot is a definitive abuse signal — no legitimate user knows these accounts exist. Attackers who interact with honeypots are immediately flagged.

Velocity controls impose hard limits: maximum N login attempts per account per minute, maximum M accounts per IP per day. These are enforced at the load balancer or API gateway layer before authentication logic runs.

{
“@context”: “https://schema.org”,
“@type”: “FAQPage”,
“mainEntity”: [
{
“@type”: “Question”,
“name”: “How do you design a multi-signal risk scoring system for abuse detection?”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “A multi-signal risk scorer aggregates signals across four dimensions: identity (account age, phone/email verification, prior enforcement history), behavior (velocity of actions, deviation from historical baseline, session anomalies), network (shared device/IP clusters, social graph proximity to known bad actors), and content (text, image, or link analysis). Each signal category produces a sub-score, and a calibrated ensemble model — typically a GBDT or a shallow neural network — combines them into a final risk score between 0 and 1. Signals are computed at different latencies: identity and network signals are precomputed and cached, behavior signals are computed in near-real-time from a streaming aggregation layer, and content signals are computed on-demand. The risk score feeds a policy engine that applies thresholds to trigger actions: low scores pass, medium scores add friction (CAPTCHA, 2FA prompt), high scores trigger automated enforcement.”
}
},
{
“@type”: “Question”,
“name”: “How do you detect account takeover attempts at scale, and what signals distinguish them from legitimate logins?”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “Account takeover (ATO) detection relies on detecting anomalies relative to an account's established behavioral baseline. Key signals include: new device or browser fingerprint not seen in the last 90 days, login from a geolocation inconsistent with recent activity (impossible travel: two logins from cities 5000km apart within 2 hours), credential stuffing patterns (high failure rate on many accounts from the same IP or ASN), and unusual post-login behavior (immediate password change, email forwarding rule added, high-value action within seconds of login). Machine learning models use these features alongside device signals and typing cadence biometrics. At the infrastructure level, a distributed rate limiter enforces per-IP and per-account login attempt limits. Risk-based authentication dynamically challenges logins with elevated scores using step-up MFA rather than blocking all suspicious attempts, balancing security with user friction.”
}
},
{
“@type”: “Question”,
“name”: “How do you design automated response pipelines for abuse detection that minimize false positives?”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “Automated response uses a tiered action ladder keyed to risk score confidence and severity. Low-confidence flags trigger passive monitoring or soft friction (CAPTCHA). Medium-confidence flags trigger reversible actions: temporary feature restriction, shadow-banning (user sees their content but others don't), or holding content in a review queue. High-confidence flags with a high-severity pattern (CSAM, credible threats) trigger hard enforcement: account suspension and escalation to a human trust & safety team. To minimize false positives, the system uses a conservative confidence threshold for hard actions and favors reversible actions. An appeal workflow allows users to contest enforcement and routes appeals to human reviewers. Model performance is monitored via a false positive rate dashboard; if FPR exceeds a threshold on a specific segment (e.g., new users in a country), an automatic rollback to a safer threshold is triggered. Shadow-scoring (running new models in parallel without acting) validates model quality before promotion.”
}
},
{
“@type”: “Question”,
“name”: “How do you handle adversarial adaptation in abuse detection when attackers evolve their tactics?”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “Adversaries observe enforcement signals and adapt: they rotate IPs, age accounts, mimic legitimate behavior, and obfuscate content. Defense strategies include: continuous retraining on fresh labeled data (weekly or triggered by detected concept drift via PSI or KL-divergence monitoring on feature distributions), hardening features against manipulation by using signals attackers can't easily fake (device hardware fingerprints, typing biometrics, payment instrument history), and deploying canary traps — honeypot accounts or content that only automated abusers would interact with, providing ground truth labels without human review. Adversarial training augments the training set with perturbed examples. A red team continuously probes the system to discover bypasses and feeds findings back into the model. Graph-based detection is particularly robust because gaming social graph signals (building genuine relationships) is expensive for attackers. The system also uses ensemble diversity — attackers who defeat one model are less likely to defeat all — and adds randomization to enforcement timing to prevent feedback-loop exploitation.”
}
}
]
}

See also: Meta Interview Guide 2026: Facebook, Instagram, WhatsApp Engineering

See also: Twitter/X Interview Guide 2026: Timeline Algorithms, Real-Time Search, and Content at Scale

See also: Snap Interview Guide

Scroll to Top