General view of the signature for ModSecurity

In simplified form, the signature for ModSecurity looks like this:

[Directive] [Variable] [Operator] [Rule Number] [Solution] [Rule Tag]

SecRule REQUEST_COOKIES “@rx %2f” “id:999000, phase:2, block, tag:’castom_teg’

In the above recorded signature:

  1. SecRule – directive responsible for creating a rule.

  2. REQUEST_COOKIES is a variable that points to the location analyzed by the rule.

  3. @rx is an operator that determines how the value pattern is entered.

  4. id:999000 – rule identification number.

  5. phase:2 – phase at which the rule operates.

  6. block – decision according to the rule (in the case of ModSecurity working in conjunction with WAF, it is not valid. Blocking on WAF occurs based on security rules. But this parameter must be present in the signature to avoid syntax errors).

  7. tag:’castom_teg’ – rule tag, according to which blocking is carried out in the context of WAF rules.