Detection rules › Sublime MQL

Attachment: ICS calendar file with QR code containing recipient email address

Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

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).

CategoryValues
Attack typesCredential Phishing
Tactics and techniquesQR code, Social engineering, Evasion

Event coverage

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.

  1. inbound message
  2. any of attachments where 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(.).events where:
      • any of beta.scan_qr(file.html_screenshot(.description_html)).items where 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)

FieldMatchValue
attachments[].file_typeequalsics
attachments[].file_extensionequalsics
attachments[].content_typememberapplication/ics
attachments[].content_typemembertext/calendar