Detection rules › Sublime MQL

Service Abuse: HelloSign share with suspicious sender or document name

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

The detection rule is designed to identify messages sent from HelloSign that notify recipients about a shared file and contain suspicious content either in the document or the sender's display name.

Threat classification

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

CategoryValues
Attack typesCallback Phishing, BEC/Fraud
Tactics and techniquesEvasion, Social engineering

Event coverage

Rule body MQL

type.inbound

// Legitimate Dropbox sending infrastructure
and sender.email.email == "noreply@mail.hellosign.com"
and headers.auth_summary.spf.pass
and headers.auth_summary.dmarc.pass
and (
  strings.icontains(subject.subject, ' - Signature Requested')
  or (
    strings.icontains(subject.subject, 'Reminder: ')
    and strings.icontains(subject.subject, 'awaiting your signature')
  )
)
and not strings.icontains(subject.subject, 'You just signed')
// negate CDP Esign which reuses hellosign
and not strings.contains(body.current_thread.text, '@cdpesign.com')
// negate messages where the "on_behalf_of_email" is within the org_domains
and not any(headers.hops,
            any(.fields,
                .name == "X-Mailgun-Variables"
                and strings.icontains(.value, 'on_behalf_of_email')
                and all(regex.iextract(.value,
                                       '\"on_behalf_of_email": \"(?P<sender_email>[^\"]+@(?P<sender_domain>[^\"]+))\",'
                        ),
                        .named_groups["sender_domain"] in $org_domains
                )
            )
)
// sometimes there isn't an on_behalf_of_email, so in those cases we can use the body to extract the sender
and not (
  regex.icontains(body.html.raw,
                  '<th class="action-item--action[^\>]+\>\s*[^\<]*\((?P<sender_email>[^\)]+)\).*?</th>'
  )
  // check that the sender email has not been observed previously
  and all(regex.iextract(body.html.raw,
                         '<th class="action-item--action[^\>]+\>\s*[^\<]*\((?P<sender_email>[^\"]+@(?P<sender_domain>[^\"]+))\).*?</th>'
          ),
          .named_groups["sender_domain"] in $org_domains
  )
)
and (
  // contains the word dropbox
  // the subject is in the format of "<actor controlled title>(?: - Signature Requested by| is awaiting your signature) <actor controlled name>"
  (
    strings.icontains(subject.subject, 'dropbox')
    // negate where the sender is dropbox
    and not any(headers.hops,
                any(.fields,
                    .name == "X-Mailgun-Variables"
                    and regex.contains(.value,
                                       '\"on_behalf_of_email": \"[^\"]+@dropbox.com\"'
                    )
                )
    )
  )
  or strings.icontains(subject.subject, 'sharefile')
  or strings.icontains(subject.subject, 'helloshare')

  // sender names part of the subject
  or (
    // Signature Terms in the Sender Display Name
    strings.icontains(sender.display_name, 'Signature Requ')
    // Billing Accounting
    or regex.icontains(sender.display_name,
                       'Accounts? (?:Payable|Receivable)',
    )
    or strings.icontains(sender.display_name, 'Billing Support')

    // HR/Payroll/Legal/etc
    or strings.icontains(sender.display_name, 'Compliance HR')
    or regex.icontains(sender.display_name,
                       '(?:Compliance|Executive|\bHR\b|Human Resources|\bHR\b|\bIT\b|Legal|Payroll|Purchasing|Operations|Security|Support).*(?:Department|Dept|Team|Desk)?'
    )
    or strings.icontains(sender.display_name, 'Corporate Communications')
    or strings.icontains(sender.display_name, 'Employee Relations')
    or strings.icontains(sender.display_name, 'Office Manager')
    or strings.icontains(sender.display_name, 'Risk Management')
    or regex.icontains(sender.display_name, 'Payroll Admin(?:istrator)?')

    // IT related
    or regex.icontains(sender.display_name,
                       'IT Support',
                       'Information Technology',
                       '(?:Network|System) Admin(?:istrator)?',
                       'Help Desk',
                       'Tech(?:nical) Support'
    )
  )

  // NLU/Logo Detection on message from the sender/message body 
  or any(html.xpath(body.html,
                    '//table[not(@class)]/tbody/tr/th[2]/p[@class="subhead"][2]/parent::th'
         ).nodes,
         any(ml.nlu_classifier(.display_text).intents,
             .name == "callback_scam" and .confidence == "high"
         )
  )
  // callback logos
  or any(ml.logo_detect(file.message_screenshot()).brands,
         .name in ("PayPal", "Norton", "GeekSquad", "Ebay", "McAfee", "AT&T")
  )

  // filename analysis
  // the filename is also contianed in the subject line
  or (
    // scanner themed
    regex.icontains(subject.subject,
                    'scanne[rd].*(?: - Signature Requested by| is awaiting your signature)'
    )
    // image theme
    or regex.icontains(subject.subject,
                       '_IMG_.*(?: - Signature Requested by| is awaiting your signature)',
                       'IMG[_-](?:\d|\W)+.*(?: - Signature Requested by| is awaiting your signature)'
    )
    // Invoice Themes
    or regex.icontains(subject.subject,
                       '(?:INV\b|\bACH\b|Wire Confirmation|\bP[O0]\W+?\d+\"|\bP[O0](?:\W+?|\d+)|Purchase Order|Past Due|Remit(?:tance)?).*(?: - Signature Requested by| is awaiting your signature)'
    )
    // Payment Themes
    or regex.icontains(subject.subject,
                       '(?:payment.*(?:complete|confirmation|approved|recent|processing)|(complete|confirmation|approved|recent|processing).*payment).*(?: - Signature Requested by| is awaiting your signature)'
    )

    // Payroll/HR
    or regex.icontains(subject.subject,
                       '(?:Payroll|Employee Pay\b|Salary|Benefit Enrollment|Payment.*Benefit|Benefit.*Update|Employee Handbook|Reimbursement Approved).*(?: - Signature Requested by| is awaiting your signature)'
    )

    // shared files/extenstion/urgency/CTA
    or regex.icontains(subject.subject,
                       '(?:Urgent|Important|Immediate|Secure|Encrypt|shared|\bsent\b|protected|Validate|Final Notice|Review(?:and |& )?Sign|Download PDF).*(?: - Signature Requested by| is awaiting your signature)'
    )

    // MFA theme
    or regex.icontains(subject.subject,
                       '(?:Verification Code|\bMFA\b).*(?: - Signature Requested by| is awaiting your signature)'
    )
  )
)

Detection logic

Scope: inbound message.

The detection rule is designed to identify messages sent from HelloSign that notify recipients about a shared file and contain suspicious content either in the document or the sender's display name.

  1. inbound message
  2. sender.email.email is 'noreply@mail.hellosign.com'
  3. headers.auth_summary.spf.pass
  4. headers.auth_summary.dmarc.pass
  5. any of:
    • subject.subject contains ' - Signature Requested'
    • all of:
      • subject.subject contains 'Reminder: '
      • subject.subject contains 'awaiting your signature'
  6. not:
    • subject.subject contains 'You just signed'
  7. not:
    • body.current_thread.text contains '@cdpesign.com'
  8. not:
    • any of headers.hops where:
      • any of .fields where all hold:
        • .name is 'X-Mailgun-Variables'
        • .value contains 'on_behalf_of_email'
        • all of regex.iextract(.value) where:
          • .named_groups['sender_domain'] in $org_domains
  9. not:
    • all of:
      • body.html.raw matches '<th class="action-item--action[^\\>]+\\>\\s*[^\\<]*\\((?P<sender_email>[^\\)]+)\\).*?</th>'
      • all of regex.iextract(body.html.raw) where:
        • .named_groups['sender_domain'] in $org_domains
  10. any of:
    • all of:
      • subject.subject contains 'dropbox'
      • not:
        • any of headers.hops where:
          • any of .fields where all hold:
            • .name is 'X-Mailgun-Variables'
            • .value matches '\\"on_behalf_of_email": \\"[^\\"]+@dropbox.com\\"'
    • subject.subject contains 'sharefile'
    • subject.subject contains 'helloshare'
    • any of:
      • sender.display_name contains 'Signature Requ'
      • sender.display_name matches 'Accounts? (?:Payable|Receivable)'
      • sender.display_name contains 'Billing Support'
      • sender.display_name contains 'Compliance HR'
      • sender.display_name matches '(?:Compliance|Executive|\\bHR\\b|Human Resources|\\bHR\\b|\\bIT\\b|Legal|Payroll|Purchasing|Operations|Security|Support).*(?:Department|Dept|Team|Desk)?'
      • sender.display_name contains 'Corporate Communications'
      • sender.display_name contains 'Employee Relations'
      • sender.display_name contains 'Office Manager'
      • sender.display_name contains 'Risk Management'
      • sender.display_name matches 'Payroll Admin(?:istrator)?'
      • sender.display_name matches any of 5 patterns
        • IT Support
        • Information Technology
        • (?:Network|System) Admin(?:istrator)?
        • Help Desk
        • Tech(?:nical) Support
    • any of html.xpath(body.html, '//table[not(@class)]/tbody/tr/th[2]/p[@class="subhead"][2]/parent::th').nodes where:
      • any of ml.nlu_classifier(.display_text).intents where all hold:
        • .name is 'callback_scam'
        • .confidence is 'high'
    • any of ml.logo_detect(file.message_screenshot()).brands where:
      • .name in ('PayPal', 'Norton', 'GeekSquad', 'Ebay', 'McAfee', 'AT&T')
    • subject.subject matches any of 8 patterns
      • scanne[rd].*(?: - Signature Requested by| is awaiting your signature)
      • _IMG_.*(?: - Signature Requested by| is awaiting your signature)
      • IMG[_-](?:\d|\W)+.*(?: - Signature Requested by| is awaiting your signature)
      • (?:INV\b|\bACH\b|Wire Confirmation|\bP[O0]\W+?\d+\"|\bP[O0](?:\W+?|\d+)|Purchase Order|Past Due|Remit(?:tance)?).*(?: - Signature Requested by| is awaiting your signature)
      • (?:payment.*(?:complete|confirmation|approved|recent|processing)|(complete|confirmation|approved|recent|processing).*payment).*(?: - Signature Requested by| is awaiting your signature)
      • (?:Payroll|Employee Pay\b|Salary|Benefit Enrollment|Payment.*Benefit|Benefit.*Update|Employee Handbook|Reimbursement Approved).*(?: - Signature Requested by| is awaiting your signature)
      • (?:Urgent|Important|Immediate|Secure|Encrypt|shared|\bsent\b|protected|Validate|Final Notice|Review(?:and |& )?Sign|Download PDF).*(?: - Signature Requested by| is awaiting your signature)
      • (?:Verification Code|\bMFA\b).*(?: - Signature Requested by| is awaiting your signature)

Inspects: body.current_thread.text, body.html, body.html.raw, headers.auth_summary.dmarc.pass, headers.auth_summary.spf.pass, headers.hops, headers.hops[].fields, headers.hops[].fields[].name, headers.hops[].fields[].value, sender.display_name, sender.email.email, subject.subject, type.inbound. Sensors: file.message_screenshot, html.xpath, ml.logo_detect, ml.nlu_classifier, regex.contains, regex.icontains, regex.iextract, strings.contains, strings.icontains. Reference lists: $org_domains.

Indicators matched (46)

FieldMatchValue
sender.email.emailequalsnoreply@mail.hellosign.com
strings.icontainssubstring - Signature Requested
strings.icontainssubstringReminder:
strings.icontainssubstringawaiting your signature
strings.icontainssubstringYou just signed
strings.containssubstring@cdpesign.com
headers.hops[].fields[].nameequalsX-Mailgun-Variables
strings.icontainssubstringon_behalf_of_email
regex.iextractregex\"on_behalf_of_email": \"(?P<sender_email>[^\"]+@(?P<sender_domain>[^\"]+))\",
regex.icontainsregex<th class="action-item--action[^\>]+\>\s*[^\<]*\((?P<sender_email>[^\)]+)\).*?</th>
regex.iextractregex<th class="action-item--action[^\>]+\>\s*[^\<]*\((?P<sender_email>[^\"]+@(?P<sender_domain>[^\"]+))\).*?</th>
strings.icontainssubstringdropbox
34 more
regex.containsregex\"on_behalf_of_email": \"[^\"]+@dropbox.com\"
strings.icontainssubstringsharefile
strings.icontainssubstringhelloshare
strings.icontainssubstringSignature Requ
regex.icontainsregexAccounts? (?:Payable|Receivable)
strings.icontainssubstringBilling Support
strings.icontainssubstringCompliance HR
regex.icontainsregex(?:Compliance|Executive|\bHR\b|Human Resources|\bHR\b|\bIT\b|Legal|Payroll|Purchasing|Operations|Security|Support).*(?:Department|Dept|Team|Desk)?
strings.icontainssubstringCorporate Communications
strings.icontainssubstringEmployee Relations
strings.icontainssubstringOffice Manager
strings.icontainssubstringRisk Management
regex.icontainsregexPayroll Admin(?:istrator)?
regex.icontainsregexIT Support
regex.icontainsregexInformation Technology
regex.icontainsregex(?:Network|System) Admin(?:istrator)?
regex.icontainsregexHelp Desk
regex.icontainsregexTech(?:nical) Support
ml.nlu_classifier(html.xpath(body.html, '//table[not(@class)]/tbody/tr/th[2]/p[@class="subhead"][2]/parent::th').nodes[].display_text).intents[].nameequalscallback_scam
ml.nlu_classifier(html.xpath(body.html, '//table[not(@class)]/tbody/tr/th[2]/p[@class="subhead"][2]/parent::th').nodes[].display_text).intents[].confidenceequalshigh
ml.logo_detect(file.message_screenshot()).brands[].namememberPayPal
ml.logo_detect(file.message_screenshot()).brands[].namememberNorton
ml.logo_detect(file.message_screenshot()).brands[].namememberGeekSquad
ml.logo_detect(file.message_screenshot()).brands[].namememberEbay
ml.logo_detect(file.message_screenshot()).brands[].namememberMcAfee
ml.logo_detect(file.message_screenshot()).brands[].namememberAT&T
regex.icontainsregexscanne[rd].*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex_IMG_.*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregexIMG[_-](?:\d|\W)+.*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex(?:INV\b|\bACH\b|Wire Confirmation|\bP[O0]\W+?\d+\"|\bP[O0](?:\W+?|\d+)|Purchase Order|Past Due|Remit(?:tance)?).*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex(?:payment.*(?:complete|confirmation|approved|recent|processing)|(complete|confirmation|approved|recent|processing).*payment).*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex(?:Payroll|Employee Pay\b|Salary|Benefit Enrollment|Payment.*Benefit|Benefit.*Update|Employee Handbook|Reimbursement Approved).*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex(?:Urgent|Important|Immediate|Secure|Encrypt|shared|\bsent\b|protected|Validate|Final Notice|Review(?:and |& )?Sign|Download PDF).*(?: - Signature Requested by| is awaiting your signature)
regex.icontainsregex(?:Verification Code|\bMFA\b).*(?: - Signature Requested by| is awaiting your signature)