Detection rules › Sublime MQL
Attachment: Malicious OneNote commands
Scans for OneNote attachments that contain suspicious commands that may indicate malicious activity.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Malware/Ransomware |
| Tactics and techniques | OneNote, Scripting |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| type |
Rule body MQL
type.inbound
and any(attachments,
(
.file_extension in~ ("one")
or .file_extension in~ $file_extensions_common_archives
)
and any(file.explode(.),
"onenote_file" in .flavors.yara
and any(.scan.strings.strings,
strings.ilike(.,
"*WshShell*",
"*ExecuteCmdAsync*",
"*CreateObject*",
"*Wscript.Shell*",
"*schtasks*",
"*CreateProcess*",
"*winmgmts*",
"*SetEnvironmentVariable*",
"*powershell*",
"*echo off*"
)
)
)
)
Detection logic
Scope: inbound message.
Scans for OneNote attachments that contain suspicious commands that may indicate malicious activity.
- inbound message
any of
attachmentswhere all hold:any of:
- .file_extension in ('one')
- .file_extension in $file_extensions_common_archives
any of
file.explode(.)where all hold:- .flavors.yara contains 'onenote_file'
any of
.scan.strings.stringswhere:. matches any of 10 patterns
*WshShell**ExecuteCmdAsync**CreateObject**Wscript.Shell**schtasks**CreateProcess**winmgmts**SetEnvironmentVariable**powershell**echo off*
Inspects: attachments[].file_extension, type.inbound. Sensors: file.explode, strings.ilike. Reference lists: $file_extensions_common_archives.
Indicators matched (12)
| Field | Match | Value |
|---|---|---|
attachments[].file_extension | member | one |
file.explode(attachments[])[].flavors.yara | contains | onenote_file |
strings.ilike | substring | *WshShell* |
strings.ilike | substring | *ExecuteCmdAsync* |
strings.ilike | substring | *CreateObject* |
strings.ilike | substring | *Wscript.Shell* |
strings.ilike | substring | *schtasks* |
strings.ilike | substring | *CreateProcess* |
strings.ilike | substring | *winmgmts* |
strings.ilike | substring | *SetEnvironmentVariable* |
strings.ilike | substring | *powershell* |
strings.ilike | substring | *echo off* |