Skip to content
This page was generated and translated with the assistance of AI. If you spot any inaccuracies, feel free to help improve it. Edit on GitHub

Built-in Rules

PRX-WAF ships with 398 pre-built rules across three categories, plus 10+ detection checkers compiled into the binary. Together, they provide comprehensive coverage of the OWASP Top 10 and known CVE exploits.

OWASP Core Rule Set (310 rules)

The OWASP CRS rules are converted from the OWASP ModSecurity Core Rule Set v4 into PRX-WAF's native YAML format. They cover the most common web attack vectors:

FileCRS IDsRulesCategory
sqli.yaml942xxx~87SQL injection
xss.yaml941xxx~41Cross-site scripting
rce.yaml932xxx~30Remote code execution
lfi.yaml930xxx~20Local file inclusion
rfi.yaml931xxx~12Remote file inclusion
php-injection.yaml933xxx~18PHP injection
java-injection.yaml944xxx~15Java / Expression Language injection
generic-attack.yaml934xxx~12Node.js, SSI, HTTP splitting
scanner-detection.yaml913xxx~10Security scanner UA detection
protocol-enforcement.yaml920xxx~15HTTP protocol compliance
protocol-attack.yaml921xxx~10Request smuggling, CRLF injection
multipart-attack.yaml922xxx~8Multipart bypass
method-enforcement.yaml911xxx~5HTTP method allowlist
session-fixation.yaml943xxx~6Session fixation
web-shells.yaml955xxx~8Web shell detection
response-*.yaml950-956xxx~13Response inspection

Wordlist Data Files

The OWASP CRS rules use phrase-match (pm_from_file) against 20+ wordlist files stored in rules/owasp-crs/data/:

  • scanners-user-agents.data -- Known scanner user-agent strings
  • lfi-os-files.data -- Sensitive OS file paths
  • sql-errors.data -- Database error message patterns
  • And more

ModSecurity Community Rules (46 rules)

Hand-crafted rules for threat categories not fully covered by the OWASP CRS:

FileRulesCategory
ip-reputation.yaml~15Bot/scanner/proxy IP detection
dos-protection.yaml~12DoS and abnormal request patterns
data-leakage.yaml~10PII and credential leak detection
response-checks.yaml~9Response body inspection

CVE Virtual Patches (39 rules)

Targeted detection rules for high-profile CVEs. These act as virtual patches, blocking exploit attempts before they reach vulnerable applications:

FileCVE(s)Description
2021-log4shell.yamlCVE-2021-44228, CVE-2021-45046Apache Log4j RCE via JNDI lookup
2022-spring4shell.yamlCVE-2022-22965, CVE-2022-22963Spring Framework RCE
2022-text4shell.yamlCVE-2022-42889Apache Commons Text RCE
2023-moveit.yamlCVE-2023-34362, CVE-2023-36934MOVEit Transfer SQL injection
2024-xz-backdoor.yamlCVE-2024-3094XZ Utils backdoor detection
2024-recent.yamlVarious2024 high-profile CVEs
2025-recent.yamlVarious2025 high-profile CVEs

TIP

CVE patch rules are set to paranoia level 1 by default, meaning they are active in all configurations. They have very low false positive rates because they target specific exploit payloads.

Built-in Detection Checkers

In addition to YAML rules, PRX-WAF includes detection checkers compiled into the binary. These run in dedicated phases of the detection pipeline:

PhaseCheckerDescription
1-4IP Allowlist/BlocklistCIDR-based IP filtering
5CC/DDoS Rate LimiterSliding-window rate limiting per IP
6Scanner DetectionVulnerability scanner fingerprints (Nmap, Nikto, etc.)
7Bot DetectionMalicious bots, AI crawlers, headless browsers
8SQL Injectionlibinjection + regex patterns
9XSSlibinjection + regex patterns
10RCE / Command InjectionOS command injection patterns
11Directory TraversalPath traversal (../) detection
14Sensitive DataAho-Corasick multi-pattern PII/credential detection
15Anti-HotlinkingReferer-based validation per host
16CrowdSecBouncer decisions + AppSec inspection

Updating Rules

Rules can be synced from upstream sources using the included tools:

bash
# Check for updates
python rules/tools/sync.py --check

# Sync OWASP CRS to a specific release
python rules/tools/sync.py --source owasp-crs --output rules/owasp-crs/ --tag v4.10.0

# Sync to latest
python rules/tools/sync.py --source owasp-crs --output rules/owasp-crs/

# Hot-reload after updating
prx-waf rules reload

Rule Statistics

View current rule statistics via the CLI:

bash
prx-waf rules stats

Example output:

Rule Statistics
===============
  OWASP CRS:    310 rules (21 files)
  ModSecurity:   46 rules (4 files)
  CVE Patches:   39 rules (7 files)
  Custom:         3 rules (1 file)
  ─────────────────────────
  Total:        398 rules (33 files)

  Enabled:      395
  Disabled:       3
  Paranoia 1:   280
  Paranoia 2:    78
  Paranoia 3:    30
  Paranoia 4:    10

Next Steps

Released under the Apache-2.0 License.