Single Sign-On and identity management built for developers, organizations, and enterprises. Explore documentation →
Logo

Stopping Automated Credential Stuffing and Residential Proxy Bots at Login

Why naive IP rate limiting fails against distributed residential proxy botnets—and how layered telemetry, passkeys, and breached-password checks win.

AT
SSO.ID Authentication Team
Credential & WebAuthn Engineering · 2026-11-02 · 8 min read
LinkedIn Share
Why This Matters Right Now

Modern credential-stuffing operations rent millions of compromised residential and mobile-carrier proxy IPs to replay billions of leaked username-and-password pairs at a stealthy trickle of one request per IP. Traditional per-IP rate limits never fire, while naive account lockouts hand attackers an effortless Denial-of-Service weapon against legitimate customers.

Key Takeaways

  • Residential proxy botnets defeat per-IP rate limits by distributing attacks across clean consumer ISP addresses at low per-IP velocity.
  • Effective login defense correlates orthogonal signals: JA4 TLS/HTTP2 fingerprints, ASN clustering, password-spray hash velocity, and per-account exponential backoff.
  • Privacy-preserving k-anonymity breached-password screening stops reused leaked credentials at signup, password reset, and login without exposing plaintext secrets.
  • Identifier-first login flows paired with FIDO2 passkeys remove password validation from the hot path entirely, making credential stuffing mathematically obsolete.

Why Naive IP Rate Limiting Collapses Against Residential Proxy Botnets

Ten years ago, credential-stuffing bots originated from cheap cloud data-center VPS ranges, making static IP throttling and ASN blocklists straightforward. Today, automated checker tools such as OpenBullet and headless Playwright farms route combo lists through vast residential proxy networks populated by infected home routers, smart TVs, and SDK-monetized mobile apps. Each authentication request arrives from a genuinely clean consumer broadband or 5G IP address and sends only one or two login attempts per hour.

When engineering teams respond by tightening hard account lockout rules—for example, locking any account for 60 minutes after five wrong passwords—attackers pivot to low-and-slow password spraying (trying one popular password across 50,000 usernames) or weaponize the lockout mechanism to intentionally deny service to high-profile customers. Stopping modern bot traffic requires shifting from crude IP counters to multi-dimensional behavioral and cryptographic controls.

  • Residential proxies routinely rotate across 100,000+ clean consumer IPs, keeping every individual source address well below static IP rate limits.
  • Password-spraying attacks try one leaked or seasonal password across thousands of accounts to stay below per-account failed-login thresholds.
  • Hard unmitigated account lockouts create self-inflicted DoS vulnerabilities when attackers target public executive or admin email addresses.
  • Account enumeration leaks—such as returning 'User not found' vs. 'Wrong password' or measurable response-time deltas—let bots prune valid email lists cheaply.

Multi-Dimensional Velocity Controls and Network/TLS Fingerprinting

Defeating distributed stuffing requires bucketing telemetry across dimensions attackers cannot cheaply randomize in tandem. While a botnet can swap residential exit IPs on every request, its underlying HTTP client library, TLS cipher order, ALPN negotiation, and HTTP/2 header framing often remain identical across thousands of requests. Aggregating failure ratios by JA4 TLS fingerprint, /24 IPv4 or /48 IPv6 subnet, and target password-candidate hash exposes coordinated botnets within seconds even when every single source IP is unique.

Replace blunt permanent account locks with progressive, identity-aware friction. Track separate counters for known-good device cookies versus unknown clients: if an unknown client triggers repeated failures against an email, apply exponential backoff, require an invisible proof-of-work or bot challenge, and trigger MFA step-up—without blocking the legitimate owner signing in from their recognized device. Simultaneously normalize error messages and run a dummy hash verification on nonexistent accounts to eliminate timing-based user enumeration.

  • Bucket login failure ratios by JA4 TLS fingerprint and HTTP/2 signature to catch automated frameworks rotating across thousands of residential proxies.
  • Detect horizontal password spraying by tracking distinct usernames failing with the same candidate password hash (keyed with a server HMAC secret) over rolling 10-minute windows.
  • Exempt recognized, previously verified devices from aggressive lockout penalties triggered by external stuffing traffic.
  • Return identical generic failure messages and equalize hash execution time for nonexistent emails to stop automated account enumeration.
json
{
  "loginThreatDefense": {
    "bruteForcePolicy": {
      "maxFailedLoginAttempts": 5,
      "lockoutDurationMinutes": 15,
      "exemptTrustedDevicesFromLockout": true,
      "constantTimeUnknownUserDummyHash": true
    },
    "botAndSprayProtection": {
      "ja4FailureRatioThreshold": 0.85,
      "minSampleSizePerJa4": 25,
      "passwordSprayDistinctUsersWindow10m": 12,
      "actionOnBotAnomaly": "challenge_or_block_429"
    },
    "geofencing": {
      "mode": "BlockSelected",
      "blockedCountries": ["KP", "IR"],
      "impossibleTravelDetection": true
    }
  }
}

k-Anonymity Breached-Password Screening and Risk-Adaptive Friction

Credential stuffing only succeeds because humans reuse passwords across breached third-party sites. Screening candidate passwords against known breach corpora at registration, password change, and suspicious login events stops compromised credentials before attackers can exploit them. Using the k-anonymity range model, your authentication service computes the SHA-1 hash of the candidate password locally, sends only the first five hex characters (a 20-bit prefix) to the breach intelligence service, and checks the returned suffix list in memory—guaranteeing plaintext passwords and full hashes never leave your infrastructure.

