Skip to content

In phase:4, Disruptive actions is set to deny,Connection will be reset. #1784

Closed
@yeyouli

Description

@yeyouli

Hello,
We are running https://github.com/SpiderLabs/ModSecurity/releases/tag/v3.0.2 and https://github.com/SpiderLabs/ModSecurity-nginx/releases/tag/v1.0.0 with openresty/1.13.6.2.
I'm attaching the rule set + modsecurity configuration as well.

When I tested the rules, I discovered that in phase:4 I turned the disruptive actions 'pass' to 'deny', the return page was not 403, but the connection was reset.
rule eg:
SecRule RESPONSE_BODY "@pm MySqlClient." phase:4,id:17040000,t:none,t:urlDecodeUni,t:htmlEntityDecode,deny,ctl:auditLogParts=+E,nolog,setvar:tx.sql_error_match=1,tag:'INFORMATION_LEAKAGE/DATABASE_INFO_LEAKAGE'"

furthermore,When using the 'pmf' or 'pmFromFile 'instruction, the value cannot be exactly matched.
rule eg:
SecRule RESPONSE_BODY "@pmf sql-errors.data" phase:4,id:17040000,t:none,t:urlDecodeUni,t:htmlEntityDecode,deny,ctl:auditLogParts=+E,nolog,setvar:tx.sql_error_match=1,tag:'INFORMATION_LEAKAGE/DATABASE_INFO_LEAKAGE'"

This is the modsec_debug.log
[4] (Rule: 17040000) Executing operator "PmFromFile" with param "sql-errors.data" against RESPONSE_BODY. [9] T (0) t:urlDecodeUni: "MySqlClient. " [9] T (1) t:htmlEntityDecode: "MySqlClient. " [9] Target value: "MySqlClient.\x0a" (Variable: RESPONSE_BODY) [4] Rule returned 0.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions