Preconfigured WAF rules overview

Google Cloud Armor preconfigured WAF rules are complex web application firewall (WAF) rules with dozens of signatures that are compiled from open source industry standards. Each signature corresponds to an attack detection rule in the ruleset. Google offers these rules as is. The rules let Cloud Armor evaluate dozens of distinct traffic signatures by referring to conveniently named rules rather than requiring you to define each signature manually.

Cloud Armor preconfigured WAF rules can be tuned to best suit your needs. For more information about how to tune the rules, see Tune Cloud Armor preconfigured WAF rules.

The following table lists the preconfigured preconfigured WAF rules available for use in a Cloud Armor security policy. These rules are based on the OWASP ModSecurity Core Rule Set (CRS), such as OWASP Core Rule Set 4.22 . We recommend using version 4.22 for the most up-to-date protection against modern threats. While support for CRS 3.3 and 3.0 is ongoing, we recommend avoiding older versions, especially CRS version 3.0, whenever your workloads allow for version 4.22.

CRS 4.22

Cloud Armor rule name OWASP rule name Current status
SQL injection sqli-v422-stable In sync with sqli-v422-canary
sqli-v422-canary Latest
Cross-site scripting xss-v422-stable In sync with xss-v422-canary
xss-v422-canary Latest
Local file inclusion lfi-v422-stable In sync with lfi-v422-canary
lfi-v422-canary Latest
Remote file inclusion rfi-v422-stable In sync with rfi-v422-canary
rfi-v422-canary Latest
Remote code execution rce-v422-stable In sync with rce-v422-canary
rce-v422-canary Latest
Method enforcement methodenforcement-v422-stable In sync with methodenforcement-v422-canary
methodenforcement-v422-canary Latest
Scanner detection scannerdetection-v422-stable In sync with scannerdetection-v422-canary
scannerdetection-v422-canary Latest
Protocol attack protocolattack-v422-stable In sync with protocolattack-v422-canary
protocolattack-v422-canary Latest
PHP injection attack php-v422-stable In sync with php-v422-canary
php-v422-canary Latest
Session fixation attack sessionfixation-v422-stable In sync with sessionfixation-v422-canary
sessionfixation-v422-canary Latest
Java attack java-v422-stable In sync with java-v422-canary
java-v422-canary Latest
Generic attack generic-v422-stable In sync with generic-v422-canary
generic-v422-canary Latest

CRS 3.3

Cloud Armor rule name OWASP rule name Current status
SQL injection sqli-v33-stable In sync with sqli-v33-canary
sqli-v33-canary Latest
Cross-site scripting xss-v33-stable In sync with xss-v33-canary
xss-v33-canary Latest
Local file inclusion lfi-v33-stable In sync with lfi-v33-canary
lfi-v33-canary Latest
Remote file inclusion rfi-v33-stable In sync with rfi-v33-canary
rfi-v33-canary Latest
Remote code execution rce-v33-stable In sync with rce-v33-canary
rce-v33-canary Latest
Method enforcement methodenforcement-v33-stable In sync with methodenforcement-v33-canary
methodenforcement-v33-canary Latest
Scanner detection scannerdetection-v33-stable In sync with scannerdetection-v33-canary
scannerdetection-v33-canary Latest
Protocol attack protocolattack-v33-stable In sync with protocolattack-v33-canary
protocolattack-v33-canary Latest
PHP injection attack php-v33-stable In sync with php-v33-canary
php-v33-canary Latest
Session fixation attack sessionfixation-v33-stable In sync with sessionfixation-v33-canary
sessionfixation-v33-canary Latest
Java attack java-v33-stable In sync with java-v33-canary
java-v33-canary Latest
NodeJS attack nodejs-v33-stable In sync with nodejs-v33-canary
nodejs-v33-canary Latest

CRS 3.0

Cloud Armor rule name OWASP rule name Current status
SQL injection sqli-stable In sync with sqli-canary
sqli-canary Latest
Cross-site scripting xss-stable In sync with xss-canary
xss-canary Latest
Local file inclusion lfi-stable In sync with lfi-canary
lfi-canary Latest
Remote file inclusion rfi-stable In sync with rfi-canary
rfi-canary Latest
Remote code execution rce-stable In sync with rce-canary
rce-canary Latest
Method enforcement methodenforcement-stable In sync with methodenforcement-canary
methodenforcement-canary Latest
Scanner detection scannerdetection-stable In sync with scannerdetection-canary
scannerdetection-canary Latest
Protocol attack protocolattack-stable In sync with protocolattack-canary
protocolattack-canary Latest
PHP injection attack php-stable In sync with php-canary
php-canary Latest
Session fixation attack sessionfixation-stable In sync with sessionfixation-canary
sessionfixation-canary Latest
Java attack Not included
NodeJS attack Not included