When an existing user logs in with a password found in a fresh breach dataset, do not silently lock them out without explanation. Enforce an immediate step-up MFA check (preferring Passkey or TOTP), prompt an inline password rotation or passkey upgrade, and record a breached-credential alert in your security telemetry. Pair this with risk-adaptive bot challenges that remain completely invisible to low-risk human browsers while stalling automated headless drivers.

  • Screen passwords via k-anonymity 5-character SHA-1 prefixes at signup and password reset to eliminate known breached credentials at the source.
  • If a live login matches a newly breached password, force MFA step-up and mandatory credential upgrade immediately upon verification.
  • Avoid unconditional visual CAPTCHAs on every login; trigger friction only when TLS fingerprint, velocity, or IP/ASN risk signals elevate.
  • Combine disposable email domain blocking with bot telemetry on signup endpoints to keep fake bot accounts out of your directory.
csharp
public async Task<bool> IsPasswordCompromisedAsync(string plaintextPassword, HttpClient http, CancellationToken ct)
{
    byte[] sha1Bytes = SHA1.HashData(Encoding.UTF8.GetBytes(plaintextPassword));
    string hex = Convert.ToHexString(sha1Bytes); // Uppercase 40-char hex
    string prefix = hex[..5];
    string suffix = hex[5..];

    using var req = new HttpRequestMessage(HttpMethod.Get, $"https://api.pwnedpasswords.com/range/{prefix}");
    req.Headers.Add("Add-Padding", "true"); // Prevents response-length side channels

    using var res = await http.SendAsync(req, ct);
    res.EnsureSuccessStatusCode();
    string body = await res.Content.ReadAsStringAsync(ct);

    foreach (ReadOnlySpan<char> line in body.AsSpan().EnumerateLines())
    {
        int colon = line.IndexOf(':');
        if (colon <= 0) continue;

        if (line[..colon].Equals(suffix, StringComparison.OrdinalIgnoreCase) &&
            int.TryParse(line[(colon + 1)..], out int count) && count > 0)
        {
            return true;
        }
    }
    return false;
}
Security Guidance

Always include the Add-Padding: true header when querying k-anonymity breached-password range APIs so network observers cannot infer password popularity from encrypted TLS response sizes, and cache prefix range responses briefly in memory to keep login latency minimal.

Closing the Attack Surface Permanently with Identifier-First and Passkeys

Bot mitigation and rate limiting are essential defenses for password endpoints, yet they remain an ongoing cat-and-mouse race against evolving residential proxies and browser-emulation kits. The definitive way to collapse credential-stuffing economics is to stop accepting passwords wherever possible. Adopting an identifier-first login screen lets your identity provider inspect whether the submitted email belongs to a passkey-enabled or SAML/OIDC-federated user and immediately launch a WebAuthn ceremony or enterprise SSO redirect without ever presenting a password box.

Even for accounts still transitioning off passwords, enforcing MFA across every login ensures a stuffed combo-list hit yields zero usable access. Combining identifier-first passkey routing, breached-credential screening, brute-force lockouts, CIDR blocklists, country geofencing, and real-time SIEM webhooks turns an exposed login URL into a hardened, quiet perimeter.

  • Adopt identifier-first authentication so passkey and enterprise-federated users bypass password verification entirely.
  • Disable password grant (ROPC) on OAuth 2.0 clients—legacy token endpoints without browser telemetry are prime targets for automated stuffing scripts.
  • Enable disposable email blocking and admin approval policies on B2B workspaces to choke off automated signup abuse.
  • Stream brute-force lockout spikes and suspicious login anomalies into SIEM dashboards to correlate stuffing waves across applications.

How SSO.ID Defends Login Endpoints Against Bots and Credential Stuffing

SSO.ID v2 layers Attack Protection, configurable Brute-Force Lockout, CIDR IP Allowlists/Blocklists, Country Geofencing, Disposable Email Blocking, and Passwordless FIDO2 Passkeys directly into your hosted authentication perimeter.

  • ✓Configurable Brute-Force Lockout (maxFailedLoginAttempts, lockoutDurationMinutes) and anomaly detection protect tenant login endpoints automatically.
  • ✓CIDR IP allowlists/blocklists, Admin Console IP restrictions, Country Geofencing, and Impossible Travel detection stop distributed foreign stuffing campaigns.
  • ✓Disposable email blocking and registration controls prevent automated bot signups from polluting customer directories.
  • ✓Passkey-as-Primary passwordless login (passkeyAsPrimary) eliminates password replay value altogether while real-time analytics surface failed-login spikes.

Frequently Asked Questions

Why shouldn't we rely solely on per-IP rate limiting to stop credential stuffing?

Modern credential-stuffing operators distribute attempts across tens of thousands of clean residential proxy IPs, sending only one or two requests per IP. Per-IP counters rarely trigger, whereas combining JA4 TLS fingerprinting, password-spray detection, breached-credential checks, and MFA stops distributed bots reliably.

How do we prevent account lockout policies from becoming a Denial-of-Service vector?

Use progressive delays and short lockout windows (such as 15 minutes), exempt previously verified trusted devices from lockouts caused by unknown clients, and require MFA or passkey sign-in rather than locking accounts permanently until helpdesk intervention.

Does k-anonymity breached-password checking send our users' passwords to a third party?

No. Only the first 5 hex characters of the password's SHA-1 hash are transmitted—representing tens of thousands of possible hashes—while the actual suffix match runs strictly inside your server's memory.

Topics: #Credential Stuffing #Bot Mitigation #Brute Force #Login Security