CloFix WAF · Scripting Engine

OWASP CRS Core Rule Set

Industry-standard web attack detection with 25 rule files, 4 paranoia levels, and anomaly scoring. Runs custom WAF logic with isolated engines for precise request control.

Scripting Engine #4 24 details Published

Overview

💡 How it works: CloFix CRS processes requests through 4 phases with 25 rule files loaded in OWASP order. The anomaly scoring system aggregates weighted points from matched rules - reaching the configured threshold triggers blocking. Paranoia levels allow gradual tuning from minimal false positives (Level 1) to maximum security (Level 4). The intelligent bypass system supports rule ID, tag, phase, path, and IP bypasses. All rule processing uses the Coraza engine with Hyperscan regex, handling 100,000+ requests/second. Configuration uses `CloFixRule` directives with variables, operators, transformations, and actions. Rules automatically update from the OWASP CRS repository every 6 hours.

Feature details

25 Rule Files

Complete OWASP CRS v4 rule set covering initialization, IP reputation, protocol enforcement, LFI, RFI, RCE, SQLi, XSS, NoSQL, and response leakage detection

Paranoia Levels 1-4

Level 1 (minimal false positives, general production) to Level 4 (maximum security, high-risk apps) - adjustable per domain or globally

Anomaly Scoring

Threshold-based blocking with configurable scores (default 5 inbound, 4 outbound). CRITICAL=5pts, ERROR=4pts, WARNING=3pts, NOTICE=2pts, INFO=1pt

CloFixRule Directive

CRS-style custom rules with variables (ARGS, REQUEST_HEADERS, BODY), operators (@rx, @contains, @streq), and transformations (t:lowercase, t:urlDecode, t:htmlEntityDecode)

SQL Injection (942xxx)

Union-based, time-based sleep/benchmark, boolean blind, error-based, stacked queries - 100+ rules covering all evasion techniques

Cross-Site Scripting (941xxx)

Script tags, event handlers, JavaScript protocol, SVG/iframe injection, and reflected/stored/DOM-based XSS detection

Local/Remote File Inclusion (930xxx, 931xxx)

Path traversal (`../`, `..\`), sensitive file access (/etc/passwd, /windows/win.ini), PHP wrappers (php://), remote includes (http://, ftp://)

Command Injection (932xxx)

Unix command chaining (`;`, `|`, `&&`, `` ` ``), Windows cmd.exe, PowerShell, and dangerous command execution detection

SSRF Protection (933xxx)

Internal IP ranges (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x), cloud metadata endpoints (169.254.169.254, metadata.google.internal)

NoSQL Injection (970xxx)

MongoDB operators (`$ne`, `$gt`, `$or`, `$where`, `$regex`), JavaScript injection in NoSQL queries

Bot Detection (910xxx)

Malicious user agents (sqlmap, nikto, wpscan, gobuster), headless browsers (Puppeteer, Playwright, Selenium), and security scanners

Protocol Enforcement (920xxx)

HTTP method restrictions, protocol violations, header injection, Host header attacks, malformed request detection

IP Reputation (910xxx)

Tor exit nodes, VPN/proxy detection, known malicious IPs, and blacklist integration with hourly updates

DoS Protection (912xxx)

Rate-based DoS detection with configurable thresholds and blocking actions

Response Inspection (950xxx, 951xxx)

Data leakage detection (credit cards, SSNs, API keys), SQL error messages, and information disclosure prevention

Intelligent Bypass System

Bypass by rule ID, tag (`attack-sqli`, `paranoia-level/3`), phase (1-4), path (`/health`, `/api/public/*`), or IP (`127.0.0.1`, `192.168.1.*`)

Transformations Chain

Multiple transformations applied in sequence - lowercase, URL decode, HTML entity decode, remove nulls, compress whitespace - defeating evasion techniques

Automatic Rule Updates

CRS rules update from official OWASP repository every 6 hours - zero-day protection within hours of disclosure

Coraza WAF Engine

Modern Go-based ModSecurity-compatible engine with Hyperscan regex - 5-10x faster than traditional ModSecurity

Multi-Phase Inspection

Phase 1 (request headers), Phase 2 (request body), Phase 3 (response headers), Phase 4 (response body) - comprehensive coverage

Virtual Patching

Create custom CloFixRule directives to patch vulnerable applications without code changes - deploy within minutes of vulnerability disclosure

Compliance Mode

Pre-configured rule sets for PCI DSS 4.0, HIPAA, and GDPR with audit logging and reporting

False Positive Analysis

Dashboard showing most triggered rules, false positive rate, and suggested exclusions based on traffic patterns

Rule Testing

Built-in regression testing with attack payload simulation to validate rule effectiveness before production deployment

How CloFix WAF uses it

💡 How it works: CloFix CRS processes requests through 4 phases with 25 rule files loaded in OWASP order. The anomaly scoring system aggregates weighted points from matched rules - reaching the configured threshold triggers blocking. Paranoia levels allow gradual tuning from minimal false positives (Level 1) to maximum security (Level 4). The intelligent bypass system supports rule ID, tag, phase, path, and IP bypasses. All rule processing uses the Coraza engine with Hyperscan regex, handling 100,000+ requests/second. Configuration uses `CloFixRule` directives with variables, operators, transformations, and actions. Rules automatically update from the OWASP CRS repository every 6 hours.

Canonical URL: https://clofix.com/features/clofix-waf/owasp-crs/