Detection rules › Sublime MQL

Attachment: USDA bid invitation impersonation

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

Detects messages claiming to be from USDA containing bid invitations with macro-enabled attachments or PDFs. Validates USDA-related content through OCR and natural language analysis.

Threat classification

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

CategoryValues
Attack typesBEC/Fraud
Tactics and techniquesImpersonation: Brand, PDF, Macros, Social engineering

Event coverage

Rule body MQL

type.inbound
and length(attachments) == 1
and all(attachments,
        (.file_extension in~ $file_extensions_macros or .file_type == "pdf")
        and any(file.explode(.),
                any(ml.nlu_classifier(.scan.ocr.raw).entities,
                    strings.icontains(.text, "Agriculture")
                )
        )
)
and strings.icontains(body.current_thread.text, "bid")
and (
  strings.icontains(subject.subject, 'invitation to bid')
  or any(attachments, strings.icontains(.file_name, 'usda'))
)
and strings.icontains(sender.email.domain.domain, "usda")
and any(ml.nlu_classifier(body.current_thread.text).entities,
        .text == "usda" and .name in ("sender", "org")
)

Detection logic

Scope: inbound message.

Detects messages claiming to be from USDA containing bid invitations with macro-enabled attachments or PDFs. Validates USDA-related content through OCR and natural language analysis.

  1. inbound message
  2. length(attachments) is 1
  3. all of attachments where all hold:
    • any of:
      • .file_extension in $file_extensions_macros
      • .file_type is 'pdf'
    • any of file.explode(.) where:
      • any of ml.nlu_classifier(.scan.ocr.raw).entities where:
        • .text contains 'Agriculture'
  4. body.current_thread.text contains 'bid'
  5. any of:
    • subject.subject contains 'invitation to bid'
    • any of attachments where:
      • .file_name contains 'usda'
  6. sender.email.domain.domain contains 'usda'
  7. any of ml.nlu_classifier(body.current_thread.text).entities where all hold:
    • .text is 'usda'
    • .name in ('sender', 'org')

Inspects: attachments[].file_extension, attachments[].file_name, attachments[].file_type, body.current_thread.text, sender.email.domain.domain, subject.subject, type.inbound. Sensors: file.explode, ml.nlu_classifier, strings.icontains. Reference lists: $file_extensions_macros.

Indicators matched (8)

FieldMatchValue
attachments[].file_typeequalspdf
strings.icontainssubstringAgriculture
strings.icontainssubstringbid
strings.icontainssubstringinvitation to bid
strings.icontainssubstringusda
ml.nlu_classifier(body.current_thread.text).entities[].textequalsusda
ml.nlu_classifier(body.current_thread.text).entities[].namemembersender
ml.nlu_classifier(body.current_thread.text).entities[].namememberorg