Detection rules › Sublime MQL
Attachment: ICS calendar file with QR code containing recipient email address
Detects calendar attachments (.ics files) containing QR codes that include the recipient's email address in the URL, URL fragment, or base64-encoded data. This technique is commonly used to personalize credential theft attacks by embedding the target's email address within calendar invitations.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Credential Phishing |
| Tactics and techniques | QR code, Social engineering, Evasion |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| recipients.to (collection) |
| type |
Rule body MQL
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,
//
// 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
//
any(beta.scan_qr(file.html_screenshot(.description_html)).items,
strings.icontains(.url.url, recipients.to[0].email.email)
or any(strings.scan_base64(.url.url, format="url"),
strings.icontains(., recipients.to[0].email.email)
)
or any(strings.scan_base64(.url.fragment),
strings.icontains(., recipients.to[0].email.email)
)
)
)
)
Detection logic
Scope: inbound message.
Detects calendar attachments (.ics files) containing QR codes that include the recipient's email address in the URL, URL fragment, or base64-encoded data. This technique is commonly used to personalize credential theft attacks by embedding the target's email address within calendar invitations.
- inbound message
any of
attachmentswhere all hold:any of:
- .file_type is 'ics'
any of:
- .file_extension is 'ics'
- .content_type in ('application/ics', 'text/calendar')
any of
beta.file.parse_ics(.).eventswhere:any of
beta.scan_qr(file.html_screenshot(.description_html)).itemswhere any holds:- strings.icontains(.url.url)
any of
strings.scan_base64(.url.url)where:- strings.icontains(.)
any of
strings.scan_base64(.url.fragment)where:- strings.icontains(.)
Inspects: attachments[].content_type, attachments[].file_extension, attachments[].file_type, recipients.to[0].email.email, type.inbound. Sensors: beta.file.parse_ics, beta.scan_qr, file.html_screenshot, strings.icontains, strings.scan_base64.
Indicators matched (4)
| Field | Match | Value |
|---|---|---|
attachments[].file_type | equals | ics |
attachments[].file_extension | equals | ics |
attachments[].content_type | member | application/ics |
attachments[].content_type | member | text/calendar |