← Back to Explore
sublimemediumRule
Attachment: ICS file with embedded email
Detects inbound messages containing ICS calendar attachments where a parsed event includes an embedded RFC822 email as a base64-encoded attachment rather than a simple URL reference. This technique smuggles a nested email payload inside a calendar invite, often to evade attachment scanning or deliver malicious content indirectly.
Detection Query
type.inbound
and any(attachments,
(
.file_type == "ics"
or .file_extension == "ics"
or .content_type in ("application/ics", "text/calendar")
)
//
// This rule makes use of a beta feature and is subject to change without notice
// using the beta feature in custom rules is not suggested until it has been formally released
//
and any(beta.file.parse_ics(.).events,
// .md5 proves the payload is embedded base64, not a Gmail ?view=att URL reference
any(.attachments, .md5 is not null)
and (
any(.attachments, .file_extension == "eml")
or any(.raw_properties,
.name == "ATTACH"
and any(.params,
.name == "FMTTYPE"
and "message/rfc822" in .values
)
)
)
)
)
Data Sources
Email MessagesEmail HeadersEmail Attachments
Platforms
email
Raw Content
name: "Attachment: ICS file with embedded email"
description: "Detects inbound messages containing ICS calendar attachments where a parsed event includes an embedded RFC822 email as a base64-encoded attachment rather than a simple URL reference. This technique smuggles a nested email payload inside a calendar invite, often to evade attachment scanning or deliver malicious content indirectly."
type: "rule"
severity: "medium"
source: |
type.inbound
and any(attachments,
(
.file_type == "ics"
or .file_extension == "ics"
or .content_type in ("application/ics", "text/calendar")
)
//
// This rule makes use of a beta feature and is subject to change without notice
// using the beta feature in custom rules is not suggested until it has been formally released
//
and any(beta.file.parse_ics(.).events,
// .md5 proves the payload is embedded base64, not a Gmail ?view=att URL reference
any(.attachments, .md5 is not null)
and (
any(.attachments, .file_extension == "eml")
or any(.raw_properties,
.name == "ATTACH"
and any(.params,
.name == "FMTTYPE"
and "message/rfc822" in .values
)
)
)
)
)
attack_types:
- "Malware/Ransomware"
- "Credential Phishing"
tactics_and_techniques:
- "ICS Phishing"
- "Evasion"
detection_methods:
- "File analysis"
id: "31122212-d9a8-5190-85b2-46ff7e0a1212"