In addition, the following cve-canary rules are available to all Cloud Armor customers to help detect and optionally block the following vulnerabilities:

  • CVE-2021-44228 and CVE-2021-45046 Log4j RCE vulnerabilities
  • 942550-sqli JSON-formatted content vulnerability
  • google-mrs-v202512-id000001-rce and google-mrs-v202512-id000002-rce React RCE vulnerabilities
Cloud Armor rule name Covered vulnerability types
cve-canary Log4j and React RCE vulnerabilities
json-sqli-canary JSON-based SQL injection bypass vulnerability

Best practices

To optimize your use of preconfigured WAF rules, consider the following best practices:

  • Tuning and sensitivity: start with sensitivity level 1 in preview mode to understand how rules affect your application. For more information, see Choose your preconfigured WAF rule sensitivity level.
  • Request body inspection limit: configure the inspection limit based on your needs. Cloud Armor preconfigured WAF rules can inspect up to 64 kB of the request body. For more information, see Update inspection limit for preconfigured WAF rules.
  • Canary and stable rulesets: maintain canary rulesets in preview mode with a higher priority, and keep stable rulesets in enforced mode with a lower priority. This approach lets you validate rule changes before they affect your production traffic.

For a complete list of recommendations, see Cloud Armor best practices.

Preconfigured OWASP rules

Each preconfigured WAF rule has a sensitivity level that corresponds to a OWASP CRS paranoia level. A lower sensitivity level indicates a higher confidence signature, which is less likely to generate a false positive. A higher sensitivity level increases security, but also increases the risk of generating a false positive. By default, Cloud Armor runs at sensitivity level 4 and evaluates all signatures in a rule set once enabled.

SQL injection (SQLi)

The following table provides the signature ID, sensitivity level, and description of each supported signature in the SQLi preconfigured WAF rule.

CRS 4.22

