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.

SQLi rule 942410 could use word separators

See original GitHub issue

_Issue originally created by user lifeforms on date 2017-05-02 10:58:59. Link to original issue: https://github.com/SpiderLabs/owasp-modsecurity-crs/issues/761._

Got a false positive for Zomerzangweek (9 t/m 12 jaar)

Message: Warning. Pattern match "(?i:(?:(?:s(?:t(?:d(?:dev(_pop|_samp)?)?|r(?:_to_date|cmp))|u(?:b(?:str(?:ing(_index)?)?|(?:dat|tim)e)|m)|e(?:c(?:_to_time|ond)|ssion_user)|ys(?:tem_user|date)|ha(1|2)?|oundex|chema|ig?n|pace|qrt)|i(?:s(null|_(free_lock|ipv4_compat|ipv4_mapped|ipv4|ipv ..." at ARGS:menu-item[-26][menu-item-title]. [file "/etc/apache2/security2/crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [line "961"] [id "942410"] [rev "2"] [msg "SQL Injection Attack"] [data "Matched Data: week ( found within ARGS:menu-item[-26][menu-item-title]: Zomerzangweek (9 t/m 12 jaar)"]

Seems to me that we could look for a \b word separator at the start of the SQL keywords without ill effects.

The 942410 regexp is pretty daunting though. Let’s hope we got the source for this regexp from Ofer.

Issue Analytics

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

github_iconTop GitHub Comments

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

User franbuehler commented on date 2017-06-04 07:48:40:

The FP should be resolved with PR 791. And yes, dune73, I’ve almost finished disassembling the regexp. I’ll finish, test and then make a PR for 3.1/dev.

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

User ketaanhshah commented on date 2019-07-11 15:03:35:

franbuehler dune73 hey guys we got a 942410 exception where it caught it where the match was " is (" basically it is a legitimate one for us as our businessType Arguments have a value which containg " is (" and now what we have to do here is to disable this 942410 rule on WAF… you think this is correct? I know we can simply exclude the ARGS (businessType) but we may get more new Arguments 😦.

RuleGroup RuleId Argument MatchedExpression Message Count
942-APPLICATION-ATTACK-SQLI 942120 ARGS:Account.Password << SQL Injection Attack: SQL Operator Detected 2
942-APPLICATION-ATTACK-SQLI 942410 ARGS:Account.BusinessType is SQL Injection Attack 1
942-APPLICATION-ATTACK-SQLI 942410 ARGS:Account.BusinessType.Caption is SQL Injection Attack 1
Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLi rule 942410 could use word separators #761 - GitHub
I disassembled the list from regex 942410 so far to find the right place for the word boundary at the start of the...
Read more >
changes - GitHub
Especially the "Accept-Charset" header may be in use by clients. ... from 942100 (Christian Folini) * Add word boundary to rule 942410 (Franziska...
Read more >
Disassembling SQLi Rules
Introduction I would like to explain my work disassembling highly optimized regular expressions. A project like this might discourage many ...
Read more >
How to tune your WAF installation to reduce false positives
This article will help you reduce false positives on NGINX, leaving you with a clean installation that allows legitimate requests to pass ...
Read more >
Handling False Positives with the OWASP ModSecurity Core ...
With the Core Rule Set 2.2.x, this would have been simple, but with the 3.0 ... ModSec Rule Exclusion: 942410 : SQL Injection...
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