Medium Severity

Link: Google Cloud Storage with suffixed unsubscribe bucket

Description

Detects messages with exactly two Google Cloud Storage links serving the same file from two buckets, where one bucket name is the other plus a suffix (e.g. 'unsb'). Observed in bulk health-supplement, reward survey and fake storage-alert campaigns.

References

No references.

Sublime Security
Created Oct 6th, 2026 • Last updated Oct 6th, 2026
Source
type.inbound
// two distinct paths
and length(distinct(map(filter(body.links,
                               .href_url.domain.domain == "storage.googleapis.com"
                        ),
                        .href_url.path
                    )
           )
) == 2
// split each distinct path into bucket and trailer once
and any(map(distinct(filter(body.links,
                            .href_url.domain.domain == "storage.googleapis.com"
                     ),
                     .href_url.path
            ),
            // return just the bucket/trailer for the path
            regex.extract(.href_url.path,
                          '^/(?P<bucket>[^/]+)/(?P<trailer>.+)$'
            )[0]
        ),
        // loop the links that aren't the current .href_url.path (from the outer loop)
        any(map(distinct(filter(body.links,
                                .href_url.domain.domain == "storage.googleapis.com"
                                and .href_url.path != ..full_match
                         ),
                         // return just the .href_url.path
                         .href_url.path
                ),
                // create the bucket/trailer for the path
                regex.extract(.href_url.path,
                              '^/(?P<bucket>[^/]+)/(?P<trailer>.+)$'
                )[0]
            ),
            // this bucket is the outer bucket plus a suffix, serving the same trailer
            strings.starts_with(.named_groups['bucket'],
                                ..named_groups['bucket']
            )
            and .named_groups['trailer'] == ..named_groups['trailer']
        )
)
MQL Rule Console
•Docs•Learning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started