-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ModSecurity for IIS 2.7.3 stops website login action #69
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
Comments
Hello, Are there any rules for phase response header/body ? Thanks |
Hi, SecRuleEngine is set to DetectionOnly by default. The rules I used is bundled with MSI package(modsecurity.conf), and its effective rules are: `SecRuleEngine DetectionOnly SecRequestBodyAccess On SecRule REQUEST_HEADERS:Content-Type "text/xml" SecRequestBodyLimit 13107200 SecRequestBodyInMemoryLimit 131072 SecRequestBodyLimitAction Reject SecRule REQBODY_ERROR "!@eq 0" SecRule MULTIPART_STRICT_ERROR "!@eq 0" SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" SecPcreMatchLimit 1000 SecRule TX:/^MSC_/ "!@Streq 0" SecResponseBodyMimeType text/plain text/html text/xml SecResponseBodyLimit 524288 SecResponseBodyLimitAction ProcessPartial SecTmpDir c:\inetpub\temp\ SecDataDir c:\inetpub\temp\ SecDebugLog C:\Logs\ModSecurity\debug.log SecArgumentSeparator & SecCookieFormat 0` |
Right, Can you turn debug level to 9 ? Maybe there is an important debug information we are missing. Thanks |
OK, now it looks like this.
|
After few tests conducted, it seems POST-based pages are effected. |
Right, What happens if you turn SecRequestBodyAccess Off ? |
Now pages work after setting SecRequestBodyAccess Off. |
This is a known issue. Looks like some modules other than ASP.NET have problem forward request body with ModSecurity. Right now you cannot enable request body in this cases. Thanks Breno |
Thanks for your help, Breno. |
There is actually another issue with ModSecurity with IIS, and that is, it does not allow objects to be created (error '80004005'). Took quite a while for us to figure this out. Using very latest version, and problem still exists. |
WinSrv 2008 R2 x64 IIS7.5 with PHP 5.4 via FastCGI
I found this issue existed after enabled Modsec in web.config.
At first, I thought it might be caused by crs rules. However, even I only include modsecurity.conf, it still act the same.
Here are debug log during login process. The webpage couldn't respond until connection timed out.
Initialising transaction (txid 12538021364746957633). Transaction context created (dcfg 969290). First phase starting (dcfg 969290). Starting phase REQUEST_HEADERS. Recipe: Invoking rule 299ec08; [file "c:\inetpub\wwwroot\owasp_crs\modsecurity.conf"] [line "24"] [id "200000"]. Transformation completed in 0 usec. Executing operator "rx" with param "text/xml" against REQUEST_HEADERS:Content-Type. Operator completed in 0 usec. Rule returned 0. Second phase starting (dcfg 969290). Input filter: Reading request body. Input filter: Completed receiving request body (length 109). Starting phase REQUEST_BODY. Recipe: Invoking rule 299d168; [file "c:\inetpub\wwwroot\owasp_crs\modsecurity.conf"] [line "55"] [id "200001"]. Transformation completed in 0 usec. Executing operator "!eq" with param "0" against REQBODY_ERROR. Operator completed in 0 usec. Rule returned 0. Recipe: Invoking rule 29a04a8; [file "c:\inetpub\wwwroot\owasp_crs\modsecurity.conf"] [line "76"] [id "200002"]. Transformation completed in 0 usec. Executing operator "!eq" with param "0" against MULTIPART_STRICT_ERROR. Operator completed in 0 usec. Rule returned 0. Recipe: Invoking rule 29a44d0; [file "c:\inetpub\wwwroot\owasp_crs\modsecurity.conf"] [line "81"] [id "200003"]. Transformation completed in 0 usec. Executing operator "!eq" with param "0" against MULTIPART_UNMATCHED_BOUNDARY. Operator completed in 0 usec. Rule returned 0. Recipe: Invoking rule 29a5408; [file "c:\inetpub\wwwroot\owasp_crs\modsecurity.conf"] [line "95"] [id "200004"]. Rule returned 0. Hook insert_filter: Adding input forwarding filter (r 29a9440). Hook insert_filter: Adding output filter (r 29a9440).
The text was updated successfully, but these errors were encountered: