Closed
Description
MODSEC-254: The current transformation function replaceComments is not sufficient for two cases -
- It is replaced with a space char which can cause false negatives when the SQL comments are inserted directly into SQL keywords like this -
?param=UNI/blah/ON+SEL/blah/ECT
The resulting payload would become -
UNI ON SEL ECT
And this would evade signatures that look for these keywords.
- If the payloads has unterminated SQL comments like this -
?param=1'UNION/!0SELECT user,2,3,4,5,6,7,8,9/!0from/!0mysql.user/-
The resulting payload would become -
1'UNION
We need a new tfns called removeComments that simply strips any /.../, or /* strings in place but does not remove any other text and does not replace it with spaces
Metadata
Metadata
Assignees
Labels
No labels