Detection rules › Sublime MQL
Attachment: PDF with JSFck obfuscation
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).
| Category | Values |
|---|---|
| Attack types | Malware/Ransomware |
| Tactics and techniques | Evasion, PDF |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| type |
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.
- inbound message
any of
filter(attachments)where:any of
file.explode(.)where all hold:- .depth is 0
any of
.scan.yara.matcheswhere:- .name in ('pdf_jsfck_strings', 'pdf_jsfck_ratio')
Inspects: attachments[].file_type, type.inbound. Sensors: file.explode.
Indicators matched (3)
| Field | Match | Value |
|---|---|---|
attachments[].file_type | equals | pdf |
file.explode(filter(attachments)[])[].scan.yara.matches[].name | member | pdf_jsfck_strings |
file.explode(filter(attachments)[])[].scan.yara.matches[].name | member | pdf_jsfck_ratio |