Can CAPTCHA Stop CC Attacks? Practical Human-Verification Config
CC attacks simulate normal access from large volumes of real IPs; rate limits and IP bans often fail. CAPTCHA becomes the last filter. Eight Q&As cover how CAPTCHA raises CC cost, strength ranking of verification types, Nginx frequency-triggered verification, controlling false positives, and responding to CAPTCHA-solving farms.
CC attacks look like humans: sources are scattered real IPs, targets are DB-heavy dynamic pages, so pure rate limits and IP bans often fail. Human verification (CAPTCHA) is one of the few controls that directly raises attacker cost. Eight Q&As cover principle, config, and side-effect control.
Q: Can CAPTCHA actually stop CC?
Partially. Set the expectation. CAPTCHA distinguishes humans from scripts; it does not shrink traffic volume. It lifts cost from "send an HTTP request" to "pass a human check," forcing CAPTCHA farms or human crowdsourcing — tens of times more expensive. Against pure-script, low-cost CC tools, effect is strong. Against targeted attacks already wired to solving farms or crowdsourcing, it only slows, does not eradicate. Conclusion: necessary link in the CC chain, not a standalone control.
Q: Why is CAPTCHA especially effective against CC?
CC has a prerequisite: the request must be valid to do damage. If the server requires a human check first, every effective request costs a verification. Cost structure changes:
- Pure scripts fire 10k requests in seconds; CAPTCHA forces a paid solving API per attempt.
- Solving farms have a success-rate ceiling; retries inflate cost further.
- Once cost exceeds payoff (e.g. knocking over an ordinary site), attackers usually walk.
If verification happens at the edge (CDN/WAF), origin never even sees the check request — best protection and lowest origin load.
Q: What verification types exist, and how do they rank?
Four tiers, weak to strong:
- Graphic alphanumeric: weakest. OCR and solving farms break it instantly. Only stops the most primitive scripts.
- Slider/drag: medium. Trajectory and behavior features stop most simple automation; dedicated trajectory simulators still leak through.
- Click-text / semantic puzzles: medium-strong. Requires semantic understanding. Pure OCR rarely passes. Solving cost is higher.
- Invisible (JS challenge + behavioral fingerprint): strongest and best UX. Real users barely notice. Scores browser environment, event timing, fingerprints. Pure scripts rarely simulate the full set.
Practice: prefer invisible verification. Use click/slider as fallback, only when the score is anomalous. Blocks attackers without making every visitor solve a puzzle.
Q: How do you show CAPTCHA only during an attack?
Trigger on frequency, not site-wide always-on. Mark suspects with Nginx rate limiting, then send suspects to a verification page. Workable sketch (`limit_req` only classifies; 429 is handed to frontend/gateway):
`http {
# Record request frequency per IP; over-limit is treated as suspicious
limit_req_zone $binary_remote_addr zone=cczone:10m rate=10r/s;
limit_req_status 429;
server {
# Static assets are excluded from the check to avoid false positives
location ~* \\\\.(css|js|png|jpg|jpeg|gif|ico|woff2?)$ {
expires 7d;
access_log off;
}
# Dynamic pages: apply rate limit first; over-limit traffic goes to the verification layer
location = /search {
limit_req zone=cczone burst=20 nodelay;
proxy_pass http://backend;
}
# On 429, return a CAPTCHA page or 302 to the verification entry
error_page 429 = /verify.html;
location = /verify.html {
root /var/www/static;
internal;
}
}
}`
Params: rate=10r/s is 10 req/s per IP — humans do not click that fast. burst=20 allows short bursts. nodelay keeps real users from being queued. Exclude static assets or images on the page will blow the counter and mass-false-positive.
Q: Will CAPTCHA false-positive real users? How do you shrink the trigger surface?
Yes. That is the biggest pit of CAPTCHA schemes. Four ways to cut false positives:
- Enable only on expensive paths: login, search, list pagination, form submit — DB-heavy APIs. Pure static pages stay off.
- Invisible first, visible later: score with invisible verification; show a visible CAPTCHA only on low scores. Real users stay frictionless.
- Whitelist yourself and search engines: office egress IPs, monitor probe IPs, major search-engine spiders.
- Gray-release: 10% of traffic first, watch false-positive and error rates, then widen.
Keep a fallback: if the verification service itself is down or misclassifying, one-click disable and pass-through, so anti-attack does not take the whole business offline.
Q: What if they use solving farms or AI to break it?
That means the attack is targeted. A single verification type is no longer enough. Stack dimensions, raise per-attempt cost:
- Short session TTL: the pass Cookie after success expires in 5–10 minutes, forcing re-verification.
- Bind session fingerprint: pass is bound to IP, UA, TLS fingerprint. Change any combination, invalidate. Proxy-pool advantage shrinks.
- Add business tokens: critical ops (order, detail lookup) require a one-time Token issued by the server, single use. Pure URL-hammering dies.
- Couple to behavior: abnormal path, dwell, mouse/scroll events in the same session get down-ranked into a stricter verification tier.
Core logic: do not chase unbreakable CAPTCHA. Make breaking it once cost more than the payoff. Solving farms charge per attempt. If you lift each effective request to a few cents, most attacks stop paying off.
Q: What else must sit beside CAPTCHA?
CAPTCHA filters. Traffic pressure still needs other layers. Missing any one is a weak point:
- Static and cache: homepage and lists should hit cache or pre-rendered static. Attack hits cache, not DB. Highest ROI damage reduction.
- Rate and concurrency: Nginx `limit_req`/`limit_conn` as first backstop:
`limit_conn_zone $binary_remote_addr zone=ccconn:10m;
server {
location / {
limit_conn ccconn 15; # Max concurrent connections per IP
}
}`
- IP/UA blacklist: sources with anomalous frequency or tool UAs get banned as emergency bleed-stop.
- Hide origin: once origin IP leaks, attackers bypass CDN and hit origin directly; all edge controls go to zero.
- Edge protection: put rate limit, verification, and cache on CDN/WAF. Origin only receives clean traffic so the server has headroom for real users.
Q: Extra advice?
A rollout order: 1) reduce load — cache or staticize dynamic pages; attack damage drops by half. 2) rate-limit — `limit_req`/`limit_conn` stops low-intensity sustained spray. 3) invisible verification — expensive paths only, frequency-triggered, frictionless for real users. 4) harden sessions — short-lived pass + fingerprint bind + one-time Token. Two reminders: stricter is not better; over-strict locks out real users. Watch false-positive rate on every change. During an attack, keep logs: source, UA, path are later allow/deny evidence and, if needed, incident-report material.