Sublime Security medium experimental mql

Attachment: ICS calendar invite with encoded recipient in link

Flags inbound messages carrying an ICS calendar attachment whose event data contains a link where the URL fragment is encoded to match the recipient's own email address. This encoding technique is used to personalize and track malicious links delivered through calendar invites, distinguishing this detection from rules covering links in the message body or non-ICS attachments.

View Source

Detection Logic

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,
                any(.links,
                    strings.decode_hex(.href_url.fragment) == recipients.to[0].email.email
                    or recipients.to[0].email.email in strings.scan_base64(.href_url.fragment,
                                                                           ignore_padding=true
                    )
                )
        )
)

Field Validations

Loading…

Comments (0)

Loading comments...