Detection rules › Sublime MQL
Encrypted Microsoft Office files from untrusted sender
Detects encrypted Microsoft Office document attachments (Word, Excel, PowerPoint, Access) from untrusted senders or high-trust senders failing DMARC authentication, which may indicate an effort to bypass security scanning.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | BEC/Fraud, Callback Phishing, Credential Phishing, Extortion, Malware/Ransomware, Spam |
| Tactics and techniques | Encryption, Evasion |
Event coverage
Rule body MQL
type.inbound
and any(attachments,
(
// Word documents
strings.iends_with(.file_name, ".doc")
or strings.iends_with(.file_name, ".docx")
or strings.iends_with(.file_name, ".docm")
or .content_type == "application/msword"
or .content_type == "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
or .file_type in ("doc", "docx")
or
// Excel documents
strings.iends_with(.file_name, ".xls")
or strings.iends_with(.file_name, ".xlsx")
or strings.iends_with(.file_name, ".xlsm")
or .content_type == "application/vnd.ms-excel"
or .content_type == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
or .file_type in ("xls", "xlsx")
or
// PowerPoint documents
strings.iends_with(.file_name, ".ppt")
or strings.iends_with(.file_name, ".pptx")
or strings.iends_with(.file_name, ".pptm")
or .content_type == "application/vnd.ms-powerpoint"
or .content_type == "application/vnd.openxmlformats-officedocument.presentationml.presentation"
or .file_type in ("ppt", "pptx")
or
// Access documents
strings.iends_with(.file_name, ".accdb")
or strings.iends_with(.file_name, ".mdb")
or .content_type == "application/msaccess"
or .content_type == "application/x-msaccess"
or .content_type == "application/vnd.ms-access"
)
and any(file.explode(.),
any(.scan.yara.matches, .name == 'aes_encryption_keywords')
)
)
// Negating high-trust sender domains unless they fail DMARC authentication
and (
(
sender.email.domain.root_domain in $high_trust_sender_root_domains
and (
any(distinct(headers.hops, .authentication_results.dmarc is not null),
strings.ilike(.authentication_results.dmarc, "*fail")
)
)
)
or sender.email.domain.root_domain not in $high_trust_sender_root_domains
)
Detection logic
Scope: inbound message.
Detects encrypted Microsoft Office document attachments (Word, Excel, PowerPoint, Access) from untrusted senders or high-trust senders failing DMARC authentication, which may indicate an effort to bypass security scanning.
- inbound message
any of
attachmentswhere all hold:any of:
- .file_name ends with '.doc'
- .file_name ends with '.docx'
- .file_name ends with '.docm'
- .content_type is 'application/msword'
- .content_type is 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
- .file_type in ('doc', 'docx')
- .file_name ends with '.xls'
- .file_name ends with '.xlsx'
- .file_name ends with '.xlsm'
- .content_type is 'application/vnd.ms-excel'
- .content_type is 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
- .file_type in ('xls', 'xlsx')
- .file_name ends with '.ppt'
- .file_name ends with '.pptx'
- .file_name ends with '.pptm'
- .content_type is 'application/vnd.ms-powerpoint'
- .content_type is 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
- .file_type in ('ppt', 'pptx')
- .file_name ends with '.accdb'
- .file_name ends with '.mdb'
- .content_type is 'application/msaccess'
- .content_type is 'application/x-msaccess'
- .content_type is 'application/vnd.ms-access'
any of
file.explode(.)where:any of
.scan.yara.matcheswhere:- .name is 'aes_encryption_keywords'
any of:
all of:
- sender.email.domain.root_domain in $high_trust_sender_root_domains
any of
distinct(headers.hops)where:- .authentication_results.dmarc matches '*fail'
- sender.email.domain.root_domain not in $high_trust_sender_root_domains
Inspects: attachments[].content_type, attachments[].file_name, attachments[].file_type, headers.hops, headers.hops[].authentication_results.dmarc, sender.email.domain.root_domain, type.inbound. Sensors: file.explode, strings.iends_with, strings.ilike. Reference lists: $high_trust_sender_root_domains.
Indicators matched (28)
| Field | Match | Value |
|---|---|---|
strings.iends_with | suffix | .doc |
strings.iends_with | suffix | .docx |
strings.iends_with | suffix | .docm |
attachments[].content_type | equals | application/msword |
attachments[].content_type | equals | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
attachments[].file_type | member | doc |
attachments[].file_type | member | docx |
strings.iends_with | suffix | .xls |
strings.iends_with | suffix | .xlsx |
strings.iends_with | suffix | .xlsm |
attachments[].content_type | equals | application/vnd.ms-excel |
attachments[].content_type | equals | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
16 more
attachments[].file_type | member | xls |
attachments[].file_type | member | xlsx |
strings.iends_with | suffix | .ppt |
strings.iends_with | suffix | .pptx |
strings.iends_with | suffix | .pptm |
attachments[].content_type | equals | application/vnd.ms-powerpoint |
attachments[].content_type | equals | application/vnd.openxmlformats-officedocument.presentationml.presentation |
attachments[].file_type | member | ppt |
attachments[].file_type | member | pptx |
strings.iends_with | suffix | .accdb |
strings.iends_with | suffix | .mdb |
attachments[].content_type | equals | application/msaccess |
attachments[].content_type | equals | application/x-msaccess |
attachments[].content_type | equals | application/vnd.ms-access |
file.explode(attachments[])[].scan.yara.matches[].name | equals | aes_encryption_keywords |
strings.ilike | substring | *fail |