Appearance
Signatures and rules
Symptoms from the signature engine (OWASP CRS and our own rules in rules/custom/), answer confirmation, the module time budget and the signature pre-filter.
A request is refused by rule 200100 or 200110 (our own level 1 rules)
- Symptom: a normal request is refused with rule
200100(remote file inclusion) or200110(short command after a separator). - Cause:
200100: a parameter named like an include (page,file,template,path,viewand so on) holds anhttp(s)orftpURL to a host other than the request's own.200110: a parameter value starts with;,|,&&, a backtick or$(followed by a command word such asidorls. - Check:
waap explain EVENTshows the rule, the parameter and the matched value. - Fix: if the application really takes off-site URLs in that parameter, add an exception for the rule on that path or field (
ignore_rules: ["200100"],in: ["param:NAME"]). Never add it for the whole application. Return and redirect parameters (url,redirect,return_url,next,to) are not checked and need no exception.
An answer is refused by rule 200200, 200210 or 200220 (answer confirmation)
- Symptom: the client gets the block page instead of the application's answer; the event has rule
200200(database error in the answer),200210(markup reflected unescaped) or200220(open redirect), with modulesignatures. - Cause: the request had a probe shape in a parameter (a quote; a quote followed by markup; a URL to another host), and the answer proved it: a database error, the parameter's markup in the HTML unescaped, or a 3xx
Locationto the host the parameter named. If the application is not vulnerable, typical causes are a page that always shows a database error text (a help page about SQL errors, or a debug mode), a page that echoes HTML on purpose (an editor preview whose content starts with a quote), or a redirect to a partner host that is not on the allowed list. - Check:
waap explain EVENT: the parameter, its value and the evidence (the error text, the reflected markup with its surroundings, or theLocationheader). Repeat the request without the quote or URL: the answer should no longer contain the evidence. - Fix: for a real finding, fix the application or add a virtual patch. For a partner redirect host, add it to
policy.signatures.allowed_redirect_hostson the application's Signatures page. For a page that shows errors or echoes markup by design, add an exception for that rule on that path or field (ignore_rules: ["200200"],in: ["param:NAME"]). As a last resort for the whole application, setpolicy.signatures.answer_confirmation=false.
Answer confirmation does not catch a probe that the scanner reports
- Symptom: a scanner reports error-based SQL injection, reflected XSS or an open redirect, and no
200200,200210or200220event exists. - Cause: one of the following.
answer_confirmationis false. The request was already refused by another rule (then that event is the record). The answer is compressed withbrorzstd, which is not decoded. The evidence lies after the first 128 KiB of the answer. The reflection is in a JSON or text answer (only HTML answers are checked for markup), or is partly escaped. The redirect is done by a script or a meta refresh, not by a 3xxLocation. The target host is the application's own or an allowed one. The answer type or path is outside the response scope (policy.response). - Check:
waap apps get -app NAME(the two settings), the event list for the request, and the answer'sContent-Type,Content-Encodingand length. - Fix: turn the setting on, add the content type or path to the response scope, or use a virtual patch for that parameter.
An attack was allowed when a module exceeded its time budget
- Symptom: an attack you expect to be blocked passes, or a test of the attack corpus misses cases under load. Its event has no rule but an error such as
signatures: stopped after request headers: context deadline exceeded; the trace shows the module with actionerror. The metric outcome isfailed_open. - Cause: the module did not finish inside
policy.limits.module_budget(default 50 ms), and the application's failure policy isfail_open, so the uninspected request went on. Usual reasons: the host is overloaded (CPU starved, or a race-detector build, about ten times slower), a very large body, or many rules at a high paranoia level. A module that finishes late with a finding still blocks. Its event shows the rules and the errorexceeded time budget (X > Y). Older builds dropped such findings underfail_open. - Check: the event's error and the trace step durations;
waap_requests_total{outcome="failed_open"}in the metrics; the host load; the request body size. - Fix: remove the load (more cores, fewer modules on this node, or an HA peer). If the module is consistently near the budget for normal traffic, raise
policy.limits.module_budgetfor that application (on the application's Request limits page, Time per module, orwaap apps set -app NAME policy.limits.module_budget=100ms), keeping the latency budget in mind. Or setpolicy.on_inspection_failure: fail_closedwhere a missed attack is worse than a refused request. In tests, run detection suites with a large budget under-race, as the attack corpus does.
A missed detection is suspected, and the signature pre-filter may have skipped the rule
- Symptom: a request you expect a CRS rule to match passes, and its trace (signatures step) says
pre-filter skipped N/M rules (required text absent). - Cause: by design, the pre-filter only leaves out rules whose required text is absent from every value they read, so the rule could not have matched that request either way. A real miss would mean the check is wrong (for example a decoding step it does not follow), which the differential tests guard against. More likely, the rule does not match the request at all: wrong field, encoding, paranoia level, or an exception.
- Check: turn the pre-filter off for the application (
waap apps set -app NAME policy.signatures.prefilter=false, or on the application's Signatures page, "Skip rules that cannot match"). Send the same request again and compare the two traces and events. With it off, the trace sayspre-filter off: every rule ran. - Fix: if the result is the same, the rule does not match the request: review the paranoia level, the exceptions and the rule itself (see Paranoia level and thresholds and Rule exclusions). If the result differs, keep the pre-filter off for that application and report it as a bug with both traces. The rule ID and the trace notes are enough to start; no request data needs to leave the box.
The trace says the pre-filter skipped nothing
- Symptom: the signatures step says
pre-filter skipped nothing (...): every rule ran,pre-filter offorpre-filter left out. - Cause:
values over the pre-filter's bounds(more than 4 MiB or 20,000 values in the variables the rules read);a variable could not be read(an engine change);the rule set could not be analysed(our custom rule files change rules by tag or message, or set default actions);left out: a virtual patch changes rules or counts them(a patch withskip:orSecRuleUpdate...);off(the setting). Every rule ran, so detection is unchanged; only the check is slower. - Check: the setting (
waap apps get -app NAME), the application's virtual patches, andwaap_signature_prefilter_requests_total{result="fallback"}in the metrics. - Fix: nothing is required. To get the speed back, use
skipAfterinstead ofskip:in the patch, or change the custom rule by ID.
The trace shows the 934 base64 rules running on ordinary text
- Symptom: the signatures step counts 934100, 934101 or 934160 as run (for example
934 11/14) for a request without any base64 data. - Cause: these rules base64-decode each value first. The pre-filter decodes the leading run of base64 characters of every value, as the rule does, and leaves the rule out only when no decoded text can hold a match. A value that starts with a long run of letters, digits,
+or/(a long word, a token, or a path such as/api/v1/orders) decodes into a few random bytes; in rare cases those bytes hold a%uescape, a newline or comment markers, and then the rule runs. A value containing%or\always runs the rule, because the check does not decode before base64. Some requests pay the cost of these three rules (about 0.6 ms for a 4 KiB JSON body); detection is unchanged. - Check: compare with similar requests;
waap_signature_prefilter_rules_skipped_totalin the metrics shows the overall share of skipped rules. - Fix: nothing is required.