Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Cyrilyc charracters to unicode.mapping #2353

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

Open
zeridon wants to merge 2 commits into owasp-modsecurity:v3/master
base: v3/master
Choose a base branch
Loading
from zeridon:add-cyrilyc-mapping

Conversation

Copy link

@zeridon zeridon commented Jul 8, 2020

When using ModSecurity to protect sites written in non-english language a unicode mapping is required to translate characters to ascii (latin) equivalents. This is used in different places.

Most commonly (at least in my scenario) this falls on it heads when decoding strings and evaluating them for sql injection and similar nastiness.

If the mapping is incomplete (as currently is) the input is decoded to some garbage which triggers sql injection alert

Sample:
name1=%D0%B4%D0%B8%D0%BC%D0%B8%D1%82%D1%80%D0%BE%D0%B2 is decoded as name1: \\\\\\\\x135>@3852\ which strangely enough matches 1ov in libinjection (libinjection is not point of discussion here).

The issue is exactly the same as:

The following pull request adds mapping for some cyrilyc characters (at least for my use case). More speciffically unicode range 0x0410 - 0x44f. Attempt was made to follow as best transliteration rules, but as some glyphs are transliterated to multiple characters (e.g. Щ == SHT) some decissions have been made.

This has been tested and is currently being used in production.

Versions:

  • ModSecurity: 2.9.2 (ubuntu 18.04 packaged)
  • CRS: 3.0.2

wolfsoft reacted with thumbs up emoji
@zimmerle zimmerle added the 3.x Related to ModSecurity version 3.x label Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
3.x Related to ModSecurity version 3.x
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /