High Severity

Attachment: ICS with Suspicious Office 365 app authorization (OAuth) link

Description

Detects inbound messages with ICS calendar invites containing a suspicious Office 365 app authorization (OAuth) link. The app may be compromised or was stood up for malicious purposes. Once the app has been authorized, the attacker will have read or write permissions to the user's Office 365 account.

Sublime Security
Created Sep 28th, 2026 • Last updated Sep 28th, 2026
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,
                any(.links,
                    .href_url.domain.domain == 'login.microsoftonline.com'
                    and (
                      strings.ilike(.href_url.query_params,
                                    '*offline_access*',
                                    '*.readwrite*',
                                    '*.read*',
                                    '*ctx=*',
                                    '*prompt=none*'
                      )
                      or (
                        strings.icontains(.href_url.path, '/common/reprocess')
                        and strings.icontains(.href_url.query_params, 'ctx=')
                        and strings.icontains(.href_url.query_params,
                                              'sessionId='
                        )
                      )
                    )
                )
        )
)
MQL Rule Console
•Docs•Learning Labs

Playground

Test against your own EMLs or sample data.

Share

Post about this on your socials.

Get Started. Today.

Managed or self-managed. No MX changes.

Deploy and integrate a free Sublime instance in minutes.
Get Started