Signature ID (Rule ID) Sensitivity level Description
owasp-crs-v042200-id942100-sqli 1 SQL injection attack detected using libinjection
owasp-crs-v042200-id942140-sqli 1 SQL injection attack: Common DB names detected
owasp-crs-v042200-id942151-sqli 1 SQL injection attack: SQL function name detected
owasp-crs-v042200-id942160-sqli 1 Detects SQLi tests using sleep or benchmark
owasp-crs-v042200-id942170-sqli 1 Detects SQL benchmark and sleep injection attempts including conditional queries
owasp-crs-v042200-id942190-sqli 1 Detects MSSQL code execution and information gathering attempts
owasp-crs-v042200-id942220-sqli 1 Looks for integer overflow attacks
owasp-crs-v042200-id942230-sqli 1 Detects conditional SQL injection attempts
owasp-crs-v042200-id942240-sqli 1 Detects MySQL charset switch and MSSQL DoS attempts
owasp-crs-v042200-id942250-sqli 1 Detects MATCH AGAINST, MERGE, and EXECUTE IMMEDIATE injections
owasp-crs-v042200-id942270-sqli 1 Looks for basic SQL injection; common attack string for MySql, Oracle, and others
owasp-crs-v042200-id942280-sqli 1 Detects Postgres pg_sleep injection, waitfor delay attacks and database shutdown attempts
owasp-crs-v042200-id942290-sqli 1 Finds basic MongoDB SQL injection attempts
owasp-crs-v042200-id942320-sqli 1 Detects MySQL and PostgreSQL stored procedure or function injections
owasp-crs-v042200-id942350-sqli 1 Detects MySQL UDF injection and other data or structure manipulation attempts
owasp-crs-v042200-id942360-sqli 1 Detects concatenated basic SQL injection and SQLLFI attempts
owasp-crs-v042200-id942500-sqli 1 MySQL inline comment detected
owasp-crs-v042200-id942540-sqli 1 SQL Authentication bypass (split query)
owasp-crs-v042200-id942560-sqli 1 MySQL scientific notation payload detected
owasp-crs-v042200-id942550-sqli 1 JSON-Based SQL injection
owasp-crs-v042200-id942120-sqli 2 SQL injection attack: SQL operator detected
owasp-crs-v042200-id942130-sqli 2 SQL injection attack: SQL boolean-based attack detected
owasp-crs-v042200-id942131-sqli 2 SQL injection attack: SQL boolean-based attack detected
owasp-crs-v042200-id942150-sqli 2 SQL injection attack: SQL function name detected
owasp-crs-v042200-id942180-sqli 2 Detects basic SQL authentication bypass attempts 1/3
owasp-crs-v042200-id942200-sqli 2 Detects MySQL comment- or space-obfuscated injections and backtick termination
owasp-crs-v042200-id942210-sqli 2 Detects chained SQL injection attempts 1/2
owasp-crs-v042200-id942260-sqli 2 Detects basic SQL authentication bypass attempts 2/3
owasp-crs-v042200-id942300-sqli 2 Detects MySQL comments, conditions and ch(a)r injections
owasp-crs-v042200-id942310-sqli 2 Detects chained SQL injection attempts 2/2
owasp-crs-v042200-id942330-sqli 2 Detects classic SQL injection probings 1/3
owasp-crs-v042200-id942340-sqli 2 Detects basic SQL authentication bypass attempts 3/3
owasp-crs-v042200-id942361-sqli 2 Detects basic SQL injection based on keyword alter or union
owasp-crs-v042200-id942362-sqli 2 Detects concatenated basic SQL injection and SQLLFI attempts
owasp-crs-v042200-id942370-sqli 2 Detects classic SQL injection probings 2/3
owasp-crs-v042200-id942380-sqli 2 SQL injection attack
owasp-crs-v042200-id942390-sqli 2 SQL injection attack
owasp-crs-v042200-id942400-sqli 2 SQL injection attack
owasp-crs-v042200-id942410-sqli 2 SQL injection attack
owasp-crs-v042200-id942470-sqli 2 SQL injection attack
owasp-crs-v042200-id942480-sqli 2 SQL injection attack
owasp-crs-v042200-id942430-sqli 2 Restricted SQL character anomaly detection (args): # of special characters exceeded (12)
owasp-crs-v042200-id942440-sqli 2 SQL comment sequence detected
owasp-crs-v042200-id942450-sqli 2 SQL hex encoding identified
owasp-crs-v042200-id942510-sqli 2 SQLi bypass attempt by ticks or backticks detected
owasp-crs-v042200-id942520-sqli 2 Detects basic SQL authentication bypass attempts 4.0/4
owasp-crs-v042200-id942521-sqli 2 Detects basic SQL authentication bypass attempts 4.1/4
owasp-crs-v042200-id942522-sqli 2 Detects basic SQL authentication bypass attempts 4.1/4
owasp-crs-v042200-id942101-sqli 2 SQL injection attack detected using libinjection
owasp-crs-v042200-id942152-sqli 2 SQL injection attack: SQL function name detected
owasp-crs-v042200-id942321-sqli 2 Detects MySQL and PostgreSQL stored procedure or function injections
owasp-crs-v042200-id942251-sqli 3 Detects HAVING injections
owasp-crs-v042200-id942490-sqli 3 Detects classic SQL injection probings 3/3
owasp-crs-v042200-id942420-sqli 3 Restricted SQL character anomaly detection (cookies): # of special characters exceeded (8)
owasp-crs-v042200-id942431-sqli 3 Restricted SQL character anomaly detection (args): # of special characters exceeded (6)
owasp-crs-v042200-id942460-sqli 3 Meta-character anomaly detection alert - repetitive non-word characters
owasp-crs-v042200-id942511-sqli 3 SQLi bypass attempt by ticks detected
owasp-crs-v042200-id942530-sqli 3 SQLi query termination detected
owasp-crs-v042200-id942421-sqli 4 Restricted SQL character anomaly detection (cookies): # of special characters exceeded (3)
owasp-crs-v042200-id942432-sqli 4 Restricted SQL character anomaly detection (args): # of special characters exceeded (2)

CRS 3.3

