Detection rules › Sublime MQL

Attachment: Archive with pdf, txt and wsf files

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

Detects a known Qakbot delivery method, zip file with pdf, txt and wsf file at a depth of 1

Threat classification

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

CategoryValues
Attack typesMalware/Ransomware
Tactics and techniquesEvasion, PDF

Event coverage

Rule body MQL

type.inbound
and any(attachments,
        .file_extension in~ $file_extensions_common_archives
        and length(distinct(filter(file.explode(.),
                                   .depth == 1
                                   and .flavors.mime in~ (
                                     "application/pdf",
                                     "text/plain"
                                   )
                            ),
                            .flavors.mime
                   )
        ) == 2
        and any(file.explode(.), .depth == 1 and .file_extension == "wsf")
)

Detection logic

Scope: inbound message.

Detects a known Qakbot delivery method, zip file with pdf, txt and wsf file at a depth of 1

  1. inbound message
  2. any of attachments where all hold:
    • .file_extension in $file_extensions_common_archives
    • length(distinct(filter(file.explode(.), .depth == 1 and .flavors.mime in~ ('application/pdf', 'text/plain')), .flavors.mime)) is 2
    • any of file.explode(.) where all hold:
      • .depth is 1
      • .file_extension is 'wsf'

Inspects: attachments[].file_extension, type.inbound. Sensors: file.explode. Reference lists: $file_extensions_common_archives.

Indicators matched (3)

FieldMatchValue
file.explode(attachments[])[].flavors.mimememberapplication/pdf
file.explode(attachments[])[].flavors.mimemembertext/plain
file.explode(attachments[])[].file_extensionequalswsf