Skip to content

Paranoia level and thresholds Since v0.1 ​

The paranoia level decides how many CRS rules run. Level 1 catches common attacks with few false positives. Levels 2 to 4 add stricter rules that catch more and need more exclusions. The thresholds decide how many points from matched rules refuse a request or an answer.

Before you begin ​

  • Role: operator for the application.
  • Keep the application in detect while you raise the paranoia level, and read the events before you switch to block. A higher level produces more false positives.

Change the paranoia level and thresholds ​

text
1. Open Applications > All applications, and select the application.
2. In the application menu, open Request checks > Signatures.
3. Set Paranoia level, Request score threshold and Response score threshold.
4. Select Preview changes, add a comment and select Apply.
sh
waap apps set -app shop -m "paranoia 2" policy.signatures.paranoia_level=2 policy.signatures.anomaly_threshold.inbound=5
yaml
applications:
  - name: shop
    policy:
      signatures:
        paranoia_level: 2
        anomaly_threshold:
          inbound: 5
          outbound: 4

Raise the level in steps

Move from 1 to 2 in detect, review the events for a few days, add exclusions for the legitimate matches, and only then switch the module to block. To try one noisy range first, use staged rules.

Switch signatures to block ​

text
1. Open the application's Signatures page.
2. Set Protection mode to block (or leave it empty to follow the application).
3. Select Preview changes, then Apply.
sh
waap apps set -app shop -m "enforce signatures" policy.signatures.mode=block
yaml
applications:
  - name: shop
    policy:
      mode: block
      signatures:
        mode: block   # empty: same as the application; detect wins

Check response bodies ​

The response rules look for SQL errors, stack traces, directory listings and web shells in answers. They cost the most of all rules, so they are off by default. Turn on Check response bodies to run them on answers that are in the response scope. A matching answer is refused in block mode.

text
1. Open the application's Signatures page.
2. Turn on Check response bodies.
3. Select Preview changes, then Apply.
sh
waap apps set -app shop -m "response rules" policy.signatures.response_body=true
yaml
applications:
  - name: shop
    policy:
      signatures:
        response_body: true

Settings reference ​

Signatures ​

SettingWhat it doesDefaultAllowed valuesApplies in
Signatures (policy.signatures.enabled)Turns the module on.truetrue, falseall
Protection mode (policy.signatures.mode)Whether a score at the threshold refuses the request or only logs it.empty (same as the application)detect, block, emptyall; detect wins over the application's block
Paranoia level (policy.signatures.paranoia_level)Which CRS rules run: all rules up to this level.11 to 4all
Request score threshold (policy.signatures.anomaly_threshold.inbound)Points from matched request rules that refuse the request. 5 is one critical rule.51 to 1000refuses only in block mode
Response score threshold (policy.signatures.anomaly_threshold.outbound)The same for response rules.41 to 1000refuses only in block mode
Check response bodies (policy.signatures.response_body)Runs the response rules on answers in the response scope.falsetrue, falserefuses only in block mode

Other signature settings have their own pages: answer confirmation, rule pre-filter and staged rules.

Examples ​

Stricter detection with a higher bar, logging only:

yaml
policy:
  mode: detect
  signatures:
    paranoia_level: 3
    anomaly_threshold: {inbound: 10, outbound: 4}

Limits ​

LimitValue
Paranoia level1 to 4
Thresholds1 to 1000 points
Request body, parameters, headersset by the application's limits

Troubleshooting ​

Many legitimate requests are blocked after raising the level ​

  • Cause: levels 2 to 4 include rules that match ordinary text, such as long free-text fields.
  • Check: open the events and sort by rule (waap events top -by rule).
  • Fix: add exclusions for the matched rules, or go back to level 1.

An attack passes in block mode ​

  • Cause: the score stayed under the threshold, or the module follows an application in detect.
  • Check: the event shows the score and the threshold, and the effective mode.
  • Fix: lower Request score threshold, raise the paranoia level, or set the modes to block.