WAF Phase#
The Web Application Firewall (WAF) phase analyses requests for potential security threats.
Available Actions#
waf.block
: Blocks the request if it matches WAF rules.waf.log
: Logs the request details without blocking.
Fields#
The WAF phase provides access to the following fields:
Example#
The filter matches requests with a URI path that starts with "/admin/":
starts_with(http.request.uri.path, "/admin/")
The configuration blocks requests to the admin area that trigger WAF rules:
waf.block:
reason: "Unauthorised access attempt to admin area"
For more information on the waf.block
action, refer to the Modsecurity section in the vconf documentation.
Use Cases#
- Block SQL injection attempts
- Prevent cross-site scripting (XSS) attacks
- Protect against remote file inclusion (RFI) vulnerabilities
- Log suspicious requests for further analysis