Signature ID (Rule ID) Sensitivity level Description
owasp-crs-v030301-id942100-sqli 1 SQL injection attack detected using libinjection
owasp-crs-v030301-id942140-sqli 1 SQL injection attack: common DB names detected
owasp-crs-v030301-id942160-sqli 1 Detects SQLi tests using sleep or benchmark
owasp-crs-v030301-id942170-sqli 1 Detects SQL sleep or benchmark injection attempts including conditional queries
owasp-crs-v030301-id942190-sqli 1 Detects MSSQL code execution and information gathering attempts
owasp-crs-v030301-id942220-sqli 1 Looks for integer overflow attacks
owasp-crs-v030301-id942230-sqli 1 Detects conditional SQL injection attempts
owasp-crs-v030301-id942240-sqli 1 Detects MySQL charset switch and MSSQL DoS attempts
owasp-crs-v030301-id942250-sqli 1 Detects MATCH AGAINST
owasp-crs-v030301-id942270-sqli 1 Looks for basic SQL injection; common attack string for MySql
owasp-crs-v030301-id942280-sqli 1 Detects Postgres pg_sleep injection
owasp-crs-v030301-id942290-sqli 1 Finds basic MongoDB SQL injection attempts
owasp-crs-v030301-id942320-sqli 1 Detects MySQL and PostgreSQL stored procedure or function injections
owasp-crs-v030301-id942350-sqli 1 Detects MySQL UDF injection and other data or structure manipulation attempts
owasp-crs-v030301-id942360-sqli 1 Detects concatenated basic SQL injection and SQLLFI attempts
owasp-crs-v030301-id942500-sqli 1 MySQL inline comment detected
owasp-crs-v030301-id942110-sqli 2 SQL injection attack: common injection testing detected
owasp-crs-v030301-id942120-sqli 2 SQL injection attack: SQL operator detected
owasp-crs-v030301-id942130-sqli 2 SQL injection attack: SQL tautology detected
owasp-crs-v030301-id942150-sqli 2 SQL injection attack
owasp-crs-v030301-id942180-sqli 2 Detects basic SQL authentication bypass attempts 1/3
owasp-crs-v030301-id942200-sqli 2 Detects MySQL comment- or space-obfuscated injections and backtick termination
owasp-crs-v030301-id942210-sqli 2 Detects chained SQL injection attempts 1/2
owasp-crs-v030301-id942260-sqli 2 Detects basic SQL authentication bypass attempts 2/3
owasp-crs-v030301-id942300-sqli 2 Detects MySQL comments
owasp-crs-v030301-id942310-sqli 2 Detects chained SQL injection attempts 2/2
owasp-crs-v030301-id942330-sqli 2 Detects classic SQL injection probings 1/2
owasp-crs-v030301-id942340-sqli 2 Detects basic SQL authentication bypass attempts 3/3
owasp-crs-v030301-id942361-sqli 2 Detects basic SQL injection based on keyword alter or union
owasp-crs-v030301-id942370-sqli 2 Detects classic SQL injection probings 2/3
owasp-crs-v030301-id942380-sqli 2 SQL injection attack
owasp-crs-v030301-id942390-sqli 2 SQL injection attack
owasp-crs-v030301-id942400-sqli 2 SQL injection attack
owasp-crs-v030301-id942410-sqli 2 SQL injection attack
owasp-crs-v030301-id942470-sqli 2 SQL injection attack
owasp-crs-v030301-id942480-sqli 2 SQL injection attack
owasp-crs-v030301-id942430-sqli 2 Restricted SQL character anomaly detection (args): # of special characters exceeded (12)
owasp-crs-v030301-id942440-sqli 2 SQL comment sequence detected
owasp-crs-v030301-id942450-sqli 2 SQL hex encoding identified
owasp-crs-v030301-id942510-sqli 2 SQLi bypass attempt by ticks or backticks detected
owasp-crs-v030301-id942251-sqli 3 Detects HAVING injections
owasp-crs-v030301-id942490-sqli 3 Detects classic SQL injection probings 3/3
owasp-crs-v030301-id942420-sqli 3 Restricted SQL character anomaly detection (cookies): # of special characters exceeded (8)
owasp-crs-v030301-id942431-sqli 3 Restricted SQL character anomaly detection (args): # of special characters exceeded (6)
owasp-crs-v030301-id942460-sqli 3 Meta-character anomaly detection alert - repetitive non-word characters
owasp-crs-v030301-id942101-sqli 3 SQL injection attack detected using libinjection
owasp-crs-v030301-id942511-sqli 3 SQLi bypass attempt by ticks detected
owasp-crs-v030301-id942421-sqli 4 Restricted SQL character anomaly detection (cookies): # of special characters exceeded (3)
owasp-crs-v030301-id942432-sqli 4 Restricted SQL character anomaly detection (args): # of special characters exceeded (2)

CRS 3.0

Signature ID (Rule ID) Sensitivity level Description
Not included 1 SQL injection attack detected using libinjection
owasp-crs-v030001-id942140-sqli 1 SQL injection attack: common DB names detected
owasp-crs-v030001-id942160-sqli 1 Detects SQLi tests using sleep or benchmark
owasp-crs-v030001-id942170-sqli 1 Detects SQL sleep or benchmark injection attempts including conditional queries
owasp-crs-v030001-id942190-sqli 1 Detects MSSQL code execution and information gathering attempts
owasp-crs-v030001-id942220-sqli 1 Looks for integer overflow attacks
owasp-crs-v030001-id942230-sqli 1 Detects conditional SQL injection attempts
owasp-crs-v030001-id942240-sqli 1 Detects MySQL charset switch and MSSQL DoS attempts