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
{{ message }}
Repository navigation
gsbLookup does not perform canonicalization and lookups correctly #381
MODSEC-227: The gsbLookup operator does not perform canonicalization correctly. The example from the Safe Browsing manual (http://a.b.c/1/2.html?param=1) results in two lookups:
We are doing now the most common lookups (full url and base urls). We will improve it in minor versions of 2.6.x.
Also.. transformation must be used when users want to use gsblookup.
ivanr: I disagree with your assessment and the change of the type to "Improvement". The current implementation of gsbLookup does not follow the specification and is thus faulty. Even if you accept that only 2 lookups are acceptable, the canonicalization issue still remains. For example, when sent (notice the dot at the end of the hostname):
Activity
rcbarnett-zz commentedon Oct 17, 2013
Original reporter: ivanr
rcbarnett-zz commentedon Oct 17, 2013
bpinto: Ivan,
We are doing now the most common lookups (full url and base urls). We will improve it in minor versions of 2.6.x.
Also.. transformation must be used when users want to use gsblookup.
rcbarnett-zz commentedon Oct 17, 2013
ivanr: I disagree with your assessment and the change of the type to "Improvement". The current implementation of gsbLookup does not follow the specification and is thus faulty. Even if you accept that only 2 lookups are acceptable, the canonicalization issue still remains. For example, when sent (notice the dot at the end of the hostname):
Target value: "http://a....b.c/1/2.html?param=1"
GSB: Successfully extracted url: a....b.c/1/2.html?param=1
GSB: Canonicalize url #2: a....b.c/
The operator will completely miss the attack.
rcbarnett-zz commentedon Oct 17, 2013
bpinto: For now we are doing the lookups when we see a url a.b.c/a/b/index.html
1 - a.b.c/a/b/index.html
2 - a.b.c/
We will implement the full transformations soon
rcbarnett-zz commentedon Oct 17, 2013
bpinto: Added more improvements:
1 - reduce .. to .
2 - parser supports . in the end of domain
3 - better domain parser
a.b.c.d/
b.c.d/
c.d/
rcbarnett-zz commentedon Oct 17, 2013
bpinto: Added reduce multiple slashes in a single slash
rcbarnett-zz commentedon Oct 17, 2013
bpinto: This is what we will have for 2.6.0
Example : a.b.c/1/2.html?param=1
1- a.b.c/1/2.html?param=1
2- a.b.c/1/2.html
3- a.b.c/
4- a.b.c/1/
5- b.c/1/2.html?param=1
6- b.c/1/2.html
7- b.c/
8- b.c/1/
Also :