Skip to content

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 ​

PartWhat it doesPage
Score and ladderAdds up signals and picks the response step.This page
Challenges and CAPTCHACheck that a browser is behind the request.Challenges and CAPTCHA
Logins and behaviourCredential stuffing, brute force, crawling, scanning, scraping, enumeration.Logins and behaviour
Bot catalogGood bots, scanners and signed agents, and how each is verified.Bot catalog
Fingerprints and known clientsRefuse 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.bots section. The first change in the console or waap bots set creates it.
  • In detect mode every signal is scored and logged and nothing is refused. In block mode the ladder acts. An empty module mode follows the application, and detect wins.
  • Role operator changes the settings. viewer reads 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=detect
yaml
# applications[].policy.bots in the configuration
bots:
  mode: detect

Watch 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=30m
yaml
bots:
  weights: {tls_mismatch: 40}
  score: {half_life: 30m}

Settings reference ​

General and score ​

SettingWhat it doesDefaultAllowed valuesApplies in
Bot mitigation (enabled)Scores clients and acts on the score. Off keeps the settings.truetrue, falseall
Protection mode (mode)Whether the ladder acts or only logs.empty (same as the application)detect, block, emptydetect wins over the application's block
Score half-life (score.half_life)A score halves after this long without new signals.10m1m to 24hall
Clients that cannot run a challenge (non_browser)What a challenge step does for anything but a page navigation.loglog, blockblock and ban steps apply to every client
responsesThe response ladder.challenge at 30, block at 80up to 10 steps; score 1 to 100, increasing; action log, challenge, captcha, tarpit, block, banfor only with ban

Signal weights ​

All weights are points from 0 to 100.

SettingAdded whenDefault
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 score30
Browser automation (weights.automation)a headless or automated browser, when its category action is score50
Failed bot verification (weights.verify_failed)a client claims a verifiable bot from an address that is not the bot's60
Invalid bot signature (weights.signature_invalid)a signed request does not verify60
Ignored challenges (weights.challenge_ignored)challenges keep arriving without a solve30
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=block

Limits ​

LimitValue
Ladder steps10
Score1 to 100 per step and per weight
Known clients per application200
Login endpoints per application20
Fingerprint lists200, up to 100,000 inline entries each
Own catalog entries500
Counters and scoresper 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 with when: { ip_lists: [office] }, or an access rule trust with skip: [bots]. Setting fingerprints.consistency=false removes all bot.http.* and bot.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.