Description

Detects inbound messages containing a .gz attachment that, when exploded, contains an email or HTML file. The rule then inspects the inner content for credential theft intent—either by parsing a well-formed embedded EML and running NLU classification on the message body, or, if the EML is malformed, by extracting HTML content, pulling href links, and running link analysis plus NLU classification on the resulting page text to identify high-confidence credential theft indicators.

References

No references.

Sublime Security
Created Sep 2nd, 2026 • Last updated Sep 2nd, 2026
Source
type.inbound
and any(filter(attachments, .file_type == "gz"),
        // archive contains an email or an html payload
        any(file.explode(.),
            any(.flavors.yara, . in ("email_file", "html_file"))
        )
        and (
          // well-formed inner eml, NLU on parsed body
          any(file.expand_archives(.).files,
              any(ml.nlu_classifier(file.parse_eml(.).body.current_thread.text).intents,
                  .name == "cred_theft" and .confidence == "high"
              )
          )
          // malformed inner eml, byte-scan html + link_analysis
          or any(filter(file.explode(.), any(.flavors.yara, . == "html_file")),
                 any(html.xpath(strings.parse_html(.scan.strings.raw),
                                '//a/@href'
                     ).nodes,
                     any(ml.nlu_classifier(ml.link_analysis(strings.parse_url(.raw
                                                            )
                                           ).final_dom.inner_text
                         ).intents,
                         .name == "cred_theft" and .confidence == "high"
                     )
                 )
          )
        )
)
MQL Rule Console
DocsLearning 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