Skip to content
Free lab · OWASP API4 & API6 (2023)

Rate-Limit & Abuse Tuner

Per-IP rate limits alone do not stop distributed attacks. Credential stuffing from thousands of IPs, scraping through residential proxies and SMS pumping all stay under any per-IP limit that offices and mobile carriers can live with. In this lab you set the algorithm, limit, burst, key and breach action for each endpoint and identity type, replay a simulated 24-hour day, and see what got through, who you blocked by mistake and what the SMS bill came to. Then you tune once and replay for a grade.

Runs entirely in your browser on synthetic traffic and .example hosts. Three difficulty levels, seeded so a run can be shared.

No download, no card
0s
Seed …

Your API, one day

You run the edge for api.shop.example: login, a product catalogue, an SMS send-code step, password reset and an orders API. The current config is what most teams ship first: 60/min per IP, fixed window, 429, everywhere. Set a rule per endpoint and identity type, replay a 24-hour trace, read the damage, then tune and replay once more for your grade.

Score: attacks mitigated (45), real users and partners unharmed (30), SMS cost avoided (10), useful alerts (10). Clear 70% on the tune round to pass. Everything is simulated in your browser with .example hosts; no real traffic and no real prices.

TL;DR

What this lab does

5 points
  • A free API security lab: set rate limits per endpoint and identity type (anonymous, free, paid, partner, internal), then replay a seeded, simulated 24 hours of traffic against them.
  • For each rule you choose the algorithm (fixed window, sliding window or token bucket), the limit and burst, the key (IP, user, API key, device fingerprint or a layered combination) and the action on breach (429, CAPTCHA or step-up, or soft-block plus alert).
  • The trace hides credential stuffing from thousands of IPs, catalogue scraping, OTP/SMS pumping, account enumeration on password reset, a partner batch job and a viral spike of real users.
  • SVG charts show requests over time, allowed versus blocked and real people wrongly blocked; outcomes count attacks mitigated, legitimate users harmed, SMS cost avoided in illustrative units and alerts raised.
  • You get one tune round after the first replay. The debrief maps every finding to OWASP API4:2023 or API6:2023 and recommends a design. The lesson: per-IP limits alone fail against distributed attacks, and business flows need controls beyond rate limits.

Rate limits protect capacity; flow controls protect the business

OWASP API4:2023 Unrestricted Resource Consumption is about limits: how often a client may call, how much it may ask for, and how much a call may cost you in a paid integration such as SMS. Get the key and size right and you stop single noisy clients without hurting the office behind one NAT address, the partner running its nightly batch, or the thousands of real people who arrive when a post goes viral.

OWASP API6:2023 Unrestricted Access to Sensitive Business Flows is what is left when the attacker is patient and distributed. Logging in, harvesting a catalogue and probing password reset are legitimate flows used at scale. The fix lives in the flow itself: breached-password checks and step-up for login, anti-scraping controls for the catalogue, the same response for every reset request, and spend caps on send-code. The replay shows both halves, and the debrief says which one each finding belongs to.

Before tuning limits, find out which endpoints you actually have with the OpenAPI Spec Gap Analyser, and see how a gateway enforces the result in the API Gateway Config Lab.

Frequently asked questions

What is the Rate-Limit & Abuse Tuner?

A browser-based lab where you configure rate limits for a fictional API at api.shop.example (login, catalogue, SMS send-code, password reset and orders) and replay a seeded 24-hour traffic trace through them. You see which attacks got through, which real users and partners you blocked, what SMS pumping cost, and which alerts fired. Then you tune once and replay for a grade.

Why do per-IP rate limits fail against credential stuffing?

Credential stuffing tools spread attempts across thousands of IP addresses, often residential proxies, so each IP sends only a request or two a minute. That is below any per-IP limit a real office, campus or mobile carrier could live with, because many genuine people share one IP behind NAT. Each username is also tried about once, so a per-username limit never trips. What stops it is controlling the login flow: breached-password checks, failed-login ratio monitoring across all sources, and step-up MFA for risky logins.

Which OWASP API Security Top 10 items does it cover?

API4:2023 Unrestricted Resource Consumption (missing or badly sized limits, burst handling, partner and internal quotas, and spend on paid integrations such as SMS) and API6:2023 Unrestricted Access to Sensitive Business Flows (automated abuse of login, scraping of the catalogue, enumeration through password reset). Where OWASP places part of a problem elsewhere, the debrief says so: credential stuffing is also listed under API2 Broken Authentication.

Fixed window, sliding window or token bucket: which should I use?

A fixed window is cheap but lets a client send up to twice the limit across a window edge. A sliding window removes that edge effect but has no room for bursts, so a page load that fires a dozen calls at once can be rejected. A token bucket refills at the limit rate and holds up to the burst size, so ordinary bursts pass while the sustained rate stays capped. In the lab, token buckets usually fit people and partners, and sliding windows fit low per-hour limits on sensitive flows like send-code and reset.

What is OTP or SMS pumping?

SMS pumping (also called SMS toll fraud or artificially inflated traffic) is abuse of a send-code endpoint to trigger many text messages to number ranges the attacker profits from. The victim pays for every message. Rate limits keyed on IP barely slow it; controls that work include a per-phone-number limit, blocking destination countries and premium ranges you do not serve, a challenge before sending, and a spend circuit breaker. The lab counts cost in illustrative units, not real prices.

Are the numbers real?

No. Every request, user and attacker is simulated in your browser from a seed, using .example hostnames. Traffic sizes, CAPTCHA solve rates and SMS cost units are sim parameters chosen to make the trade-offs visible, not measurements of any real service. A seed reproduces the same day exactly, so you can share a seed and compare designs.

Is it free?

Yes. The lab, all three difficulty levels, the tune round and the debrief are free. Signing in lets your best grade follow your account.

The tools people use most on PlayCISO.

All tools
🖤 Black Friday: new customers get 3 months of Pro for $5, then $5/month. Ends 30 Nov. Claim 3 months for $5 →