Detection rules › Sublime MQL

Service abuse: Microsoft with suspicious indicators in subject

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

Detects messages impersonating Microsoft account verification that contain suspicious indicators in the subject line, including phone numbers, monetary amounts, suspicious domains, explicit content, or lengthy action-oriented phrases.

Threat classification

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

CategoryValues
Attack typesCredential Phishing, Spam
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Message attribute
sender.email
subject
type

Rule body MQL

type.inbound
//
//  Warning: This rule contains sexually explicit keywords
//
and sender.email.domain.root_domain == "microsoftonline.com"
and strings.icontains(subject.subject, 'account email verification code')
and (
  // phone number regex
  regex.icontains(strings.replace_confusables(subject.base),
                  '\+?(?:[ilo0-9]{1}.)?\(?[ilo0-9]{3}?\)?.[ilo0-9]{3}.?[ilo0-9]{4}',
                  '\+?(?:[ilo0-9]{1,2})?\s?\(?\d{3}\)?[\s\.\-⋅]{0,5}[ilo0-9]{3}[\s\.\-⋅]{0,5}[ilo0-9]{4}'
  )
  // dollar amounts
  or regex.icontains(subject.base, '(?:USD|\$)\s?\d')
  or regex.icontains(subject.base, '\d+\.\d{2}\s?(?:USD|usd)')
  // suspicious TLDs
  or regex.icontains(subject.base,
                     '\.(?:ac\.th|biz\.id|co\.(?:cl|id|za)|com\.(?:ge|py)|my\.id|ne\.jp|net\.ms|nom\.za|web\.id|accountants|am|app|ar|army|beauty|best|bet|bio|biz|bond|cam|cc|cf|cfd|chat|cl|click|cloud|club|cm|company|consulting|country|cricket|cyou|date|dev|digital|directory|domains|download|enterprises|es|expert|fashion|finance|fit|foo|free|fun|ga|gdn|gf|gq|gu|help|i2p|icu|il|ing|ink|ir|jetzt|kim|kz|lat|life|limited|link|live|loan|lol|ltd|ly|me|meme|men|ml|mom|monster|mov|mq|one|online|ooo|party|photos|pictures|pizza|press|pro|pub|pw|racing|re|ren|rest|review|ro|rsvp|ru|run|sale|sbs|science|shop|site|so|social|solutions|space|store|stream|su|sx|tech|tk|today|tokyo|top|trade|tt|ua|uno|us|vip|vu|wang|website|win|work|works|world|ws|xin|xyz|zip|zone)\b'
  )
  // dating/spam/explicit content lures
  or regex.icontains(strings.replace_confusables(subject.base),
                     '(?:\bs\s?e\s?x\b|horny|hook.?up|private room|wanna meet|wants to meet|naked|porn|webcam|nudes?|sexting|erotic|kinky|seduce|adult community|cam shows|local (?:girls?|women|single)|bed partner)'
  )
  // action verbs + length
  or (
    strings.count(subject.base, " ") > 8
    and regex.icontains(strings.replace_confusables(subject.base),
                        '(?:call|dial|speak to|contact \d|to (?:stop|void|reverse|confirm|secure|verify|unfreeze))'
    )
  )
)

Detection logic

Scope: inbound message.

