Sublime Security low experimental mql

Prompt injection: Instructions to an AI in a calendar invite

Detects calendar invites whose summary or description addresses an AI (an assistant, a named model such as 'Gemini,', 'the user', 'previous instructions') where NLU finds a request and the prompt injection model agrees on the same field. Calendar assistants read the full event text. Excludes graymail from senders passing DMARC.

View Source

Detection Logic

type.inbound
//
// 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(filter(attachments,
               .content_type in ("text/calendar", "application/ics")
               or .file_extension =~ "ics"
        ),
        any(file.explode(.),
            any(.scan.ics.calendars,
                any(.components,
                    any([.summary, .description],
                        regex.icontains(.,
                                        '\b(?:assistant
| llm
| screener
| summari[sz]er)s?\b
| (?:^
| [\n\[(>\x27\".:])\s*(?:hey\s+)?(?:chatgpt
| gemini
| copilot
| claude)\s*[:,]
| \b(?:ai
| language)\s+models?\b
| \bthe\s+user\b
| \b(?:previous
| prior)\s+instructions\b'
                        )
                        and any(ml.nlu_classifier(.).entities,
                                .name == "request"
                        )
                        and beta.prompt_injection_detection(.).detection == "injection"
                        and beta.prompt_injection_detection(.).confidence in (
                          "medium",
                          "high"
                        )
                    )
                )
            )
        )
)

// graymail from authenticated senders... AI-product newsletters and webinars
and not coalesce(ml.attack_score_flash().verdict == "graymail"
                 and headers.auth_summary.dmarc.pass,
                 false
)

Field Validations

Loading…

Comments (0)

Loading comments...