-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
LFI path traversal rules using REQUEST_BODY cannot be excluded #597
Comments
User lifeforms commented on date 2016-11-22 18:47:39: As predicted I've got some FP complaints in CRS3 about this one, and it's impossible to write |
User dune73 commented on date 2016-11-23 06:39:39: No feedback from rbarnett on some other channel? |
User rbarnett commented on date 2016-11-23 06:49:36: dune73 wrong rbarnett 😃 |
User lifeforms commented on date 2017-05-18 13:27:01: Another false positive popped up in #783 which underscores that we really should check Edit: if there are good reasons for scanning |
User lifeforms commented on date 2018-12-19 10:24:03: Another person was bitten by this problem in #1264. One big problem is the rule running on Another problem with the rule is that
(That's for unix path separator I could do more analysis, but when I last looked at it a long time ago, these appeared to catch all my dir traversal attempts in prod. Are there more preceding characters that set up a dangerous context for Then we have the final question, the amazingly complex and rich regexp that's in our rule currently. Does it have any magic which I'm missing? Probably... in which case we could keep the current regexp in PL2 as a safety measure. So in summary I would suggest:
|
User welljsjs commented on date 2019-01-09 16:50:59: Sorry for interfering, but I recently ran into the same issue. I was just curious whether there's any update on this. What's the reason for not using |
User lifeforms commented on date 2019-01-09 19:41:33: I wish I knew, BUT my patience with this rule is getting thin. Let's fix it in the next release. |
User mhoran commented on date 2019-05-05 13:47:35: I just hit this after enabling modsecurity and the CRS for my WordPress site. I had a draft post that had a sentence ending in "...". Of course, the thing that comes after "..." is a newline, or "\n" -- which triggers rule 930110 and 942440. The WordPress exclusions don't do anything to handle this, so I couldn't save my post. I deleted it and recreated without the "...", but fortunately I had access to the modsecurity audit log otherwise I would have had no idea what was happening. |
User dune73 commented on date 2019-05-07 07:18:39: It's an annoying problem and we should take care of it. But with so many other things going on, it did not get priority so far. Sorry. |
User dune73 commented on date 2020-02-11 13:56:35: emphazer volunteered to take on this issue as he has been affected before. This is likely to take until March 2020 though. Meeting minutes: SpiderLabs/owasp-modsecurity-crs#1671 (comment) |
This issue has been open 120 days with no activity. Remove the stale label or comment, or this will be closed in 14 days |
@swotiendang What do you mean? This issue was about excluding rule 930110 for a specific parameter. |
Hi @azurit , seem like this is issue with Microsoft, not coreruleset. I raised it with my team instead, you can skip my previous comment in #597 (comment) Related: #3710 (comment) |
Issue originally created by user lifeforms on date 2016-10-02 10:24:28.
Link to original issue: SpiderLabs/owasp-modsecurity-crs#597.
I'm tuning for WordPress FP right now, and I want to exclude some fields. For instance, I'd like to allow people to use the
../
sequence (LFI, rule 930110) in a password field.However, it's currently impossible for me to exclude this LFI check from a parameter. Normally I would do
ctl:ruleRemoveTargetByTag=CRS;ARGS:passwd
to exclude the parameterpasswd
from all our rules.But rule 930110 is still firing on
../
in a password string. The reason is that rule 930110 is not checkingARGS
, but instead it is checking the following variables instead:This makes it impossible to selectively exclude this rule for a single query parameter, unless I want to remove the whole
REQUEST_BODY
target which I'd prefer not to do.The raw uri/body check is rather rare in the CRS; rule 930100 also has it. I think I can see why the body is checked -- an unencoded post body (stdin) is often used for code injection, plus perhaps it could have a performance advantage over scanning the args. I see that the commit, 0a035cc, was made in 2014 by Ryan. Do you recall why this approach was taken rcbarnett? (If you have time to look at it!)
I think a body payload should turn up in
ARGS_NAMES
as well, so we could probably switch the rule's variables over without losing detection. But I'd want to add a lot of tests for it. Realistically it might probably be too late for 3.0, although I could see more people hitting this problem.The text was updated successfully, but these errors were encountered: