Appearance
Bot mitigation Since v0.1
Bot mitigation tells automated clients from people. It gives every client a score from signals: a missing user agent, a TLS stack that contradicts the claimed browser, a known scanner, crawling or scanning behaviour, failed logins and ignored challenges. A response ladder then acts on the score: log, challenge, CAPTCHA, delay, refuse or ban.
What it is made of
| Part | What it does | Page |
|---|---|---|
| Score and ladder | Adds up signals and picks the response step. | This page |
| Challenges and CAPTCHA | Check that a browser is behind the request. | Challenges and CAPTCHA |
| Logins and behaviour | Credential stuffing, brute force, crawling, scanning, scraping, enumeration. | Logins and behaviour |
| Bot catalog | Good bots, scanners and signed agents, and how each is verified. | Bot catalog |
| Fingerprints and known clients | Refuse tools by TLS fingerprint, name your own apps, act on one client. | Fingerprints and clients |
How it works
For each request the module collects signals, adds their weights to the client's score and looks up the highest ladder step the score reaches. Scores fall over time: a score halves after the half-life without new signals.
The default ladder challenges browsers at score 30 and blocks at 80. A challenge step sends a browser navigation to a short proof-of-work page. API calls, apps and scripts cannot run it and are handled by Clients that cannot run a challenge instead. Events of clients that reached a step have rule bot.score. Other rule IDs start with bot., and the module is bots in the trace.
Modes and roles
- Bot mitigation is off until the application has a
policy.botssection. The first change in the console orwaap bots setcreates it. - In
detectmode every signal is scored and logged and nothing is refused. Inblockmode the ladder acts. An empty module mode follows the application, anddetectwins. - Role
operatorchanges the settings.viewerreads them. Fingerprint lists and the bot catalog are shared: changing them needs access to every application. - Fingerprints (JA3, JA4) need the application on an HTTPS listener.
Turn it on and watch first
text
1. Open Applications > All applications, and select the application.
2. Open Request checks > Bot mitigation, Status and scoring tab.
3. Change any setting, starting with Protection mode set to detect.
4. Select Preview changes, add a comment and select Apply.sh
waap bots set -app shop -m "bot mitigation" mode=detectyaml
# applications[].policy.bots in the configuration
bots:
mode: detectWatch the events for a few days: waap events list -app shop -rule bot.score. The event page shows a Bot score card with the score, each signal's share, and the client's JA4, JA4H and user agent. Then set mode=block, or leave it empty to follow the application.
Look at the clients
The Clients tab (waap bots clients -app shop) lists clients by score with their signals, so you see who is near a threshold before you block.
Choose the response steps
Each step has a score from 1 to 100 and an action. Scores must increase from step to step.
text
1. Open Request checks > Bot mitigation, Status and scoring tab.
2. In the Response ladder, add or edit a step: its score, its action and, for ban, how long.
3. Select Preview changes, then Apply.sh
waap bots list get -app shop -list responses > ladder.yaml
# edit ladder.yaml, then
waap bots list set -app shop -list responses -f ladder.yaml -m "ladder"yaml
# policy.bots.responses
- { at: 30, action: challenge }
- { at: 60, action: captcha }
- { at: 80, action: tarpit }
- { at: 95, action: ban, for: 1h }An empty list ([]) returns to the default ladder.
Tarpit
A tarpit step holds the refusal for the tarpit delay before it sends it, which slows persistent clients. At most the tarpit capacity of refusals are held on a node. Over it, tarpit steps block at once.
Tune the score
waap bots get -app shop lists every setting with its default and range. Weights are points added per signal; the half-life sets how fast a score decays.
text
1. Open Request checks > Bot mitigation, Status and scoring tab.
2. Change a weight or the Score half-life.
3. Select Preview changes, then Apply.sh
waap bots set -app shop -m "tune score" weights.tls_mismatch=40 score.half_life=30myaml
bots:
weights: {tls_mismatch: 40}
score: {half_life: 30m}Settings reference
General and score
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Bot mitigation (enabled) | Scores clients and acts on the score. Off keeps the settings. | true | true, false | all |
Protection mode (mode) | Whether the ladder acts or only logs. | empty (same as the application) | detect, block, empty | detect wins over the application's block |
Score half-life (score.half_life) | A score halves after this long without new signals. | 10m | 1m to 24h | all |
Clients that cannot run a challenge (non_browser) | What a challenge step does for anything but a page navigation. | log | log, block | block and ban steps apply to every client |
responses | The response ladder. | challenge at 30, block at 80 | up to 10 steps; score 1 to 100, increasing; action log, challenge, captcha, tarpit, block, ban | for only with ban |
Signal weights
All weights are points from 0 to 100.
| Setting | Added when | Default |
|---|---|---|
No user agent (weights.ua_missing) | the request has no User-Agent (bot.ua.missing) | 20 |
TLS contradicts the browser (weights.tls_mismatch) | the TLS stack is not the claimed browser's (bot.tls.*) | 25 |
Headers contradict the browser (weights.http_mismatch) | headers that browser always sends are missing (bot.http.*) | 20 |
Bot category (score) (weights.category) | a catalog category whose action is score | 30 |
Browser automation (weights.automation) | a headless or automated browser, when its category action is score | 50 |
Failed bot verification (weights.verify_failed) | a client claims a verifiable bot from an address that is not the bot's | 60 |
Invalid bot signature (weights.signature_invalid) | a signed request does not verify | 60 |
Ignored challenges (weights.challenge_ignored) | challenges keep arriving without a solve | 30 |
Invalid token (weights.token_invalid) | a challenge token does not verify (copied or forged) | 30 |
Examples
Detect first, then challenge at 30, refuse at 70 and ban repeat offenders for an hour:
yaml
bots:
mode: detect
responses:
- { at: 30, action: challenge }
- { at: 70, action: block }
- { at: 95, action: ban, for: 1h }Refuse API clients that cannot solve a challenge instead of only logging them:
bash
waap bots set -app shop -m "refuse non-browsers" non_browser=blockLimits
| Limit | Value |
|---|---|
| Ladder steps | 10 |
| Score | 1 to 100 per step and per weight |
| Known clients per application | 200 |
| Login endpoints per application | 20 |
| Fingerprint lists | 200, up to 100,000 inline entries each |
| Own catalog entries | 500 |
| Counters and scores | per node: published between nodes every 10 seconds |
Troubleshooting
A legitimate client is refused
- Cause: one or more signals pushed its score over a step.
- Check: open the event, read the Bot score card (which signals), and the client under Clients.
- Fix: select False positive on the event (
waap except EVENT): it proposes ignoring those signals for that client's JA4. For a whole office, add an exception withwhen: { ip_lists: [office] }, or an access ruletrustwithskip: [bots]. Settingfingerprints.consistency=falseremoves allbot.http.*andbot.tls.*signals.
Nothing happens in block mode
- Cause: the application or Protection mode is
detect, or the score stays under the first step. - Fix: check both modes, and lower the first step or raise a weight.