-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In phase:4, Disruptive actions is set to deny,Connection will be reset. #1784
Comments
@yeyouli what's in the contents of your Nginx error log? |
@p0pr0ck5 Thank you for your reply,
|
HI @yeyouli, This is known issue with Nginx-connector where phase:4 processing still have some rough edges. I'm not sure if this works for you as a temporary workaround, but setting a 403 for phase:3 is working fine. Please refer to owasp-modsecurity/ModSecurity-nginx#84 for related issues and proposed changes being evaluated for fixing response body processing, and please follow up on those issues. Also, the issue you've mentioned with the @pm operator is being addressed at #1167 and #1645. Please follow up with your observations/bug report on those issues. Thanks! |
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.
The text was updated successfully, but these errors were encountered: