Sublime Security medium experimental mql

Attachment: Google share.google URL shortener in undocumented redirect forms

Detects inbound messages whose attachments contain links in either of two undocumented Google share.google redirect forms: google.<tld>/share.google?q=<code>, and share.google/?link=<url>. Both inherit Google domain reputation to mask an attacker-controlled destination. Google publishes the share.google shortener as a share.google/<code> path, but neither the on-Google-domain ‘q’ form nor the ‘link’ parameter form is documented. ICS calendar attachments are covered by a separate rule.

View Source

Detection Logic

type.inbound
and any(attachments,
        not (
          .file_type == "ics"
          or .file_extension == "ics"
          or .content_type in ("application/ics", "text/calendar")
        )
        and any(file.explode(.),
                any(.scan.url.urls,
                    (
                      .domain.sld == "google"
                      and strings.istarts_with(.path, '/share.google')
                      and 'q' in keys(.query_params_decoded)
                    )
                    or (
                      .domain.root_domain == "share.google"
                      and any(["link", "_task", "_mbox", "_mimeclass"],
                              . in keys(..query_params_decoded)
                      )
                    )
                )
        )
)

Field Validations

Loading…

Comments (0)

Loading comments...