Detection rules › Sublime MQL

Sublime MQL rules: qr

QR code to auto-download of a suspicious file type (unsolicited)

#
Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

A QR code in the body of the email downloads a suspicious file type (or embedded file) such as an LNK, JS, or VBA. Recursively explodes auto-downloaded files within archives to detect these file types.

Threat Classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion, LNK, Social engineering

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • headers
  • headers.auth_summary
  • sender.email
  • type

Rule Body

type.inbound
//
// This rule makes use of a beta feature and is subject to change without notice
// using the beta feature in custom rules is not suggested until it has been formally released
//
and beta.scan_qr(file.message_screenshot()).found
and any(beta.scan_qr(file.message_screenshot()).items,
        any(ml.link_analysis(.url).files_downloaded,
            strings.ilike(.file_name, "*.exe")
            or .file_extension in (
              "dll",
              "exe",
              "html",
              "lnk",
              "js",
              "vba",
              "vbs",
              "vbe",
              "bat",
              "py",
              "ics",
              "sh",
              "ps1"
            )
            // or call file.explode to get yara/mime types
            or any(file.explode(.),
                   // file ext is not dll but is exe mime/yara
                   (
                     .file_extension not in ("dll", "exe")
                     and (
                       .flavors.mime in ("application/x-dosexec")
                       or any(.flavors.yara, . in ('mz_file'))
                     )
                   )
                   // or a macho file
                   or any(.flavors.yara, . == "macho_file")
            )
        )
)

