Detection rules › Sublime MQL

Attachment: PDF with link to zip containing a wsf file

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

Detects a PDF attachment with a link to a ZIP file that contains a WSF file

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_type == "pdf"
        and any(file.explode(.),
                any(.scan.url.urls,
                    strings.icontains(.url, "zip")
                    and any(ml.link_analysis(.).files_downloaded,
                            any(file.explode(.), .file_extension == "wsf")
                    )
                )
                or any(.scan.url.urls,
                       strings.icontains(.url, "php")
                       and any(ml.link_analysis(.).files_downloaded,
                               any(file.explode(.),
                                   .file_extension == "zip"
                                   and any(.scan.zip.attempted_files,
                                           strings.icontains(., "wsf")
                                   )
                               )
                       )
                )
        )
)

Detection logic

Scope: inbound message.

Detects a PDF attachment with a link to a ZIP file that contains a WSF file

  1. inbound message
  2. any of attachments where all hold:
    • .file_type is 'pdf'
    • any of file.explode(.) where any holds:
      • any of .scan.url.urls where all hold:
        • .url contains 'zip'
        • any of ml.link_analysis(.).files_downloaded where:
          • any of file.explode(.) where:
            • .file_extension is 'wsf'
      • any of .scan.url.urls where all hold:
        • .url contains 'php'
        • any of ml.link_analysis(.).files_downloaded where:
          • any of file.explode(.) where all hold:
            • .file_extension is 'zip'
            • any of .scan.zip.attempted_files where:
              • . contains 'wsf'

Inspects: attachments[].file_type, type.inbound. Sensors: file.explode, ml.link_analysis, strings.icontains.

Indicators matched (6)

FieldMatchValue
attachments[].file_typeequalspdf
strings.icontainssubstringzip
file.explode(ml.link_analysis(file.explode(attachments[])[].scan.url.urls[]).files_downloaded[])[].file_extensionequalswsf
strings.icontainssubstringphp
file.explode(ml.link_analysis(file.explode(attachments[])[].scan.url.urls[]).files_downloaded[])[].file_extensionequalszip
strings.icontainssubstringwsf