question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression tests for rule 931110 might be broken

See original GitHub issue

_Issue originally created by user studersi on date 2019-04-09 13:12:29. Link to original issue: https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/1342._

Type of Issue

The regression tests for rule 931110 in owasp-modsecurity-crs\util\regression-tests\tests\REQUEST-931-APPLICATION-ATTACK-RFI/931110.yaml might not effectively test the rule 931110.

Description

When I try to recreate the behaviour of the test request in 931110-1, the request is not blocked. But when I add parts of a URL, the request is blocked. This is consistent with the regex defined in rule 931110.

"@rx (?i)(?:\binclude\s*\([^)]*|mosConfig_absolute_path|_CONF\[path\]|_SERVER\[DOCUMENT_ROOT\]|GALLERY_BASEDIR|path\[docroot\]|appserv_root|config\[root_dir\])=(?:file|ftps?|https?):\/\/"

These are the requests I used to reproduce the problem.

$ curl -v 'https://xxx.ch/?_CONF[path]' 2>&1 | grep "< HTTP/2"
< HTTP/2 200
$ curl -v 'https://xxx.ch/?_CONF[path]=https://' 2>&1 | grep "< HTTP/2"
< HTTP/2 403

The URL used in the regression test looks like this:

uri: /plugins/spamx/BaseAdmin.class.php?_CONF[path]

According to the regex, this should not match, but somehow the automated tests still succeed in the context of the CRS Project. The same is true for other tests for this rule.

Your Environment

  • CRS version: v3.1.0
  • ModSecurity version: 2.9.1
  • Web Server and version: apache2 2.4.25
  • Operating System and version: Debian

Confirmation

[x] I have removed any personal data (email addresses, IP addresses, passwords, domain names) from any logs posted.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
CRS-migration-botcommented, May 13, 2020

User studersi commented on date 2019-04-09 14:22:36:

Thanks for the quick response fgsch. I missed the fact that there are disabled rules, but this explains it.

I’ll look into it this weekend, I might be able to fix a few of them.

0reactions
CRS-migration-botcommented, May 13, 2020

User studersi commented on date 2019-04-13 11:41:28:

Ok, I created a pull request here: https://github.com/SpiderLabs/owasp-modsecurity-crs/pull/1350.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression tests for rule 931110 might be broken · Issue #1342
When I try to recreate the behaviour of the test request in 931110-1, the request is not blocked. But when I add parts...
Read more >
The Problem with How We Do Regression Testing | StickyMinds
Summary: Current approaches to automated UI testing are broken because regression testing is not testing; regression testing is version control ...
Read more >
owasp-modsecurity-crs: CHANGES - 3.1.1 vs. 3.2.0 ... - Fossies
OWASP ModSecurity Core Rule Set (CRS) CHANGES == == OWASP ModSecurity Core Rule ... Update regression tests for rules 931110, 931120, 931130 (Simon...
Read more >
5429 – gcc 3.1 20020114 fails with Internal compiler error in ...
When compiling attached t.i (a further simplified version of the amd74xx.i subitted for PR 5428) with 'gcc -c -march=i686 -O2', you get an...
Read more >
l, 93 1 230 9 5. - DTIC
FINALDISPOSITION: This report may be destroyed when it is no longer needed. ... In the first regression analysis three statistics derived from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found