Detection rules › Sublime MQL

Attachment: RTF with embedded content

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

RTF files can contain embedded content similar to OLE files (Microsoft Office documents.)

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        .file_type == "rtf"
        and any(file.explode(.),
                .flavors.mime in~ (
                  "application/x-dosexec",
                  "text/x-msdos-batch",
                  "application/octet-stream"
                )
                or any(.flavors.yara, . == 'base64_pe')
                or .file_extension in~ ("bat", "exe", "vbs")
        )
)

Detection logic

Scope: inbound message.

RTF files can contain embedded content similar to OLE files (Microsoft Office documents.)

  1. inbound message
  2. any of attachments where all hold:
    • .file_type is 'rtf'
    • any of file.explode(.) where any holds:
      • .flavors.mime in ('application/x-dosexec', 'text/x-msdos-batch', 'application/octet-stream')
      • any of .flavors.yara where:
        • . is 'base64_pe'
      • .file_extension in ('bat', 'exe', 'vbs')

Inspects: attachments[].file_type, type.inbound. Sensors: file.explode.

Indicators matched (8)

FieldMatchValue
attachments[].file_typeequalsrtf
file.explode(attachments[])[].flavors.mimememberapplication/x-dosexec
file.explode(attachments[])[].flavors.mimemembertext/x-msdos-batch
file.explode(attachments[])[].flavors.mimememberapplication/octet-stream
file.explode(attachments[])[].flavors.yara[]equalsbase64_pe
file.explode(attachments[])[].file_extensionmemberbat
file.explode(attachments[])[].file_extensionmemberexe
file.explode(attachments[])[].file_extensionmembervbs