Appearance
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:
operatorfor the application. - Keep the application in
detectwhile you raise the paranoia level, and read the events before you switch toblock. 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=5yaml
applications:
- name: shop
policy:
signatures:
paranoia_level: 2
anomaly_threshold:
inbound: 5
outbound: 4Raise 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=blockyaml
applications:
- name: shop
policy:
mode: block
signatures:
mode: block # empty: same as the application; detect winsCheck 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=trueyaml
applications:
- name: shop
policy:
signatures:
response_body: trueSettings reference
Signatures
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
Signatures (policy.signatures.enabled) | Turns the module on. | true | true, false | all |
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, empty | all; detect wins over the application's block |
Paranoia level (policy.signatures.paranoia_level) | Which CRS rules run: all rules up to this level. | 1 | 1 to 4 | all |
Request score threshold (policy.signatures.anomaly_threshold.inbound) | Points from matched request rules that refuse the request. 5 is one critical rule. | 5 | 1 to 1000 | refuses only in block mode |
Response score threshold (policy.signatures.anomaly_threshold.outbound) | The same for response rules. | 4 | 1 to 1000 | refuses only in block mode |
Check response bodies (policy.signatures.response_body) | Runs the response rules on answers in the response scope. | false | true, false | refuses 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
| Limit | Value |
|---|---|
| Paranoia level | 1 to 4 |
| Thresholds | 1 to 1000 points |
| Request body, parameters, headers | set 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.