Detection rules › Sublime MQL

Brand impersonation: Quickbooks

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

Impersonation of the Quickbooks service from Intuit.

Threat classification

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

CategoryValues
Attack typesCallback Phishing, Credential Phishing
Tactics and techniquesImpersonation: Brand, Social engineering

Event coverage

Rule body MQL

type.inbound
and (
  (
    strings.ilike(sender.display_name, 'quickboo*')
    or strings.like(sender.display_name, "QB-*")
    or strings.ilike(sender.display_name, 'intuit*')
    or strings.ilevenshtein(sender.display_name, 'quickbooks') <= 1
    or strings.ilike(sender.email.domain.domain, '*quickbook*')
    or (
      length(filter(ml.nlu_classifier(body.current_thread.text).entities,
                    strings.icontains(.text, "quickbooks")
             )
      ) > 2
      and any(ml.nlu_classifier(body.current_thread.text).intents,
              .name == "cred_theft"
      )
    )
  )
  or strings.ilike(body.current_thread.text, "*invoice*")
)
and (
  any(ml.logo_detect(file.message_screenshot()).brands,
      .name == "Quickbooks" and .confidence in ("medium", "high")
  )
  // contains the address and copyright
  or (
    (
      strings.icontains(body.current_thread.text,
                        '2800 E. Commerce Center Place, Tucson, AZ 85706'
      )
      or strings.icontains(body.current_thread.text,
                           '2700 Coast Ave, Mountain View, CA 94043'
      )
    )
    and regex.icontains(body.current_thread.text, '©\s*(?:\d+)\s*Intuit')
  )
  or strings.icontains(body.current_thread.text, 'Powered by QuickBooks')
  or strings.icontains(body.current_thread.text,
                       'QuickBooks and Intuit are trademarks of Intuit Inc.'
  )
  or strings.icontains(body.current_thread.text, "QuickBooks Cloud Services")
  or strings.icontains(body.current_thread.text,
                       "Secured by QuickBooks Payments"
  )
  or strings.icontains(body.current_thread.text, "QuickBooks Support Center")
  // phone number and update language
  or (
    regex.icontains(body.current_thread.text,
                    '\+?([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}'
    )
    and any(ml.nlu_classifier(body.current_thread.text).topics,
            .name in ("Software and App Updates", "Security and Authentication")
    )

    // we need to re-check for QB indicators, otherwise we can have "*invoice*"
    // and this block, which is much more than just QB impersonation
    and (
      strings.ilike(sender.display_name, 'quickbook*')
      or strings.like(sender.display_name, "QB-*")
      or strings.ilike(sender.display_name, 'intuit*')
      or strings.ilevenshtein(sender.display_name, 'quickbooks') <= 1
      or strings.ilike(sender.email.domain.domain, '*quickbook*')
      or (
        length(filter(ml.nlu_classifier(body.current_thread.text).entities,
                      strings.icontains(.text, "quickbooks")
               )
        ) > 2
        and any(ml.nlu_classifier(body.current_thread.text).intents,
                .name == "cred_theft"
        )
      )
    )
  )
  or any(body.links,
         regex.icontains(.display_url.url, '(?:quickbooks|intuit)')
         and .mismatched
         and not .href_url.domain.root_domain in (
           "mimecast.com",
           "mimecastprotect.com"
         )
  )
)
and not (
  sender.email.domain.root_domain in~ (
    'intuit.com',
    'turbotax.com',
    'intuit.ca',
    'meliopayments.com',
    'qemailserver.com',
    'intuit.co.uk',
    'quickbooksonline.com',
    'tsheets.com'
  )
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
and (
  not profile.by_sender().any_messages_benign
  and not profile.by_sender().solicited
)
// links in body are not known QB domains or the senders root website (both indicative of a legitimate QuickBooks invoice message)
and (
  length(filter(body.links,
                .href_url.domain.root_domain in~ (
                  'intuit.com',
                  'turbotax.com',
                  'intuit.ca',
                  'meliopayments.com',
                  'qemailserver.com',
                  'intuit.co.uk',
                  'quickbooksonline.com'
                )
                or (
                  .href_url.domain.root_domain == sender.email.domain.root_domain
                  and (.href_url.path is null or .href_url.path == "/")
                )
                // handle links to the root website when the sender uses a freemail address to send invoices
                or (
                  .href_url.domain.sld == sender.email.local_part
                  and (.href_url.path is null or .href_url.path == "/")
                  and sender.email.domain.root_domain in $free_email_providers
                )
         )
  ) != length(body.links)
  // or no valid links
  or length(filter(body.links, .href_url.domain.domain is not null)) == 0
)
// the call to action link does not lead to inuit
and not (
  // filter down to observed call to action display text
  any(filter(body.links,
             .display_text in~ (
               "view and pay",
               "review and pay",
               "view details"
             )
      ),
      // benign/legit href_url details for those links
      (
        // sendgrid rewritten links
        .href_url.domain.domain == "links.notification.intuit.com"
        // CTA link
        or (
          .href_url.domain.domain == "connect.intuit.com"
          and strings.icontains(.href_url.query_params, 'cta=viewinvoicenow')
        )
        // Mimecast links
        or (
          .href_url.domain.root_domain == "mimecastprotect.com"
          and (
            strings.icontains(.href_url.query_params,
                              'domain=links.notification.intuit.com'
            )
            or strings.icontains(.href_url.query_params,
                                 'domain=connect.intuit.com'
            )
          )
        )
      )
  )
)
// negate common sender of quickbooks reseller
and not strings.icontains(body.current_thread.text, 'Purchasing Reviews, Inc')
// 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.

Impersonation of the Quickbooks service from Intuit.

  1. inbound message
  2. any of:
    • any of:
      • sender.display_name matches 'quickboo*'
      • sender.display_name matches 'QB-*'
      • sender.display_name matches 'intuit*'
      • sender.display_name is similar to 'quickbooks'
      • sender.email.domain.domain matches '*quickbook*'
      • all of:
        • length(filter(ml.nlu_classifier(body.current_thread.text).entities, strings.icontains(.text, 'quickbooks'))) > 2
        • any of ml.nlu_classifier(body.current_thread.text).intents where:
          • .name is 'cred_theft'
    • body.current_thread.text matches '*invoice*'
  3. any of:
    • any of ml.logo_detect(file.message_screenshot()).brands where all hold:
      • .name is 'Quickbooks'
      • .confidence in ('medium', 'high')
    • all of:
      • any of:
        • body.current_thread.text contains '2800 E. Commerce Center Place, Tucson, AZ 85706'
        • body.current_thread.text contains '2700 Coast Ave, Mountain View, CA 94043'
      • body.current_thread.text matches '©\\s*(?:\\d+)\\s*Intuit'
    • body.current_thread.text contains 'Powered by QuickBooks'
    • body.current_thread.text contains 'QuickBooks and Intuit are trademarks of Intuit Inc.'
    • body.current_thread.text contains 'QuickBooks Cloud Services'
    • body.current_thread.text contains 'Secured by QuickBooks Payments'
    • body.current_thread.text contains 'QuickBooks Support Center'
    • all of:
      • body.current_thread.text 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}
      • any of ml.nlu_classifier(body.current_thread.text).topics where:
        • .name in ('Software and App Updates', 'Security and Authentication')
      • any of:
        • sender.display_name matches 'quickbook*'
        • sender.display_name matches 'QB-*'
        • sender.display_name matches 'intuit*'
        • sender.display_name is similar to 'quickbooks'
        • sender.email.domain.domain matches '*quickbook*'
        • all of:
          • length(filter(ml.nlu_classifier(body.current_thread.text).entities, strings.icontains(.text, 'quickbooks'))) > 2
          • any of ml.nlu_classifier(body.current_thread.text).intents where:
            • .name is 'cred_theft'
    • any of body.links where all hold:
      • .display_url.url matches '(?:quickbooks|intuit)'
      • .mismatched
      • not:
        • .href_url.domain.root_domain in ('mimecast.com', 'mimecastprotect.com')
  4. not:
    • all of:
      • sender.email.domain.root_domain in ('intuit.com', 'turbotax.com', 'intuit.ca', 'meliopayments.com', 'qemailserver.com', 'intuit.co.uk', 'quickbooksonline.com', 'tsheets.com')
      • coalesce(headers.auth_summary.dmarc.pass)
  5. all of:
    • not:
      • profile.by_sender().any_messages_benign
    • not:
      • profile.by_sender().solicited
  6. any of:
    • length(filter(body.links, .href_url.domain.root_domain in~ ('intuit.com', 'turbotax.com', 'intuit.ca', 'meliopayments.com', 'qemailserver.com', 'intuit.co.uk', 'quickbooksonline.com') or .href_url.domain.root_domain == sender.email.domain.root_domain and .href_url.path is null or .href_url.path == '/' or .href_url.domain.sld == sender.email.local_part and .href_url.path is null or .href_url.path == '/' and sender.email.domain.root_domain in $free_email_providers)) is not length(body.links)
    • length(filter(body.links, .href_url.domain.domain is not null)) is 0
  7. not:
    • any of filter(body.links) where any holds:
      • .href_url.domain.domain is 'links.notification.intuit.com'
      • all of:
        • .href_url.domain.domain is 'connect.intuit.com'
        • .href_url.query_params contains 'cta=viewinvoicenow'
      • all of:
        • .href_url.domain.root_domain is 'mimecastprotect.com'
        • any of:
          • .href_url.query_params contains 'domain=links.notification.intuit.com'
          • .href_url.query_params contains 'domain=connect.intuit.com'
  8. not:
    • body.current_thread.text contains 'Purchasing Reviews, Inc'
  9. not:
    • all of:
      • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • coalesce(headers.auth_summary.dmarc.pass)

Inspects: body.current_thread.text, body.links, body.links[].display_text, body.links[].display_url.url, body.links[].href_url.domain.domain, body.links[].href_url.domain.root_domain, body.links[].href_url.domain.sld, body.links[].href_url.path, body.links[].mismatched, headers.auth_summary.dmarc.pass, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, sender.email.local_part, type.inbound. Sensors: file.message_screenshot, ml.logo_detect, ml.nlu_classifier, profile.by_sender, regex.icontains, strings.icontains, strings.ilevenshtein, strings.ilike, strings.like. Reference lists: $free_email_providers, $high_trust_sender_root_domains.

Indicators matched (53)

FieldMatchValue
strings.ilikesubstringquickboo*
strings.likesubstringQB-*
strings.ilikesubstringintuit*
strings.ilevenshteinfuzzyquickbooks
strings.ilikesubstring*quickbook*
strings.icontainssubstringquickbooks
ml.nlu_classifier(body.current_thread.text).intents[].nameequalscred_theft
strings.ilikesubstring*invoice*
ml.logo_detect(file.message_screenshot()).brands[].nameequalsQuickbooks
ml.logo_detect(file.message_screenshot()).brands[].confidencemembermedium
ml.logo_detect(file.message_screenshot()).brands[].confidencememberhigh
strings.icontainssubstring2800 E. Commerce Center Place, Tucson, AZ 85706
41 more
strings.icontainssubstring2700 Coast Ave, Mountain View, CA 94043
regex.icontainsregex©\s*(?:\d+)\s*Intuit
strings.icontainssubstringPowered by QuickBooks
strings.icontainssubstringQuickBooks and Intuit are trademarks of Intuit Inc.
strings.icontainssubstringQuickBooks Cloud Services
strings.icontainssubstringSecured by QuickBooks Payments
strings.icontainssubstringQuickBooks Support Center
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}
ml.nlu_classifier(body.current_thread.text).topics[].namememberSoftware and App Updates
ml.nlu_classifier(body.current_thread.text).topics[].namememberSecurity and Authentication
strings.ilikesubstringquickbook*
regex.icontainsregex(?:quickbooks|intuit)
body.links[].href_url.domain.root_domainmembermimecast.com
body.links[].href_url.domain.root_domainmembermimecastprotect.com
sender.email.domain.root_domainmemberintuit.com
sender.email.domain.root_domainmemberturbotax.com
sender.email.domain.root_domainmemberintuit.ca
sender.email.domain.root_domainmembermeliopayments.com
sender.email.domain.root_domainmemberqemailserver.com
sender.email.domain.root_domainmemberintuit.co.uk
sender.email.domain.root_domainmemberquickbooksonline.com
sender.email.domain.root_domainmembertsheets.com
body.links[].href_url.domain.root_domainmemberintuit.com
body.links[].href_url.domain.root_domainmemberturbotax.com
body.links[].href_url.domain.root_domainmemberintuit.ca
body.links[].href_url.domain.root_domainmembermeliopayments.com
body.links[].href_url.domain.root_domainmemberqemailserver.com
body.links[].href_url.domain.root_domainmemberintuit.co.uk
body.links[].href_url.domain.root_domainmemberquickbooksonline.com
body.links[].href_url.pathequals/
body.links[].display_textmemberview and pay
body.links[].display_textmemberreview and pay
body.links[].display_textmemberview details
filter(body.links)[].href_url.domain.domainequalslinks.notification.intuit.com
filter(body.links)[].href_url.domain.domainequalsconnect.intuit.com
strings.icontainssubstringcta=viewinvoicenow
filter(body.links)[].href_url.domain.root_domainequalsmimecastprotect.com
strings.icontainssubstringdomain=links.notification.intuit.com
strings.icontainssubstringdomain=connect.intuit.com
strings.icontainssubstringPurchasing Reviews, Inc