Sublime Security medium experimental mql

Link: Base64-encoded redirect URL

Identifies inbound messages containing links where the URL path includes a base64-encoded string that, once decoded, either reveals an embedded destination URL (via a 'u' parameter) or resolves to a known URL shortener domain. This obfuscation technique is commonly used to disguise the true destination of a link and evade detection.

View Source

Detection Logic

type.inbound
and 0 < length(body.current_thread.links) <= 3
and any(body.links,
        any(regex.iextract(.href_url.path,
                           '/[a-z]{1,3}/([A-Za-z0-9+/=_-]{20,})'
            ),
            any(regex.iextract(strings.decode_base64(.groups[0],
                                                     ignore_padding=true
                               ),
                               '"u":"(https?://[^"]+)"'
                ),
                strings.parse_url(.groups[0]).domain.root_domain in $url_shorteners
            )
        )
)

Field Validations

Loading…

Comments (0)

Loading comments...