Detection rules › Sublime MQL

Attachment: PDF with JSFck obfuscation

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

PDF attachment contains JavaScript obfuscated using JSFck encoding techniques. JSFck is a method of writing JavaScript code using only six characters: !+ which is often used to evade detection by security tools.

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(filter(attachments, .file_type == "pdf"),
        any(file.explode(.),
            .depth == 0
            and any(.scan.yara.matches,
                    .name in ("pdf_jsfck_strings", "pdf_jsfck_ratio")
            )
        )
)

Detection logic

Scope: inbound message.

PDF attachment contains JavaScript obfuscated using JSFck encoding techniques. JSFck is a method of writing JavaScript code using only six characters: !+ which is often used to evade detection by security tools.

  1. inbound message
  2. any of filter(attachments) where:
    • any of file.explode(.) where all hold:
      • .depth is 0
      • any of .scan.yara.matches where:
        • .name in ('pdf_jsfck_strings', 'pdf_jsfck_ratio')

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

Indicators matched (3)

FieldMatchValue
attachments[].file_typeequalspdf
file.explode(filter(attachments)[])[].scan.yara.matches[].namememberpdf_jsfck_strings
file.explode(filter(attachments)[])[].scan.yara.matches[].namememberpdf_jsfck_ratio