ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
MODSEC-219: ctl:ruleEngine=Off does not stop processing.
config: ---------------------------------------------
SecAuditEngine On
SecRuleEngine On
SecRuleInheritance On
SecAuditLogType Serial
SecAuditLog "logs/security.log"
SecAuditLogParts ABCEFHKZ
SecAction "phase:1,pass,auditlog,msg:'Should appear'"
SecAction "phase:1,pass,auditlog,ctl:ruleEngine=Off,msg:'Rules processing should stop'"
SecAction "phase:1,pass,auditlog,msg:'Should NOT appear'"
Audit log: ---------------------------------------------
--29000000-H--
Message: Warning. Unconditional match in SecAction. [msg "Should appear"]
Message: Warning. Unconditional match in SecAction. [msg "Rules processing should stop"]
Message: Access denied with code 403 (phase 1). Unconditional match in SecAction. [msg "Should NOT appear"]
Action: Intercepted (phase 1)
--29000000-K--
SecAction "phase:1,log,pass,auditlog,msg:'Should appear'"
SecAction "phase:1,log,t:none,pass,auditlog,ctl:ruleEngine=Off,msg:'Rules processing should stop'"
SecAction "phase:1,log,deny,auditlog,msg:'Should NOT appear'"
MODSEC-219: ctl:ruleEngine=Off does not stop processing.
config: --------------------------------------------- SecAuditEngine On SecRuleEngine On SecRuleInheritance On SecAuditLogType Serial SecAuditLog "logs/security.log" SecAuditLogParts ABCEFHKZ
SecAction "phase:1,pass,auditlog,msg:'Should appear'" SecAction "phase:1,pass,auditlog,ctl:ruleEngine=Off,msg:'Rules processing should stop'"
SecAction "phase:1,pass,auditlog,msg:'Should NOT appear'"
Audit log: --------------------------------------------- --29000000-H-- Message: Warning. Unconditional match in SecAction. [msg "Should appear"] Message: Warning. Unconditional match in SecAction. [msg "Rules processing should stop"] Message: Access denied with code 403 (phase 1). Unconditional match in SecAction. [msg "Should NOT appear"] Action: Intercepted (phase 1)
--29000000-K-- SecAction "phase:1,log,pass,auditlog,msg:'Should appear'" SecAction "phase:1,log,t:none,pass,auditlog,ctl:ruleEngine=Off,msg:'Rules processing should stop'"
SecAction "phase:1,log,deny,auditlog,msg:'Should NOT appear'"
Second secAction should not trigger