You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comparison shows how modsec v2 implementation:
Returns the conversion up to when an unexpected character is found
Is resilient if the padding is not explicit
Being the decoding used to try to deobfuscate malicious payloads, I feel that could be beneficial to be less strict and try to match even partially decoded strings.
The text was updated successfully, but these errors were encountered:
Though at the time I guess CRS didn't exercise the case to know exactly which implementation is preferred. It would be confirmed what the difference between those two transformations is supposed to be though.
t:base64decode
does not perform the decoding when a not perfectly crafted base64 is provided.Rule for logging:
Test1: perfectly crafter base64:
PFRFU1Q+
Request:
curl -H "test: PFRFU1Q+" http://localhost:8090
Coraza:
[msg "Phase 1: REQUEST_HEADERS:Test : <TEST>"]
Modsecv2:
[msg "Phase 1: REQUEST_HEADERS:test : <TEST>"]
Test2: space in the base64:
PFR FU1Q
(common if the base64 gets urldecoded and the + becomes a space)Request:
curl -H "test: PFR FU1Q+" http://localhost:8090
Coraza:
[msg "Phase 1: REQUEST_HEADERS:Test : PFR FU1Q+"]
Modsecv2:
[msg "Phase 1: REQUEST_HEADERS:test : <T"]
Test3: base64 missing padding:
PFRFU1Q
Request:
curl -H "test: PFRFU1Q" http://localhost:8090
Coraza:
[msg "Phase 1: REQUEST_HEADERS:test : PFRFU1Q"]
Modsecv2:
[msg "Phase 1: REQUEST_HEADERS:test : <TEST"]
(equivalent ofPFRFU1Q=
)The comparison shows how modsec v2 implementation:
Being the decoding used to try to deobfuscate malicious payloads, I feel that could be beneficial to be less strict and try to match even partially decoded strings.
The text was updated successfully, but these errors were encountered: