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.

_Issue originally created by user csanders-git on date 2016-07-27 23:17:21. Link to original issue: https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/457._

Rule 942180 evaluation: We are first evaluating this first alternative of this rule (?:(?i:\d[\"']\s+["‘]\s+\d) The author of the rule did not leave any indication of its use but we can guess some things from some examples. 5" " 5 6’ ’ 6 Etc.

This is actually a very weird oddity of SQL attackercan. The general formula one might expect to see is the follows

SELECT * FROM xyz WHERE serialized = '$USER_INT';

It turns out the following is also valid SQL: SELECT * FROM xyz WHERE serialized = '1''1'

But really SQL will evaluate almost anything. For instance: SELECT * FROM xyz WHERE serialized = '1''hey'

In these weird cases, the system doesn’t return anything additional, it’s as if it just forgets about the extra but hey, that doesn’t matter it may be used for determining if there is SQL injection.

Alright so here’s the short and skinny. It seems that ANYTHING can be included after EXCEPT a number in the first digit. Now there are some false positives for valid SQL that we will incure by saying \D (like .5 and -5 are not valid)

The suggested Regex is: (?:\d[\"']\s*?["']\D)

Examples: SELECT * FROM x WHERE serialized = ‘1’ ’ 5’ ~!~SELECT * FROM x WHERE serialized = ‘1’ ‘5’ SELECT * FROM x WHERE serialized = ‘1’ ‘test’ SELECT * FROM x WHERE serialized = ‘1’ ’ test’ SELECT * FROM x WHERE serialized = ‘1’ ’ ’ SELECT * FROM x WHERE serialized = ‘1’ ‘’ SELECT * FROM x WHERE serialized = ‘1’‘’

This is likely to have HIGH false positives and therefore should be in PL 3 or 4 since 942180 is already in PL2

Issue Analytics

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

github_iconTop GitHub Comments

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

User attackercan commented on date 2016-07-28 09:36:51:

Rule 921120 Full description of found problem here: https://github.com/netty/netty/issues/5535 Proposition looks good

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

User csanders-git commented on date 2016-07-29 15:17:12:

Add new rule 920270 to CRS 2.x for backwards compatibility

SecRule ARGS|ARGS_NAMES|REQUEST_HEADERS|!REQUEST_HEADERS:Referer “@validateByteRange 1-255”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vlad SuperList · Issue #457 · SpiderLabs/owasp-modsecurity-crs
On rule 941310: The issue is VERY rare, only usable against Tomcat, apparently. In any even the evasion is relevant. The rule was...
Read more >
Pitch Decks
Get inspired by the best pitch decks in the industry with a collection of tips and examples from successful entrepreneurs and founders.
Read more >
Untitled
My superlist!!
Read more >
The Top Pre-IPO Companies to Watch 2020–2021 (SuperList)
The Top Pre-IPO Companies to Watch 2020–2021 (SuperList) ... Founded Date — 2013 (HQ, SF, CA); Founders — Baiju Bhatt, Vlad Tenev.
Read more >
VLAD Alina - BIGCycling
960 - VLAD Alina. Location: Bistrita. Date of birth: 11-05-1982. Gender: F ... Superlist 1000 BIGs, 5. Natacha-AT, 2. Natacha-RO, 3. Statistics. Hardest:...
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