Detects messages impersonating Microsoft account verification that contain suspicious indicators in the subject line, including phone numbers, monetary amounts, suspicious domains, explicit content, or lengthy action-oriented phrases.

  1. inbound message
  2. sender.email.domain.root_domain is 'microsoftonline.com'
  3. subject.subject contains 'account email verification code'
  4. any of:
    • strings.replace_confusables(subject.base) matches any of 2 patterns
      • \+?(?:[ilo0-9]{1}.)?\(?[ilo0-9]{3}?\)?.[ilo0-9]{3}.?[ilo0-9]{4}
      • \+?(?:[ilo0-9]{1,2})?\s?\(?\d{3}\)?[\s\.\-⋅]{0,5}[ilo0-9]{3}[\s\.\-⋅]{0,5}[ilo0-9]{4}
    • subject.base matches '(?:USD|\\$)\\s?\\d'
    • subject.base matches '\\d+\\.\\d{2}\\s?(?:USD|usd)'
    • subject.base matches '\\.(?:ac\\.th|biz\\.id|co\\.(?:cl|id|za)|com\\.(?:ge|py)|my\\.id|ne\\.jp|net\\.ms|nom\\.za|web\\.id|accountants|am|app|ar|army|beauty|best|bet|bio|biz|bond|cam|cc|cf|cfd|chat|cl|click|cloud|club|cm|company|consulting|country|cricket|cyou|date|dev|digital|directory|domains|download|enterprises|es|expert|fashion|finance|fit|foo|free|fun|ga|gdn|gf|gq|gu|help|i2p|icu|il|ing|ink|ir|jetzt|kim|kz|lat|life|limited|link|live|loan|lol|ltd|ly|me|meme|men|ml|mom|monster|mov|mq|one|online|ooo|party|photos|pictures|pizza|press|pro|pub|pw|racing|re|ren|rest|review|ro|rsvp|ru|run|sale|sbs|science|shop|site|so|social|solutions|space|store|stream|su|sx|tech|tk|today|tokyo|top|trade|tt|ua|uno|us|vip|vu|wang|website|win|work|works|world|ws|xin|xyz|zip|zone)\\b'
    • strings.replace_confusables(subject.base) matches '(?:\\bs\\s?e\\s?x\\b|horny|hook.?up|private room|wanna meet|wants to meet|naked|porn|webcam|nudes?|sexting|erotic|kinky|seduce|adult community|cam shows|local (?:girls?|women|single)|bed partner)'
    • all of:
      • strings.count(subject.base, ' ') > 8
      • strings.replace_confusables(subject.base) matches '(?:call|dial|speak to|contact \\d|to (?:stop|void|reverse|confirm|secure|verify|unfreeze))'

Inspects: sender.email.domain.root_domain, subject.base, subject.subject, type.inbound. Sensors: regex.icontains, strings.count, strings.icontains, strings.replace_confusables.

Indicators matched (9)

FieldMatchValue
sender.email.domain.root_domainequalsmicrosoftonline.com
strings.icontainssubstringaccount email verification code
regex.icontainsregex\+?(?:[ilo0-9]{1}.)?\(?[ilo0-9]{3}?\)?.[ilo0-9]{3}.?[ilo0-9]{4}
regex.icontainsregex\+?(?:[ilo0-9]{1,2})?\s?\(?\d{3}\)?[\s\.\-⋅]{0,5}[ilo0-9]{3}[\s\.\-⋅]{0,5}[ilo0-9]{4}
regex.icontainsregex(?:USD|\$)\s?\d
regex.icontainsregex\d+\.\d{2}\s?(?:USD|usd)
regex.icontainsregex\.(?:ac\.th|biz\.id|co\.(?:cl|id|za)|com\.(?:ge|py)|my\.id|ne\.jp|net\.ms|nom\.za|web\.id|accountants|am|app|ar|army|beauty|best|bet|bio|biz|bond|cam|cc|cf|cfd|chat|cl|click|cloud|club|cm|company|consulting|country|cricket|cyou|date|dev|digital|directory|domains|download|enterprises|es|expert|fashion|finance|fit|foo|free|fun|ga|gdn|gf|gq|gu|help|i2p|icu|il|ing|ink|ir|jetzt|kim|kz|lat|life|limited|link|live|loan|lol|ltd|ly|me|meme|men|ml|mom|monster|mov|mq|one|online|ooo|party|photos|pictures|pizza|press|pro|pub|pw|racing|re|ren|rest|review|ro|rsvp|ru|run|sale|sbs|science|shop|site|so|social|solutions|space|store|stream|su|sx|tech|tk|today|tokyo|top|trade|tt|ua|uno|us|vip|vu|wang|website|win|work|works|world|ws|xin|xyz|zip|zone)\b
regex.icontainsregex(?:\bs\s?e\s?x\b|horny|hook.?up|private room|wanna meet|wants to meet|naked|porn|webcam|nudes?|sexting|erotic|kinky|seduce|adult community|cam shows|local (?:girls?|women|single)|bed partner)
regex.icontainsregex(?:call|dial|speak to|contact \d|to (?:stop|void|reverse|confirm|secure|verify|unfreeze))