-
Notifications
You must be signed in to change notification settings - Fork 1.7k
POST body is not inspected by modsecurity #684
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
Did you have the SecRequestBodyAccess enabled? |
Yes, it is enabled |
Can you share the output of your ModSecurity debug log and configurations? |
Here you go.
|
Sorry forthe display. |
Can you enable the SecDebugLog and share the output ? Currently it is: Will be great to have an output like this: Thanks, |
|
I'll share debug log. |
Too much characters. I have to split it |
You can paste your data here - https://gist.github.com/ and then put an html link here for us to view. |
ok |
Here you go |
No Comment about this issue? |
Has this issue already seen somewhere else? thank you in advance for your help |
Hi @code1955, we saw that you application is exchanging JSON contents, you probably want to test our JSON branch. It supports does support to parser the JSON content. It is available here: https://github.com/SpiderLabs/ModSecurity/tree/json |
Could you please capture your traffic and paste/mail/share_privately your POST payload here? You can sanitize/redact sensitive data. |
s/Could you please/Is it possible for you to/ |
Hi Anoop, it's already on github
|
Thank you. I'll check it!
|
Hi @code1955 |
Dears, I received several advises and I'd like to thank you for your support. Kind regards, Jean-Raymond On Thu, Mar 27, 2014 at 2:10 PM, Anoop Saldanha [email protected]:
|
Hi Anoop, The information you're asking for can be found there: https://gist.github.com/code1955/9668518 Kind regards On Thu, Mar 27, 2014 at 2:10 PM, Anoop Saldanha [email protected]:
|
@code1955 did you had a chance to have the json branch tested? |
Hi Felipe, I Should I download the modsecurity-json.zip file and run this?: These tools are built during the ModSecurity configure process run under What will have to be done afterward? Kind regards On Fri, Mar 28, 2014 at 2:55 PM, Felipe Zimmerle
|
Download the file from GitHub, as you are doing, and then try the following: cd /path/to/your/modsecurity-extracted-files/ double check to see if "make install" really placed the mod_security2.so in the correct folder. |
Ok, thanks, I'll give that the sys engineer. Have great week end! On Fri, Mar 28, 2014 at 3:15 PM, Felipe Zimmerle
|
Hi Felipe, Update has been done, but nothing has changed. -- [[ Enable XML Body Parsing ]]The rules in this file will trigger the XML parser upon an XML requestInitiate XML Processor in case of xml content-typeSecRule REQUEST_HEADERS:Content-Type "Application/json" Just a copy/past of XML directive. I'm going to check logs. Any other advise is welcome. Kind regards, JR On Fri, Mar 28, 2014 at 3:15 PM, Felipe Zimmerle
|
Hi @code1955, Did you made this tests using our release candidate version or the json branch? ModSecurity recommended configuration file contains the example to invoke the json parser: Do you ming to share the logs again? |
Hi Felipe, I tested the JSON branch as per your advise. [22/Apr/2014:16:02:22 +0200] "/opt/apache/common_modsecurity/modsecconf/modsecurity-recommended.conf"] [22/Apr/2014:16:02:22 +0200] "!@eq 0" [22/Apr/2014:16:02:22 +0200] [22/Apr/2014:16:02:22 +0200] "0" against REQBODY_ERROR. Kind regards, JR On Fri, Apr 11, 2014 at 3:32 PM, Felipe Zimmerle
|
Hi @code1955, Can you provide the full log, as you did on the comment: #684 (comment) ? Also, we have release the version 2.8.0 which incorporates the features of the json branch, it will be good to test on 2.8.0 instead. |
Hello Guys, I'm trying to come up with a simple rule that will deny specific string on a POST body data. Can you help me create this rule? :) Thanks |
@lelekos You shouldn't comment on existing threads your issue is not related. Also I would suggest you read the ModSecurity reference manual or use the mailing list for support queries. Anyway, a simple rule like:
|
Hi Zimmerle , and others, Reading back this post, I apologise for my silence JR |
Hello, I have actually made it to load the strings though a .txt file: SecRule ARGS "@pmFromFile c:\inetpub\wwwroot\private\badstrings.txt" "t:normalisePathWin,deny,id:49459,severity:4,msg:'NO'" @void-in thanks. Alex |
Hi guys, i have problem with ModSecurity, it is fail to parse Example of request is (it admin-ajax.php request in WP, one of them): Audit log is:
Debug Level 9 for such request here: https://gist.github.com/md2k/b0e5acc42c153a3c8a66eda6f40feb75 I use current lates master of v3/master branch and ModSec Nginx dynamic module repository to create plugin (also latest) Any idea what wrong with it, from my point of view it is normal request which is pretty common in web? As addition, nginx compiled with options:
|
Any updates for this ? |
@zimmerle can you take a look for this issue? (i use V3 branch with Nginx through ModSecurity-Nginx module), OWASP 3.0.0 |
Hi @md2k, Originally this issue was about a problem on ModSecurity version 2.x. As I can see you are having trouble on v3.x. Do you mind to open an specific issue for it? |
No longer a concern in libModSecurity. Marking it as won't fix for 2.x. Further information about libModSecurity available here: |
Hi,
We are suffering an issue related to POST inspection.
We are running modsecurity 2.7.7 on apache 2.5.3
Backend application is running on Jetty 2.9.
The application presents a login form to the end user.
When filling in the login fields with crafted data, like sql strings, the call is accepted and sent to the backend application.
But adding sql strings in the URL blocks the call.
Backend application is at risk as modsecurity is the only security control in place.
I've been suggested to enable SecStreamInBodyInspection, but it doesn't work.
Any help is welcome.
Kind regards,
The text was updated successfully, but these errors were encountered: