Detection rules › Sublime MQL

Brand Impersonation: ShareFile

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

This detection rule matches on the impersonation of the file sharing site ShareFile. Threat actors have been observed abusing this brand to deliver messages with links to crediential phishing pages.

Threat classification

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

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesImpersonation: Brand, Evasion, Lookalike domain

Event coverage

Rule body MQL

type.inbound
and (
  0 < length(body.links) < 100
  or 0 < length(filter(attachments, .file_type in $file_types_images)) <= 5
  or length(filter(attachments, .file_type == "pdf")) == 1
)
and (
  strings.icontains(sender.display_name, 'ShareFile')
  or strings.icontains(subject.subject, 'ShareFile Attachments')
  or strings.ilevenshtein(sender.display_name, 'ShareFile') <= 2
  or strings.icontains(sender.email.domain.domain, 'sharefile')
  // message body
  or strings.icontains(body.current_thread.text, 'ShareFile Attachments')
  or strings.icontains(body.current_thread.text,
                       'Click here to change how often ShareFile sends emails'
  )
  or strings.icontains(body.current_thread.text,
                       'uses ShareFile to share documents securely'
  )
  or strings.icontains(body.current_thread.text,
                       'ShareFile is a tool for sending, receiving, and organizing your business files online'
  )
  or regex.icontains(body.current_thread.text,
                     'shared a (?:file|document)\s*(?:\w+\s+){0,3}\s*via sharefile'
  )
  or strings.icontains(body.current_thread.text, 'Powered By Citrix ShareFile')
  or regex.icontains(body.current_thread.text, '© 20\d\d ShareFile')

  // any of the attached images contain the same message body wording
  or (
    0 < length(attachments) <= 5
    and (
      all(attachments, .file_type in $file_types_images)
      or (length(filter(attachments, .file_type == "pdf")) == 1)
    )
    and any(attachments,
            any(file.explode(.),
                strings.icontains(.scan.ocr.raw, 'ShareFile Attachments')
                or strings.icontains(.scan.ocr.raw,
                                     'Click here to change how often ShareFile sends emails'
                )
                or strings.icontains(.scan.ocr.raw,
                                     'uses ShareFile to share documents securely'
                )
                or strings.icontains(.scan.ocr.raw,
                                     'ShareFile is a tool for sending, receiving, and organizing your business files online'
                )
                or strings.icontains(.scan.ocr.raw,
                                     'Powered By Citrix ShareFile'
                )
                or regex.icontains(body.current_thread.text,
                                   '© 20\d\d ShareFile'
                )
            )
    )
  )
)
and not (
  sender.email.domain.root_domain in (
    'sf-notifications.com',
    'sharefile.com',
    'cloud.com', // previous parent org of ShareFile
    'progress.com' // progress.com is the parent org of ShareFile
  )
  and headers.auth_summary.dmarc.pass
)
// ShareFile also allows you customers to send from customer domains/mail servers
// https://docs.sharefile.com/en-us/sharefile/configure/admin-settings/advanced-preferences.html#smtp-server
// when this happens, we cannot depend on the sender.email.domain.root_domain
// there does appear to be a custom header value added though. 
and not (
  any(headers.hops,
      .index == 0
      and any(.fields,
              (
                .name =~ "X-SMTPAPI"
                and strings.icontains(.value, 'sf_event_id')
              )
              or .name in~ ("x-sf-messageclass", "x-sf-uri")
      )
  )
)
// 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
)

Detection logic

Scope: inbound message.

This detection rule matches on the impersonation of the file sharing site ShareFile. Threat actors have been observed abusing this brand to deliver messages with links to crediential phishing pages.

  1. inbound message
  2. any of:
    • all of:
      • length(body.links) > 0
      • length(body.links) < 100
    • all of:
      • length(filter(attachments, .file_type in $file_types_images)) > 0
      • length(filter(attachments, .file_type in $file_types_images)) ≤ 5
    • length(filter(attachments, .file_type == 'pdf')) is 1
  3. any of:
    • sender.display_name contains 'ShareFile'
    • subject.subject contains 'ShareFile Attachments'
    • sender.display_name is similar to 'ShareFile'
    • sender.email.domain.domain contains 'sharefile'
    • body.current_thread.text contains 'ShareFile Attachments'
    • body.current_thread.text contains 'Click here to change how often ShareFile sends emails'
    • body.current_thread.text contains 'uses ShareFile to share documents securely'
    • body.current_thread.text contains 'ShareFile is a tool for sending, receiving, and organizing your business files online'
    • body.current_thread.text matches 'shared a (?:file|document)\\s*(?:\\w+\\s+){0,3}\\s*via sharefile'
    • body.current_thread.text contains 'Powered By Citrix ShareFile'
    • body.current_thread.text matches '© 20\\d\\d ShareFile'
    • all of:
      • all of:
        • length(attachments) > 0
        • length(attachments) ≤ 5
      • any of:
        • all of attachments where:
          • .file_type in $file_types_images
        • length(filter(attachments, .file_type == 'pdf')) is 1
      • any of attachments where:
        • any of file.explode(.) where any holds:
          • .scan.ocr.raw contains 'ShareFile Attachments'
          • .scan.ocr.raw contains 'Click here to change how often ShareFile sends emails'
          • .scan.ocr.raw contains 'uses ShareFile to share documents securely'
          • .scan.ocr.raw contains 'ShareFile is a tool for sending, receiving, and organizing your business files online'
          • .scan.ocr.raw contains 'Powered By Citrix ShareFile'
          • body.current_thread.text matches '© 20\\d\\d ShareFile'
  4. not:
    • all of:
      • sender.email.domain.root_domain in ('sf-notifications.com', 'sharefile.com', 'cloud.com', 'progress.com')
      • headers.auth_summary.dmarc.pass
  5. not:
    • any of headers.hops where all hold:
      • .index is 0
      • any of .fields where any holds:
        • all of:
          • .name is 'X-SMTPAPI'
          • .value contains 'sf_event_id'
        • .name in ('x-sf-messageclass', 'x-sf-uri')
  6. 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

Inspects: attachments[].file_type, body.current_thread.text, body.links, headers.auth_summary.dmarc.pass, headers.hops, headers.hops[].fields, headers.hops[].fields[].name, headers.hops[].fields[].value, headers.hops[].index, sender.display_name, sender.email.domain.domain, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: file.explode, regex.icontains, strings.icontains, strings.ilevenshtein. Reference lists: $file_types_images, $high_trust_sender_root_domains.

Indicators matched (19)

FieldMatchValue
attachments[].file_typeequalspdf
strings.icontainssubstringShareFile
strings.icontainssubstringShareFile Attachments
strings.ilevenshteinfuzzyShareFile
strings.icontainssubstringsharefile
strings.icontainssubstringClick here to change how often ShareFile sends emails
strings.icontainssubstringuses ShareFile to share documents securely
strings.icontainssubstringShareFile is a tool for sending, receiving, and organizing your business files online
regex.icontainsregexshared a (?:file|document)\s*(?:\w+\s+){0,3}\s*via sharefile
strings.icontainssubstringPowered By Citrix ShareFile
regex.icontainsregex© 20\d\d ShareFile
sender.email.domain.root_domainmembersf-notifications.com
7 more
sender.email.domain.root_domainmembersharefile.com
sender.email.domain.root_domainmembercloud.com
sender.email.domain.root_domainmemberprogress.com
headers.hops[].fields[].nameequalsX-SMTPAPI
strings.icontainssubstringsf_event_id
headers.hops[].fields[].namememberx-sf-messageclass
headers.hops[].fields[].namememberx-sf-uri