// negate highly trusted sender domains unless they fail DMARC authentication
and (
  (
    sender.email.domain.root_domain in $high_trust_sender_root_domains
    and not headers.auth_summary.dmarc.pass
  )
  or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
and (
  not profile.by_sender().solicited
  or (
    profile.by_sender().any_messages_malicious_or_spam
    and not profile.by_sender().any_messages_benign
  )
)

Detection Logic

Scope: inbound message.

A QR code in the body of the email downloads a suspicious file type (or embedded file) such as an LNK, JS, or VBA. Recursively explodes auto-downloaded files within archives to detect these file types.

  1. inbound message
  2. beta.scan_qr(file.message_screenshot()).found
  3. any(beta.scan_qr(file.message_screenshot()).items, any(ml.link_analysis(.url).files_downloaded, strings.ilike(.file_name, "*.exe") or .file_extension in ( "dll", "exe", "html", "lnk", "js", "vba", "vbs", "vbe", "bat", "py", "ics", "sh", "ps1" ) // or call file.explode to get yara/mime types or any(file.explode(.), // file ext is not dll but is exe mime/yara ( .file_extension not in ("dll", "exe") and ( .flavors.mime in ("application/x-dosexec") or any(.flavors.yara, . in ('mz_file')) ) ) // or a macho file or any(.flavors.yara, . == "macho_file") ) ) )
  4. any of:
    • all of:
      • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • not:
        • headers.auth_summary.dmarc.pass
    • sender.email.domain.root_domain not in $high_trust_sender_root_domains
  5. any of:
    • not:
      • profile.by_sender().solicited
    • all of:
      • profile.by_sender().any_messages_malicious_or_spam
      • not:
        • profile.by_sender().any_messages_benign

Inspects: headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, type.inbound. Sensors: beta.scan_qr, file.explode, file.message_screenshot, ml.link_analysis, profile.by_sender, strings.ilike. Reference lists: $high_trust_sender_root_domains.

Indicators Matched (17)

FieldMatchValue
strings.ilikesubstring*.exe
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberdll
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberexe
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberhtml
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberlnk
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberjs
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmembervba
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmembervbs
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmembervbe
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberbat
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberpy
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberics
5 more
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmembersh
ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[].file_extensionmemberps1
file.explode(ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[])[].flavors.mimememberapplication/x-dosexec
file.explode(ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[])[].flavors.yara[]membermz_file
file.explode(ml.link_analysis(beta.scan_qr(file.message_screenshot()).items[].url).files_downloaded[])[].flavors.yara[]equalsmacho_file

Stages and Predicates

Stage 1: mql_rule

and
  or
    and
      not
        headers.auth_summary.dmarc.pass eq "true"
      sender.email.domain.root_domain macro "sender.email.domain.root_domain in high_trust_sender_root_domains"
    sender.email.domain.root_domain macro "sender.email.domain.root_domain not in high_trust_sender_root_domains"
  or
    and
      not
        profile.by_sender func_call "profile.by_sender().any_messages_benign"
      profile.by_sender func_call "profile.by_sender().any_messages_malicious_or_spam"
    not
      profile.by_sender func_call "profile.by_sender().solicited"
  beta.scan_qr func_call "beta.scan_qr(file.message_screenshot()).found"
  type.inbound eq "true"
   macro "any(beta.scan_qr(file.message_screenshot()).items,\n        any(ml.link_analysis(.url).files_downloaded,\n            strings.ilike(.file_name, \"*.exe\")\n            or .file_extension in (\n              \"dll\",\n              \"exe\",\n              \"html\",\n              \"lnk\",\n              \"js\",\n              \"vba\",\n              \"vbs\",\n              \"vbe\",\n              \"bat\",\n              \"py\",\n              \"ics\",\n              \"sh\",\n              \"ps1\"\n            )\n            // or call file.explode to get yara/mime types\n            or any(file.explode(.),\n                   // file ext is not dll but is exe mime/yara\n                   (\n                     .file_extension not in (\"dll\", \"exe\")\n                     and (\n                       .flavors.mime in (\"application/x-dosexec\")\n                       or any(.flavors.yara, . in ('mz_file'))\n                     )\n                   )\n                   // or a macho file\n                   or any(.flavors.yara, . == \"macho_file\")\n            )\n        )\n)"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
type.inboundeq
  • true transforms: boolean corpus 1212 (mql 1212)
field:"type.inbound" kind:eq value:"true"

QR Code with suspicious indicators

#
Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

This rule flags messages with QR codes in attachments when there are three or fewer attachments. If no attachments are present, the rule captures a screenshot of the message for analysis. Additional triggers include: sender's name containing the recipient's SLD, recipient's email mentioned in the body, an empty message body, a suspicious subject, or undisclosed recipients.

Threat Classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesQR code, Social engineering

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • attachments
  • body
  • body.current_thread
  • body.html
  • headers
  • headers.auth_summary
  • recipients
  • recipients.to
  • sender.email
  • subject
  • type

Rule Body

type.inbound
and (
  (
    length(attachments) <= 3
    or (
      any(attachments, length(ml.logo_detect(.).brands) > 0)
      and length(attachments) <= 10
    )
  )
  and (
    any(attachments,
        (
          .file_type in $file_types_images
          or .file_extension in $file_extensions_macros
          or .file_type == "pdf"
        )
        and (
          any(file.explode(.),
              (
                .scan.qr.type is not null
                and regex.contains(.scan.qr.data, '\.')
                and not strings.starts_with(.scan.qr.data,
                                            "https://qr.skyqr.co.za/"
                )
                and not (
                  strings.icontains(.scan.qr.data, ',')
                  and .scan.qr.type == 'undefined'
                )
                // not a json string
                and not (
                  strings.starts_with(.scan.qr.data, '{')
                  and strings.ends_with(.scan.qr.data, '}')
                )
                // exclude images taken with mobile cameras and screenshots from android
                and not any(.scan.exiftool.fields,
                            .key == "Model"
                            or (
                              .key == "Software"
                              and strings.starts_with(.value, "Android")
                            )
                )
                // exclude images taken with mobile cameras and screenshots from Apple
                and not any(.scan.exiftool.fields,
                            .key == "DeviceManufacturer"
                            and .value == "Apple Computer Inc."
                )
                // exclude images from WhatsApp (mobile)
                and not regex.match(.file_name,
                                    'WhatsApp Image \d\d\d\d-\d\d-\d\d at.*.jpe?g'
                )
                and not (
                  (
                    .scan.exiftool.image_height > 3000
                    and .scan.exiftool.image_height is not null
                  )
                  or (
                    .scan.exiftool.image_width > 3000
                    and .scan.exiftool.image_width is not null
                  )
                )
                // exclude contact cards
                and not strings.istarts_with(.scan.qr.data, "BEGIN:VCARD")

                // negate QR codes to legit Servicio de Administración Tributaria (SAT) Gov links
                and not (
                  .scan.qr.url.domain.root_domain is not null
                  and .scan.qr.url.domain.root_domain in ('sat.gob.mx')
                )
                and not (
                  .scan.qr.data is not null
                  and strings.icontains(.scan.qr.data, 'sat.gob.mx')
                )
              )
              or (
                regex.icontains(.scan.ocr.raw,
                                '(?:scan|camera|review and sign)'
                )
                and regex.icontains(.scan.ocr.raw, '(?:\bQR\b|Q\.R\.|barcode)')
              )
          )
        )
    )
    or (
      length(attachments) == 0
      //
      // This rule makes use of a beta feature and is subject to change without notice
      // using the beta feature in custom rules is not suggested until it has been formally released
      //
      and (
        (
          beta.parse_exif(file.message_screenshot()).image_height < 2000
          and beta.parse_exif(file.message_screenshot()).image_width < 2000
        )
        // ignore image height/width if there is excessive whitespace padding
        or regex.contains(body.html.raw, '\"padding:0px 0px \d{3,4}px 0px')
      )
      and any(beta.scan_qr(file.message_screenshot()).items,
              .type is not null
              and regex.contains(.data, '\.')
              // exclude contact cards
              and not strings.istarts_with(.data, "BEGIN:VCARD")
      )
    )
  )
  and (
    any(recipients.to,
        strings.icontains(sender.display_name, .email.domain.sld)
    )
    or length(body.current_thread.text) is null
    or (
      body.current_thread.text == ""
      and (
        (
          (length(headers.references) > 0 or headers.in_reply_to is null)
          and not (
            (
              strings.istarts_with(subject.subject, "RE:")
              or strings.istarts_with(subject.subject, "RES:")
              or strings.istarts_with(subject.subject, "R:")
              or strings.istarts_with(subject.subject, "ODG:")
              or strings.istarts_with(subject.subject, "答复:")
              or strings.istarts_with(subject.subject, "AW:")
              or strings.istarts_with(subject.subject, "TR:")
              or strings.istarts_with(subject.subject, "FWD:")
              or regex.imatch(subject.subject,
                              '(\[[^\]]+\]\s?){0,3}(re|fwd?|automat.*)\s?:.*'
              )
            )
          )
        )
        or length(headers.references) == 0
      )
    )
    or regex.contains(subject.subject,
                      "(Authenticat(e|or|ion)|2fa|Multi.Factor|(qr|bar).code|action.require|alert|Att(n|ention):)"
    )
    or (any(recipients.to, strings.icontains(subject.subject, .display_name)))
    or (
      regex.icontains(subject.subject,
                      "termination.*notice",
                      "38417",
                      ":completed",
                      "[il1]{2}mit.*ma[il1]{2} ?bo?x",
                      "[il][il][il]egai[ -]",
                      "[li][li][li]ega[li] attempt",
                      "[ng]-?[io]n .*block",
                      "[ng]-?[io]n .*cancel",
                      "[ng]-?[io]n .*deactiv",
                      "[ng]-?[io]n .*disabl",
                      "action.*required",
                      "abandon.*package",
                      "about.your.account",
                      "acc(ou)?n?t (is )?on ho[li]d",
                      "acc(ou)?n?t.*terminat",
                      "acc(oun)?t.*[il1]{2}mitation",
                      "access.*limitation",
                      "account (will be )?block",
                      "account.*de-?activat",
                      "account.*locked",
                      "account.*re-verification",
                      "account.*security",
                      "account.*suspension",
                      "account.has.been",
                      "account.has.expired",
                      "account.will.be.blocked",
                      "account v[il]o[li]at",
                      "activity.*acc(oun)?t",
                      "all.?staff",
                      "almost.full",
                      "app[li]e.[il]d",
                      "authenticate.*account",
                      "been.*suspend",
                      "bonus",
                      "clos.*of.*account.*processed",
                      "confirm.your.account",
                      "courier.*able",
                      "crediential.*notif",
                      "deactivation.*in.*progress",
                      "delivery.*attempt.*failed",
                      "document.received",
                      "documented.*shared.*with.*you",
                      "dropbox.*document",
                      "e-?ma[il1]+ .{010}suspen",
                      "e-?ma[il1]{1} user",
                      "e-?ma[il1]{2} acc",
                      "e-?ma[il1]{2}.*up.?grade",
                      "e.?ma[il1]{2}.*server",
                      "e.?ma[il1]{2}.*suspend",
                      "email.update",
                      "faxed you",
                      "fraud(ulent)?.*charge",
                      "from.helpdesk",
                      "fu[il1]{2}.*ma[il1]+[ -]?box",
                      "has.been.*suspended",
                      "has.been.limited",
                      "have.locked",
                      "he[li]p ?desk upgrade",
                      "heipdesk",
                      "i[il]iega[il]",
                      "ii[il]ega[il]",
                      "incoming e?mail",
                      "incoming.*fax",
                      "lock.*security",
                      "ma[il1]{1}[ -]?box.*quo",
                      "ma[il1]{2}[ -]?box.*fu[il1]",
                      "ma[il1]{2}box.*[il1]{2}mit",
                      "ma[il1]{2}box stor",
                      "mail on.?hold",
                      "mail.*box.*migration",
                      "mail.*de-?activat",
                      "mail.update.required",
                      "mails.*pending",
                      "messages.*pending",
                      "missed.*shipping.*notification",
                      "missed.shipment.notification",
                      "must.update.your.account",
                      "new [sl][io]g?[nig][ -]?in from",
                      "new voice ?-?mail",
                      "notifications.*pending",
                      "office.*3.*6.*5.*suspend",
                      "office365",
                      "on google docs with you",
                      "online doc",
                      "password.*compromised",
                      "payment advice",
                      "periodic maintenance",
                      "potential(ly)? unauthorized",
                      "refund not approved",
                      "report",
                      "revised.*policy",
                      "scam",
                      "scanned.?invoice",
                      "secured?.update",
                      "security breach",
                      "securlty",
                      "seguranca",
                      "signed.*delivery",
                      "status of your .{314}? ?delivery",
                      "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty",
                      "suspicious.*sign.*[io]n",
                      "suspicious.activit",
                      "temporar(il)?y deactivate",
                      "temporar[il1]{2}y disab[li]ed",
                      "temporarily.*lock",
                      "un-?usua[li].activity",
                      "unable.*deliver",
                      "unauthorized.*activit",
                      "unauthorized.device",
                      "undelivered message",
                      "unread.*doc",
                      "unusual.activity",
                      "upgrade.*account",
                      "upgrade.notice",
                      "urgent message",
                      "urgent.verification",
                      "v[il1]o[li1]at[il1]on security",
                      "va[il1]{1}date.*ma[il1]{2}[ -]?box",
                      "verification ?-?require",
                      "verification( )?-?need",
                      "verify.your?.account",
                      "web ?-?ma[il1]{2}",
                      "web[ -]?ma[il1]{2}",
                      "will.be.suspended",
                      "your (customer )?account .as",
                      "your.office.365",
                      "your.online.access"
      )
      or any($suspicious_subjects, strings.icontains(subject.subject, .))
      or regex.icontains(sender.display_name,
                         "Accounts.?Payable",
                         "Admin",
                         "Administrator",
                         "Alert",
                         "Assistant",
                         "Billing",
                         "Benefits",
                         "Bonus",
                         "CEO",
                         "CFO",
                         "CIO",
                         "CTO",
                         "Chairman",
                         "Claim",
                         "Confirm",
                         "Critical",
                         "Customer Service",
                         "Deal",
                         "Discount",
                         "Director",
                         "Exclusive",
                         "Executive",
                         "Fax",
                         "Free",
                         "Gift",
                         "/bHR/b",
                         "Helpdesk",
                         "Human Resources",
                         "Immediate",
                         "Important",
                         "Info",
                         "Information",
                         "Invoice",
                         '\bIT\b',
                         "Legal",
                         "Lottery",
                         "Management",
                         "Manager",
                         "Member Services",
                         "Notification",
                         "Offer",
                         "Operations",
                         "Order",
                         "Partner",
                         "Payment",
                         "Payroll",
                         "President",
                         "Premium",
                         "Prize",
                         "Receipt",
                         "Refund",
                         "Registrar",
                         "Required",
                         "Reward",
                         "Sales",
                         "Secretary",
                         "Security",
                         "Service",
                         "Signature",
                         "StaffAnnouncement",
                         "Storage",
                         "Support",
                         "Sweepstakes",
                         "System",
                         "Tax",
                         "Tech Support",
                         "Update",
                         "Upgrade",
                         "Urgent",
                         "Validate",
                         "Verify",
                         "VIP",
                         "Webmaster",
                         "Winner",
      )
    )
    or (
      (
        length(recipients.to) == 0
        or all(recipients.to, .display_name == "Undisclosed recipients")
      )
      and length(recipients.cc) == 0
      and length(recipients.bcc) == 0
    )
    or any(beta.scan_qr(file.message_screenshot()).items,
           (
             .url.domain.tld in $suspicious_tlds
             and .url.domain.root_domain != "app.link"
           )
           // linkanalysis phishing disposition
           or ml.link_analysis(.url).credphish.disposition == "phishing"
    )
    or any(attachments,
           (
             .file_type in $file_types_images
             or .file_extension in $file_extensions_macros
             or .file_type == "pdf"
           )
           and any(file.explode(.),
                   (
                     .scan.qr.url.domain.tld in $suspicious_tlds
                     and .scan.qr.url.domain.root_domain != "app.link"
                     and .scan.qr.url.domain.root_domain != "qr.link"
                     and .scan.qr.url.domain.root_domain != "skyqr.co.za"
                   )
                   and .scan.qr.url.domain.root_domain not in $org_domains
           )
    )
    or sender.email.domain.tld in $suspicious_tlds
  )
)

// sender profile is new or outlier
and (
  profile.by_sender_email().any_messages_malicious_or_spam
  or (
    sender.email.domain.domain in $org_domains
    and not coalesce(headers.auth_summary.dmarc.pass, false)
  )
  or (
    profile.by_sender_email().prevalence in ("new", "outlier")
    and not profile.by_sender_email().solicited
  )
)
and not profile.by_sender_email().any_messages_benign
// negate highly trusted sender domains unless they fail DMARC authentication
and not (
  sender.email.domain.root_domain in $high_trust_sender_root_domains
  and coalesce(headers.auth_summary.dmarc.pass, false)
)

Detection Logic

Scope: inbound message.

This rule flags messages with QR codes in attachments when there are three or fewer attachments. If no attachments are present, the rule captures a screenshot of the message for analysis. Additional triggers include: sender's name containing the recipient's SLD, recipient's email mentioned in the body, an empty message body, a suspicious subject, or undisclosed recipients.

  1. inbound message
  2. all of:
    • any of:
      • length(attachments) <= 3
      • all of:
        • any of attachments where:
          • length(ml.logo_detect(.).brands) > 0
        • length(attachments) <= 10
    • any of:
      • any of attachments where all hold:
        • any of:
          • .file_type in $file_types_images
          • .file_extension in $file_extensions_macros
          • .file_type is 'pdf'
        • ( any(file.explode(.), ( .scan.qr.type is not null and regex.contains(.scan.qr.data, '\.') and not strings.starts_with(.scan.qr.data, "https://qr.skyqr.co.za/" ) and not ( strings.icontains(.scan.qr.data, ',') and .scan.qr.type == 'undefined' ) // not a json string and not ( strings.starts_with(.scan.qr.data, '{') and strings.ends_with(.scan.qr.data, '}') ) // exclude images taken with mobile cameras and screenshots from android and not any(.scan.exiftool.fields, .key == "Model" or ( .key == "Software" and strings.starts_with(.value, "Android") ) ) // exclude images taken with mobile cameras and screenshots from Apple and not any(.scan.exiftool.fields, .key == "DeviceManufacturer" and .value == "Apple Computer Inc." ) // exclude images from WhatsApp (mobile) and not regex.match(.file_name, 'WhatsApp Image \d\d\d\d-\d\d-\d\d at.*.jpe?g' ) and not ( ( .scan.exiftool.image_height > 3000 and .scan.exiftool.image_height is not null ) or ( .scan.exiftool.image_width > 3000 and .scan.exiftool.image_width is not null ) ) // exclude contact cards and not strings.istarts_with(.scan.qr.data, "BEGIN:VCARD") // negate QR codes to legit Servicio de Administración Tributaria (SAT) Gov links and not ( .scan.qr.url.domain.root_domain is not null and .scan.qr.url.domain.root_domain in ('sat.gob.mx') ) and not ( .scan.qr.data is not null and strings.icontains(.scan.qr.data, 'sat.gob.mx') ) ) or ( regex.icontains(.scan.ocr.raw, '(?:scan|camera|review and sign)' ) and regex.icontains(.scan.ocr.raw, '(?:\bQR\b|Q\.R\.|barcode)') ) ) )
      • all of:
        • length(attachments) == 0
        • any of:
          • all of:
            • beta.parse_exif(file.message_screenshot()).image_height < 2000
            • beta.parse_exif(file.message_screenshot()).image_width < 2000
          • body.html.raw matches '\\"padding:0px 0px \\d{3,4}px 0px'
        • any(beta.scan_qr(file.message_screenshot()).items, .type is not null and regex.contains(.data, '\.') // exclude contact cards and not strings.istarts_with(.data, "BEGIN:VCARD") )
    • any of:
      • any of recipients.to where:
        • strings.icontains(sender.display_name, .email.domain.sld)
      • length(body.current_thread.text) is null
      • all of:
        • body.current_thread.text is ''
        • any of:
          • all of:
            • any of:
              • length(headers.references) > 0
              • headers.in_reply_to is missing
            • none of:
              • subject.subject starts with 'RE:'
              • subject.subject starts with 'RES:'
              • subject.subject starts with 'R:'
              • subject.subject starts with 'ODG:'
              • subject.subject starts with '答复:'
              • subject.subject starts with 'AW:'
              • subject.subject starts with 'TR:'
              • subject.subject starts with 'FWD:'
              • subject.subject matches '(\\[[^\\]]+\\]\\s?){0,3}(re|fwd?|automat.*)\\s?:.*'
          • length(headers.references) == 0
      • subject.subject matches '(Authenticat(e|or|ion)|2fa|Multi.Factor|(qr|bar).code|action.require|alert|Att(n|ention):)'
      • any of recipients.to where:
        • strings.icontains(subject.subject, .display_name)
      • any of:
        • subject.subject matches any of 127 patterns
          • termination.*notice
          • 38417
          • :completed
          • [il1]{2}mit.*ma[il1]{2} ?bo?x
          • [il][il][il]egai[ -]
          • [li][li][li]ega[li] attempt
          • [ng]-?[io]n .*block
          • [ng]-?[io]n .*cancel
          • [ng]-?[io]n .*deactiv
          • [ng]-?[io]n .*disabl
          • action.*required
          • abandon.*package
          • about.your.account
          • acc(ou)?n?t (is )?on ho[li]d
          • acc(ou)?n?t.*terminat
          • acc(oun)?t.*[il1]{2}mitation
          • access.*limitation
          • account (will be )?block
          • account.*de-?activat
          • account.*locked
          • account.*re-verification
          • account.*security
          • account.*suspension
          • account.has.been
          • account.has.expired
          • account.will.be.blocked
          • account v[il]o[li]at
          • activity.*acc(oun)?t
          • all.?staff
          • almost.full
          • app[li]e.[il]d
          • authenticate.*account
          • been.*suspend
          • bonus
          • clos.*of.*account.*processed
          • confirm.your.account
          • courier.*able
          • crediential.*notif
          • deactivation.*in.*progress
          • delivery.*attempt.*failed
          • document.received
          • documented.*shared.*with.*you
          • dropbox.*document
          • e-?ma[il1]+ .{010}suspen
          • e-?ma[il1]{1} user
          • e-?ma[il1]{2} acc
          • e-?ma[il1]{2}.*up.?grade
          • e.?ma[il1]{2}.*server
          • e.?ma[il1]{2}.*suspend
          • email.update
          • faxed you
          • fraud(ulent)?.*charge
          • from.helpdesk
          • fu[il1]{2}.*ma[il1]+[ -]?box
          • has.been.*suspended
          • has.been.limited
          • have.locked
          • he[li]p ?desk upgrade
          • heipdesk
          • i[il]iega[il]
          • ii[il]ega[il]
          • incoming e?mail
          • incoming.*fax
          • lock.*security
          • ma[il1]{1}[ -]?box.*quo
          • ma[il1]{2}[ -]?box.*fu[il1]
          • ma[il1]{2}box.*[il1]{2}mit
          • ma[il1]{2}box stor
          • mail on.?hold
          • mail.*box.*migration
          • mail.*de-?activat
          • mail.update.required
          • mails.*pending
          • messages.*pending
          • missed.*shipping.*notification
          • missed.shipment.notification
          • must.update.your.account
          • new [sl][io]g?[nig][ -]?in from
          • new voice ?-?mail
          • notifications.*pending
          • office.*3.*6.*5.*suspend
          • office365
          • on google docs with you
          • online doc
          • password.*compromised
          • payment advice
          • periodic maintenance
          • potential(ly)? unauthorized
          • refund not approved
          • report
          • revised.*policy
          • scam
          • scanned.?invoice
          • secured?.update
          • security breach
          • securlty
          • seguranca
          • signed.*delivery
          • status of your .{314}? ?delivery
          • susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty
          • suspicious.*sign.*[io]n
          • suspicious.activit
          • temporar(il)?y deactivate
          • temporar[il1]{2}y disab[li]ed
          • temporarily.*lock
          • un-?usua[li].activity
          • unable.*deliver
          • unauthorized.*activit
          • unauthorized.device
          • undelivered message
          • unread.*doc
          • unusual.activity
          • upgrade.*account
          • upgrade.notice
          • urgent message
          • urgent.verification
          • v[il1]o[li1]at[il1]on security
          • va[il1]{1}date.*ma[il1]{2}[ -]?box
          • verification ?-?require
          • verification( )?-?need
          • verify.your?.account
          • web ?-?ma[il1]{2}
          • web[ -]?ma[il1]{2}
          • will.be.suspended
          • your (customer )?account .as
          • your.office.365
          • your.online.access
        • any($suspicious_subjects, strings.icontains(subject.subject, .))
        • sender.display_name matches any of 74 patterns
          • Accounts.?Payable
          • Admin
          • Administrator
          • Alert
          • Assistant
          • Billing
          • Benefits
          • Bonus
          • CEO
          • CFO
          • CIO
          • CTO
          • Chairman
          • Claim
          • Confirm
          • Critical
          • Customer Service
          • Deal
          • Discount
          • Director
          • Exclusive
          • Executive
          • Fax
          • Free
          • Gift
          • /bHR/b
          • Helpdesk
          • Human Resources
          • Immediate
          • Important
          • Info
          • Information
          • Invoice
          • \bIT\b
          • Legal
          • Lottery
          • Management
          • Manager
          • Member Services
          • Notification
          • Offer
          • Operations
          • Order
          • Partner
          • Payment
          • Payroll
          • President
          • Premium
          • Prize
          • Receipt
          • Refund
          • Registrar
          • Required
          • Reward
          • Sales
          • Secretary
          • Security
          • Service
          • Signature
          • StaffAnnouncement
          • Storage
          • Support
          • Sweepstakes
          • System
          • Tax
          • Tech Support
          • Update
          • Upgrade
          • Urgent
          • Validate
          • Verify
          • VIP
          • Webmaster
          • Winner
      • all of:
        • any of:
          • length(recipients.to) == 0
          • all of recipients.to where:
            • .display_name is 'Undisclosed recipients'
        • length(recipients.cc) == 0
        • length(recipients.bcc) == 0
      • any(beta.scan_qr(file.message_screenshot()).items, ( .url.domain.tld in $suspicious_tlds and .url.domain.root_domain != "app.link" ) // linkanalysis phishing disposition or ml.link_analysis(.url).credphish.disposition == "phishing" )
      • any of attachments where all hold:
        • any of:
          • .file_type in $file_types_images
          • .file_extension in $file_extensions_macros
          • .file_type is 'pdf'
        • any(file.explode(.), ( .scan.qr.url.domain.tld in $suspicious_tlds and .scan.qr.url.domain.root_domain != "app.link" and .scan.qr.url.domain.root_domain != "qr.link" and .scan.qr.url.domain.root_domain != "skyqr.co.za" ) and .scan.qr.url.domain.root_domain not in $org_domains )
      • sender.email.domain.tld in $suspicious_tlds
  3. any of:
    • profile.by_sender_email().any_messages_malicious_or_spam
    • all of:
      • sender.email.domain.domain in $org_domains
      • not:
        • coalesce(headers.auth_summary.dmarc.pass, false)
    • all of:
      • profile.by_sender_email().prevalence in ("new", "outlier")
      • not:
        • profile.by_sender_email().solicited
  4. not:
    • profile.by_sender_email().any_messages_benign
  5. not:
    • all of:
      • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • coalesce(headers.auth_summary.dmarc.pass, false)

Inspects: attachments[].file_extension, attachments[].file_type, body.current_thread.text, body.html.raw, headers.auth_summary.dmarc.pass, headers.in_reply_to, headers.references, recipients.bcc, recipients.cc, recipients.to, recipients.to[].display_name, recipients.to[].email.domain.sld, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, sender.email.domain.tld, subject.subject, type.inbound. Sensors: beta.parse_exif, beta.scan_qr, file.explode, file.message_screenshot, ml.link_analysis, ml.logo_detect, profile.by_sender_email, regex.contains, regex.icontains, regex.imatch, regex.match, strings.ends_with, strings.icontains, strings.istarts_with, strings.starts_with. Reference lists: $file_extensions_macros, $file_types_images, $high_trust_sender_root_domains, $org_domains, $suspicious_subjects, $suspicious_tlds.

Indicators Matched (209)

FieldMatchValue
attachments[].file_typeequalspdf
regex.containsregex\.
regex.icontainsregex(?:scan|camera|review and sign)
regex.icontainsregex(?:\bQR\b|Q\.R\.|barcode)
regex.containsregex\"padding:0px 0px \d{3,4}px 0px
body.current_thread.textequals
regex.containsregex(Authenticat(e|or|ion)|2fa|Multi.Factor|(qr|bar).code|action.require|alert|Att(n|ention):)
regex.icontainsregextermination.*notice
regex.icontainsregex38417
regex.icontainsregex:completed
regex.icontainsregex[il1]{2}mit.*ma[il1]{2} ?bo?x
regex.icontainsregex[il][il][il]egai[ -]
197 more
regex.icontainsregex[li][li][li]ega[li] attempt
regex.icontainsregex[ng]-?[io]n .*block
regex.icontainsregex[ng]-?[io]n .*cancel
regex.icontainsregex[ng]-?[io]n .*deactiv
regex.icontainsregex[ng]-?[io]n .*disabl
regex.icontainsregexaction.*required
regex.icontainsregexabandon.*package
regex.icontainsregexabout.your.account
regex.icontainsregexacc(ou)?n?t (is )?on ho[li]d
regex.icontainsregexacc(ou)?n?t.*terminat
regex.icontainsregexacc(oun)?t.*[il1]{2}mitation
regex.icontainsregexaccess.*limitation
regex.icontainsregexaccount (will be )?block
regex.icontainsregexaccount.*de-?activat
regex.icontainsregexaccount.*locked
regex.icontainsregexaccount.*re-verification
regex.icontainsregexaccount.*security
regex.icontainsregexaccount.*suspension
regex.icontainsregexaccount.has.been
regex.icontainsregexaccount.has.expired
regex.icontainsregexaccount.will.be.blocked
regex.icontainsregexaccount v[il]o[li]at
regex.icontainsregexactivity.*acc(oun)?t
regex.icontainsregexall.?staff
regex.icontainsregexalmost.full
regex.icontainsregexapp[li]e.[il]d
regex.icontainsregexauthenticate.*account
regex.icontainsregexbeen.*suspend
regex.icontainsregexbonus
regex.icontainsregexclos.*of.*account.*processed
regex.icontainsregexconfirm.your.account
regex.icontainsregexcourier.*able
regex.icontainsregexcrediential.*notif
regex.icontainsregexdeactivation.*in.*progress
regex.icontainsregexdelivery.*attempt.*failed
regex.icontainsregexdocument.received
regex.icontainsregexdocumented.*shared.*with.*you
regex.icontainsregexdropbox.*document
regex.icontainsregexe-?ma[il1]+ .{010}suspen
regex.icontainsregexe-?ma[il1]{1} user
regex.icontainsregexe-?ma[il1]{2} acc
regex.icontainsregexe-?ma[il1]{2}.*up.?grade
regex.icontainsregexe.?ma[il1]{2}.*server
regex.icontainsregexe.?ma[il1]{2}.*suspend
regex.icontainsregexemail.update
regex.icontainsregexfaxed you
regex.icontainsregexfraud(ulent)?.*charge
regex.icontainsregexfrom.helpdesk
regex.icontainsregexfu[il1]{2}.*ma[il1]+[ -]?box
regex.icontainsregexhas.been.*suspended
regex.icontainsregexhas.been.limited
regex.icontainsregexhave.locked
regex.icontainsregexhe[li]p ?desk upgrade
regex.icontainsregexheipdesk
regex.icontainsregexi[il]iega[il]
regex.icontainsregexii[il]ega[il]
regex.icontainsregexincoming e?mail
regex.icontainsregexincoming.*fax
regex.icontainsregexlock.*security
regex.icontainsregexma[il1]{1}[ -]?box.*quo
regex.icontainsregexma[il1]{2}[ -]?box.*fu[il1]
regex.icontainsregexma[il1]{2}box.*[il1]{2}mit
regex.icontainsregexma[il1]{2}box stor
regex.icontainsregexmail on.?hold
regex.icontainsregexmail.*box.*migration
regex.icontainsregexmail.*de-?activat
regex.icontainsregexmail.update.required
regex.icontainsregexmails.*pending
regex.icontainsregexmessages.*pending
regex.icontainsregexmissed.*shipping.*notification
regex.icontainsregexmissed.shipment.notification
regex.icontainsregexmust.update.your.account
regex.icontainsregexnew [sl][io]g?[nig][ -]?in from
regex.icontainsregexnew voice ?-?mail
regex.icontainsregexnotifications.*pending
regex.icontainsregexoffice.*3.*6.*5.*suspend
regex.icontainsregexoffice365
regex.icontainsregexon google docs with you
regex.icontainsregexonline doc
regex.icontainsregexpassword.*compromised
regex.icontainsregexpayment advice
regex.icontainsregexperiodic maintenance
regex.icontainsregexpotential(ly)? unauthorized
regex.icontainsregexrefund not approved
regex.icontainsregexreport
regex.icontainsregexrevised.*policy
regex.icontainsregexscam
regex.icontainsregexscanned.?invoice
regex.icontainsregexsecured?.update
regex.icontainsregexsecurity breach
regex.icontainsregexsecurlty
regex.icontainsregexseguranca
regex.icontainsregexsigned.*delivery
regex.icontainsregexstatus of your .{314}? ?delivery
regex.icontainsregexsusp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty
regex.icontainsregexsuspicious.*sign.*[io]n
regex.icontainsregexsuspicious.activit
regex.icontainsregextemporar(il)?y deactivate
regex.icontainsregextemporar[il1]{2}y disab[li]ed
regex.icontainsregextemporarily.*lock
regex.icontainsregexun-?usua[li].activity
regex.icontainsregexunable.*deliver
regex.icontainsregexunauthorized.*activit
regex.icontainsregexunauthorized.device
regex.icontainsregexundelivered message
regex.icontainsregexunread.*doc
regex.icontainsregexunusual.activity
regex.icontainsregexupgrade.*account
regex.icontainsregexupgrade.notice
regex.icontainsregexurgent message
regex.icontainsregexurgent.verification
regex.icontainsregexv[il1]o[li1]at[il1]on security
regex.icontainsregexva[il1]{1}date.*ma[il1]{2}[ -]?box
regex.icontainsregexverification ?-?require
regex.icontainsregexverification( )?-?need
regex.icontainsregexverify.your?.account
regex.icontainsregexweb ?-?ma[il1]{2}
regex.icontainsregexweb[ -]?ma[il1]{2}
regex.icontainsregexwill.be.suspended
regex.icontainsregexyour (customer )?account .as
regex.icontainsregexyour.office.365
regex.icontainsregexyour.online.access
regex.icontainsregexAccounts.?Payable
regex.icontainsregexAdmin
regex.icontainsregexAdministrator
regex.icontainsregexAlert
regex.icontainsregexAssistant
regex.icontainsregexBilling
regex.icontainsregexBenefits
regex.icontainsregexBonus
regex.icontainsregexCEO
regex.icontainsregexCFO
regex.icontainsregexCIO
regex.icontainsregexCTO
regex.icontainsregexChairman
regex.icontainsregexClaim
regex.icontainsregexConfirm
regex.icontainsregexCritical
regex.icontainsregexCustomer Service
regex.icontainsregexDeal
regex.icontainsregexDiscount
regex.icontainsregexDirector
regex.icontainsregexExclusive
regex.icontainsregexExecutive
regex.icontainsregexFax
regex.icontainsregexFree
regex.icontainsregexGift
regex.icontainsregex/bHR/b
regex.icontainsregexHelpdesk
regex.icontainsregexHuman Resources
regex.icontainsregexImmediate
regex.icontainsregexImportant
regex.icontainsregexInfo
regex.icontainsregexInformation
regex.icontainsregexInvoice
regex.icontainsregex\bIT\b
regex.icontainsregexLegal
regex.icontainsregexLottery
regex.icontainsregexManagement
regex.icontainsregexManager
regex.icontainsregexMember Services
regex.icontainsregexNotification
regex.icontainsregexOffer
regex.icontainsregexOperations
regex.icontainsregexOrder
regex.icontainsregexPartner
regex.icontainsregexPayment
regex.icontainsregexPayroll
regex.icontainsregexPresident
regex.icontainsregexPremium
regex.icontainsregexPrize
regex.icontainsregexReceipt
regex.icontainsregexRefund
regex.icontainsregexRegistrar
regex.icontainsregexRequired
regex.icontainsregexReward
regex.icontainsregexSales
regex.icontainsregexSecretary
regex.icontainsregexSecurity
regex.icontainsregexService
regex.icontainsregexSignature
regex.icontainsregexStaffAnnouncement
regex.icontainsregexStorage
regex.icontainsregexSupport
regex.icontainsregexSweepstakes
regex.icontainsregexSystem
regex.icontainsregexTax
regex.icontainsregexTech Support
regex.icontainsregexUpdate
regex.icontainsregexUpgrade
regex.icontainsregexUrgent
regex.icontainsregexValidate
regex.icontainsregexVerify
regex.icontainsregexVIP
regex.icontainsregexWebmaster
regex.icontainsregexWinner
recipients.to[].display_nameequalsUndisclosed recipients

Stages and Predicates

Stage 1: mql_rule

and
  or
    and
      or
        and
          not
            or
              subject.subject regex_match "(\\[[^\\]]+\\]\\s?){0,3}(re|fwd?|automat.*)\\s?:.*"
              subject.subject starts_with "AW:"
              subject.subject starts_with "FWD:"
              subject.subject starts_with "ODG:"
              subject.subject starts_with "R:"
              subject.subject starts_with "RE:"
              subject.subject starts_with "RES:"
              subject.subject starts_with "TR:"
              subject.subject starts_with "答复:"
          or
            headers.in_reply_to is_null
            headers.references length_compare "0"
        headers.references length_compare "0"
      body.current_thread.text eq ""
    any(attachments)
      and
        or
          attachments.file_extension macro "attachments[].file_extension in file_extensions_macros"
          attachments.file_type eq "pdf"
          attachments.file_type macro "attachments[].file_type in file_types_images"
         macro "any(file.explode(.),\n                   (\n                     .scan.qr.url.domain.tld in $suspicious_tlds\n                     and .scan.qr.url.domain.root_domain != \"app.link\"\n                     and .scan.qr.url.domain.root_domain != \"qr.link\"\n                     and .scan.qr.url.domain.root_domain != \"skyqr.co.za\"\n                   )\n                   and .scan.qr.url.domain.root_domain not in $org_domains\n           )"
    and
      or
        recipients.to length_compare "0"
         macro "all(recipients.to, .display_name == \"Undisclosed recipients\")"
      recipients.bcc length_compare "0"
      recipients.cc length_compare "0"
    any(recipients.to)
      strings.icontains func_call "strings.icontains(sender.display_name, .email.domain.sld)"
    any(recipients.to)
      strings.icontains func_call "strings.icontains(subject.subject, .display_name)"
    sender.display_name regex_match "/bHR/b"
    sender.display_name regex_match "Accounts.?Payable"
    sender.display_name regex_match "Admin"
    sender.display_name regex_match "Administrator"
    sender.display_name regex_match "Alert"
    sender.display_name regex_match "Assistant"
    sender.display_name regex_match "Benefits"
    sender.display_name regex_match "Billing"
    sender.display_name regex_match "Bonus"
    sender.display_name regex_match "CEO"
    sender.display_name regex_match "CFO"
    sender.display_name regex_match "CIO"
    sender.display_name regex_match "CTO"
    sender.display_name regex_match "Chairman"
    sender.display_name regex_match "Claim"
    sender.display_name regex_match "Confirm"
    sender.display_name regex_match "Critical"
    sender.display_name regex_match "Customer Service"
    sender.display_name regex_match "Deal"
    sender.display_name regex_match "Director"
    sender.display_name regex_match "Discount"
    sender.display_name regex_match "Exclusive"
    sender.display_name regex_match "Executive"
    sender.display_name regex_match "Fax"
    sender.display_name regex_match "Free"
    sender.display_name regex_match "Gift"
    sender.display_name regex_match "Helpdesk"
    sender.display_name regex_match "Human Resources"
    sender.display_name regex_match "Immediate"
    sender.display_name regex_match "Important"
    sender.display_name regex_match "Info"
    sender.display_name regex_match "Information"
    sender.display_name regex_match "Invoice"
    sender.display_name regex_match "Legal"
    sender.display_name regex_match "Lottery"
    sender.display_name regex_match "Management"
    sender.display_name regex_match "Manager"
    sender.display_name regex_match "Member Services"
    sender.display_name regex_match "Notification"
    sender.display_name regex_match "Offer"
    sender.display_name regex_match "Operations"
    sender.display_name regex_match "Order"
    sender.display_name regex_match "Partner"
    sender.display_name regex_match "Payment"
    sender.display_name regex_match "Payroll"
    sender.display_name regex_match "Premium"
    sender.display_name regex_match "President"
    sender.display_name regex_match "Prize"
    sender.display_name regex_match "Receipt"
    sender.display_name regex_match "Refund"
    sender.display_name regex_match "Registrar"
    sender.display_name regex_match "Required"
    sender.display_name regex_match "Reward"
    sender.display_name regex_match "Sales"
    sender.display_name regex_match "Secretary"
    sender.display_name regex_match "Security"
    sender.display_name regex_match "Service"
    sender.display_name regex_match "Signature"
    sender.display_name regex_match "StaffAnnouncement"
    sender.display_name regex_match "Storage"
    sender.display_name regex_match "Support"
    sender.display_name regex_match "Sweepstakes"
    sender.display_name regex_match "System"
    sender.display_name regex_match "Tax"
    sender.display_name regex_match "Tech Support"
    sender.display_name regex_match "Update"
    sender.display_name regex_match "Upgrade"
    sender.display_name regex_match "Urgent"
    sender.display_name regex_match "VIP"
    sender.display_name regex_match "Validate"
    sender.display_name regex_match "Verify"
    sender.display_name regex_match "Webmaster"
    sender.display_name regex_match "Winner"
    sender.display_name regex_match "\\bIT\\b"
    sender.email.domain.tld macro "sender.email.domain.tld in suspicious_tlds"
    subject.subject regex_match "(Authenticat(e|or|ion)|2fa|Multi.Factor|(qr|bar).code|action.require|alert|Att(n|ention):)"
    subject.subject regex_match "38417"
    subject.subject regex_match ":completed"
    subject.subject regex_match "[il1]{2}mit.*ma[il1]{2} ?bo?x"
    subject.subject regex_match "[il][il][il]egai[ -]"
    subject.subject regex_match "[li][li][li]ega[li] attempt"
    subject.subject regex_match "[ng]-?[io]n .*block"
    subject.subject regex_match "[ng]-?[io]n .*cancel"
    subject.subject regex_match "[ng]-?[io]n .*deactiv"
    subject.subject regex_match "[ng]-?[io]n .*disabl"
    subject.subject regex_match "abandon.*package"
    subject.subject regex_match "about.your.account"
    subject.subject regex_match "acc(ou)?n?t (is )?on ho[li]d"
    subject.subject regex_match "acc(ou)?n?t.*terminat"
    subject.subject regex_match "acc(oun)?t.*[il1]{2}mitation"
    subject.subject regex_match "access.*limitation"
    subject.subject regex_match "account (will be )?block"
    subject.subject regex_match "account v[il]o[li]at"
    subject.subject regex_match "account.*de-?activat"
    subject.subject regex_match "account.*locked"
    subject.subject regex_match "account.*re-verification"
    subject.subject regex_match "account.*security"
    subject.subject regex_match "account.*suspension"
    subject.subject regex_match "account.has.been"
    subject.subject regex_match "account.has.expired"
    subject.subject regex_match "account.will.be.blocked"
    subject.subject regex_match "action.*required"
    subject.subject regex_match "activity.*acc(oun)?t"
    subject.subject regex_match "all.?staff"
    subject.subject regex_match "almost.full"
    subject.subject regex_match "app[li]e.[il]d"
    subject.subject regex_match "authenticate.*account"
    subject.subject regex_match "been.*suspend"
    subject.subject regex_match "bonus"
    subject.subject regex_match "clos.*of.*account.*processed"
    subject.subject regex_match "confirm.your.account"
    subject.subject regex_match "courier.*able"
    subject.subject regex_match "crediential.*notif"
    subject.subject regex_match "deactivation.*in.*progress"
    subject.subject regex_match "delivery.*attempt.*failed"
    subject.subject regex_match "document.received"
    subject.subject regex_match "documented.*shared.*with.*you"
    subject.subject regex_match "dropbox.*document"
    subject.subject regex_match "e-?ma[il1]+ .{010}suspen"
    subject.subject regex_match "e-?ma[il1]{1} user"
    subject.subject regex_match "e-?ma[il1]{2} acc"
    subject.subject regex_match "e-?ma[il1]{2}.*up.?grade"
    subject.subject regex_match "e.?ma[il1]{2}.*server"
    subject.subject regex_match "e.?ma[il1]{2}.*suspend"
    subject.subject regex_match "email.update"
    subject.subject regex_match "faxed you"
    subject.subject regex_match "fraud(ulent)?.*charge"
    subject.subject regex_match "from.helpdesk"
    subject.subject regex_match "fu[il1]{2}.*ma[il1]+[ -]?box"
    subject.subject regex_match "has.been.*suspended"
    subject.subject regex_match "has.been.limited"
    subject.subject regex_match "have.locked"
    subject.subject regex_match "he[li]p ?desk upgrade"
    subject.subject regex_match "heipdesk"
    subject.subject regex_match "i[il]iega[il]"
    subject.subject regex_match "ii[il]ega[il]"
    subject.subject regex_match "incoming e?mail"
    subject.subject regex_match "incoming.*fax"
    subject.subject regex_match "lock.*security"
    subject.subject regex_match "ma[il1]{1}[ -]?box.*quo"
    subject.subject regex_match "ma[il1]{2}[ -]?box.*fu[il1]"
    subject.subject regex_match "ma[il1]{2}box stor"
    subject.subject regex_match "ma[il1]{2}box.*[il1]{2}mit"
    subject.subject regex_match "mail on.?hold"
    subject.subject regex_match "mail.*box.*migration"
    subject.subject regex_match "mail.*de-?activat"
    subject.subject regex_match "mail.update.required"
    subject.subject regex_match "mails.*pending"
    subject.subject regex_match "messages.*pending"
    subject.subject regex_match "missed.*shipping.*notification"
    subject.subject regex_match "missed.shipment.notification"
    subject.subject regex_match "must.update.your.account"
    subject.subject regex_match "new [sl][io]g?[nig][ -]?in from"
    subject.subject regex_match "new voice ?-?mail"
    subject.subject regex_match "notifications.*pending"
    subject.subject regex_match "office.*3.*6.*5.*suspend"
    subject.subject regex_match "office365"
    subject.subject regex_match "on google docs with you"
    subject.subject regex_match "online doc"
    subject.subject regex_match "password.*compromised"
    subject.subject regex_match "payment advice"
    subject.subject regex_match "periodic maintenance"
    subject.subject regex_match "potential(ly)? unauthorized"
    subject.subject regex_match "refund not approved"
    subject.subject regex_match "report"
    subject.subject regex_match "revised.*policy"
    subject.subject regex_match "scam"
    subject.subject regex_match "scanned.?invoice"
    subject.subject regex_match "secured?.update"
    subject.subject regex_match "security breach"
    subject.subject regex_match "securlty"
    subject.subject regex_match "seguranca"
    subject.subject regex_match "signed.*delivery"
    subject.subject regex_match "status of your .{314}? ?delivery"
    subject.subject regex_match "susp[il1]+c[il1]+ous.*act[il1]+v[il1]+ty"
    subject.subject regex_match "suspicious.*sign.*[io]n"
    subject.subject regex_match "suspicious.activit"
    subject.subject regex_match "temporar(il)?y deactivate"
    subject.subject regex_match "temporar[il1]{2}y disab[li]ed"
    subject.subject regex_match "temporarily.*lock"
    subject.subject regex_match "termination.*notice"
    subject.subject regex_match "un-?usua[li].activity"
    subject.subject regex_match "unable.*deliver"
    subject.subject regex_match "unauthorized.*activit"
    subject.subject regex_match "unauthorized.device"
    subject.subject regex_match "undelivered message"
    subject.subject regex_match "unread.*doc"
    subject.subject regex_match "unusual.activity"
    subject.subject regex_match "upgrade.*account"
    subject.subject regex_match "upgrade.notice"
    subject.subject regex_match "urgent message"
    subject.subject regex_match "urgent.verification"
    subject.subject regex_match "v[il1]o[li1]at[il1]on security"
    subject.subject regex_match "va[il1]{1}date.*ma[il1]{2}[ -]?box"
    subject.subject regex_match "verification ?-?require"
    subject.subject regex_match "verification( )?-?need"
    subject.subject regex_match "verify.your?.account"
    subject.subject regex_match "web ?-?ma[il1]{2}"
    subject.subject regex_match "web[ -]?ma[il1]{2}"
    subject.subject regex_match "will.be.suspended"
    subject.subject regex_match "your (customer )?account .as"
    subject.subject regex_match "your.office.365"
    subject.subject regex_match "your.online.access"
     macro "any($suspicious_subjects, strings.icontains(subject.subject, .))"
     macro "any(beta.scan_qr(file.message_screenshot()).items,\n           (\n             .url.domain.tld in $suspicious_tlds\n             and .url.domain.root_domain != \"app.link\"\n           )\n           // linkanalysis phishing disposition\n           or ml.link_analysis(.url).credphish.disposition == \"phishing\"\n    )"
     macro "length(body.current_thread.text) is null"
  or
    any(attachments)
      and
        or
          attachments.file_extension macro "attachments[].file_extension in file_extensions_macros"
          attachments.file_type eq "pdf"
          attachments.file_type macro "attachments[].file_type in file_types_images"
         macro "(\n          any(file.explode(.),\n              (\n                .scan.qr.type is not null\n                and regex.contains(.scan.qr.data, '\\.')\n                and not strings.starts_with(.scan.qr.data,\n                                            \"https://qr.skyqr.co.za/\"\n                )\n                and not (\n                  strings.icontains(.scan.qr.data, ',')\n                  and .scan.qr.type == 'undefined'\n                )\n                // not a json string\n                and not (\n                  strings.starts_with(.scan.qr.data, '{')\n                  and strings.ends_with(.scan.qr.data, '}')\n                )\n                // exclude images taken with mobile cameras and screenshots from android\n                and not any(.scan.exiftool.fields,\n                            .key == \"Model\"\n                            or (\n                              .key == \"Software\"\n                              and strings.starts_with(.value, \"Android\")\n                            )\n                )\n                // exclude images taken with mobile cameras and screenshots from Apple\n                and not any(.scan.exiftool.fields,\n                            .key == \"DeviceManufacturer\"\n                            and .value == \"Apple Computer Inc.\"\n                )\n                // exclude images from WhatsApp (mobile)\n                and not regex.match(.file_name,\n                                    'WhatsApp Image \\d\\d\\d\\d-\\d\\d-\\d\\d at.*.jpe?g'\n                )\n                and not (\n                  (\n                    .scan.exiftool.image_height > 3000\n                    and .scan.exiftool.image_height is not null\n                  )\n                  or (\n                    .scan.exiftool.image_width > 3000\n                    and .scan.exiftool.image_width is not null\n                  )\n                )\n                // exclude contact cards\n                and not strings.istarts_with(.scan.qr.data, \"BEGIN:VCARD\")\n\n                // negate QR codes to legit Servicio de Administración Tributaria (SAT) Gov links\n                and not (\n                  .scan.qr.url.domain.root_domain is not null\n                  and .scan.qr.url.domain.root_domain in ('sat.gob.mx')\n                )\n                and not (\n                  .scan.qr.data is not null\n                  and strings.icontains(.scan.qr.data, 'sat.gob.mx')\n                )\n              )\n              or (\n                regex.icontains(.scan.ocr.raw,\n                                '(?:scan|camera|review and sign)'\n                )\n                and regex.icontains(.scan.ocr.raw, '(?:\\bQR\\b|Q\\.R\\.|barcode)')\n              )\n          )\n        )"
    and
      or
        and
          beta.parse_exif func_call "beta.parse_exif(file.message_screenshot()).image_height < 2000"
          beta.parse_exif func_call "beta.parse_exif(file.message_screenshot()).image_width < 2000"
        body.html.raw regex_match "\\\"padding:0px 0px \\d{3,4}px 0px"
      attachments length_compare "0"
       macro "any(beta.scan_qr(file.message_screenshot()).items,\n              .type is not null\n              and regex.contains(.data, '\\.')\n              // exclude contact cards\n              and not strings.istarts_with(.data, \"BEGIN:VCARD\")\n      )"
  or
    and
      not
        and
          headers.auth_summary.dmarc.pass eq "true"
          headers.auth_summary.dmarc.pass is_not_null
      sender.email.domain.domain macro "sender.email.domain.domain in org_domains"
    and
      not
        profile.by_sender_email func_call "profile.by_sender_email().solicited"
      profile.by_sender_email func_call "profile.by_sender_email().prevalence in (\"new\", \"outlier\")"
    profile.by_sender_email func_call "profile.by_sender_email().any_messages_malicious_or_spam"
  or
    and
      any(attachments)
        length func_call "length(ml.logo_detect(.).brands) > 0"
      attachments length_compare "10"
    attachments length_compare "3"
  not
    and
      headers.auth_summary.dmarc.pass eq "true"
      headers.auth_summary.dmarc.pass is_not_null
      sender.email.domain.root_domain macro "sender.email.domain.root_domain in high_trust_sender_root_domains"
  not
    profile.by_sender_email func_call "profile.by_sender_email().any_messages_benign"
  type.inbound eq "true"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
body.html.rawregex_match
  • \"padding:0px 0px \d{3,4}px 0px
field:"body.html.raw" kind:regex_match
headers.in_reply_tois_null
  • (no value, null check)
field:"headers.in_reply_to" kind:is_null
sender.display_nameregex_match
  • /bHR/b corpus 4 (mql 4)
  • Accounts.?Payable
  • Admin corpus 5 (mql 5)
  • Administrator corpus 5 (mql 5)
  • Alert corpus 5 (mql 5)
  • Assistant corpus 5 (mql 5)
  • Benefits corpus 5 (mql 5)
  • Billing corpus 5 (mql 5)
  • Bonus corpus 5 (mql 5)
  • CEO corpus 5 (mql 5)
  • CFO corpus 5 (mql 5)
  • CIO corpus 5 (mql 5)
  • CTO corpus 5 (mql 5)
  • Chairman corpus 5 (mql 5)
  • Claim corpus 5 (mql 5)
  • Confirm corpus 5 (mql 5)
  • Critical corpus 5 (mql 5)
  • Customer Service corpus 5 (mql 5)
  • Deal corpus 5 (mql 5)
  • Director corpus 5 (mql 5)
  • Discount corpus 5 (mql 5)
  • Exclusive corpus 5 (mql 5)
  • Executive corpus 5 (mql 5)
  • Fax corpus 5 (mql 5)
  • Free corpus 5 (mql 5)
  • Gift corpus 5 (mql 5)
  • Helpdesk corpus 5 (mql 5)
  • Human Resources corpus 5 (mql 5)
  • Immediate corpus 5 (mql 5)
  • Important corpus 5 (mql 5)
  • Info corpus 5 (mql 5)
  • Information corpus 5 (mql 5)
  • Invoice corpus 5 (mql 5)
  • Legal corpus 4 (mql 4)
  • Lottery corpus 5 (mql 5)
  • Management corpus 5 (mql 5)
  • Manager corpus 5 (mql 5)
  • Member Services corpus 5 (mql 5)
  • Notification corpus 5 (mql 5)
  • Offer corpus 5 (mql 5)
  • +34 more values (see full rule source)
field:"sender.display_name" kind:regex_match
subject.subjectregex_match
  • (Authenticat(e|or|ion)|2fa|Multi.Factor|(qr|bar).code|action.require|alert|Att(n|ention):)
  • 38417 corpus 8 (mql 8)
  • :completed corpus 8 (mql 8)
  • [il1]{2}mit.*ma[il1]{2} ?bo?x corpus 8 (mql 8)
  • [il][il][il]egai[ -] corpus 8 (mql 8)
  • [li][li][li]ega[li] attempt corpus 8 (mql 8)
  • [ng]-?[io]n .*block corpus 8 (mql 8)
  • [ng]-?[io]n .*cancel corpus 8 (mql 8)
  • [ng]-?[io]n .*deactiv corpus 8 (mql 8)
  • [ng]-?[io]n .*disabl corpus 8 (mql 8)
  • abandon.*package corpus 8 (mql 8)
  • about.your.account corpus 8 (mql 8)
  • acc(ou)?n?t (is )?on ho[li]d corpus 8 (mql 8)
  • acc(ou)?n?t.*terminat corpus 8 (mql 8)
  • acc(oun)?t.*[il1]{2}mitation corpus 8 (mql 8)
  • access.*limitation corpus 8 (mql 8)
  • account (will be )?block corpus 8 (mql 8)
  • account v[il]o[li]at corpus 8 (mql 8)
  • account.*de-?activat corpus 8 (mql 8)
  • account.*locked corpus 8 (mql 8)
  • account.*re-verification corpus 8 (mql 8)
  • account.*security corpus 8 (mql 8)
  • account.*suspension corpus 8 (mql 8)
  • account.has.been corpus 8 (mql 8)
  • account.has.expired corpus 8 (mql 8)
  • account.will.be.blocked corpus 8 (mql 8)
  • action.*required corpus 8 (mql 8)
  • activity.*acc(oun)?t corpus 8 (mql 8)
  • all.?staff
  • almost.full corpus 8 (mql 8)
  • app[li]e.[il]d corpus 8 (mql 8)
  • authenticate.*account corpus 8 (mql 8)
  • been.*suspend corpus 8 (mql 8)
  • bonus
  • clos.*of.*account.*processed corpus 8 (mql 8)
  • confirm.your.account corpus 8 (mql 8)
  • courier.*able corpus 8 (mql 8)
  • crediential.*notif corpus 8 (mql 8)
  • deactivation.*in.*progress corpus 8 (mql 8)
  • delivery.*attempt.*failed corpus 8 (mql 8)
  • +88 more values (see full rule source)
field:"subject.subject" kind:regex_match
type.inboundeq
  • true transforms: boolean corpus 1212 (mql 1212)
field:"type.inbound" kind:eq value:"true"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
headers.auth_summary.dmarc.passeqtrueexcludes:headers.auth_summary.dmarc.pass field:"headers.auth_summary.dmarc.pass" value:"true"
headers.auth_summary.dmarc.passis_not_null(no value, null check)excludes:headers.auth_summary.dmarc.pass

Back to all Sublime MQL rules