Detection rules › Splunk

M365 Copilot Jailbreak Attempts

Status
experimental
Severity
low
Author
Rod Soto
Source
github.com/splunk/security_content

Detects M365 Copilot jailbreak attempts through prompt injection techniques including rule manipulation, system bypass commands, and AI impersonation requests that attempt to circumvent built-in safety controls. The detection searches exported eDiscovery prompt logs for jailbreak keywords like "pretend you are," "act as," "rules=," "ignore," "bypass," and "override" in the Subject_Title field, assigning severity scores based on the manipulation type (score of 4 for amoral impersonation or explicit rule injection, score of 3 for entity roleplay or bypass commands). Prompts with a jailbreak score of 2 or higher are flagged, prioritizing the most severe attempts to override AI safety mechanisms through direct instruction injection or unauthorized persona adoption.

Known false positives

  • Legitimate users discussing AI ethics research, security professionals testing system robustness, developers creating training materials for AI safety, or academic discussions about AI limitations and behavioral constraints may trigger false positives.

MITRE ATT&CK coverage

TacticTechniques
Defense Impairment

Rule body

name: M365 Copilot Jailbreak Attempts
id: b05a4f25-e07d-436f-ab03-f954afa922c0
version: 6
creation_date: '2025-10-13'
modification_date: '2026-05-13'
author: Rod Soto
status: experimental
type: Anomaly
description: Detects M365 Copilot jailbreak attempts through prompt injection techniques including rule manipulation, system bypass commands, and AI impersonation requests that attempt to circumvent built-in safety controls. The detection searches exported eDiscovery prompt logs for jailbreak keywords like "pretend you are," "act as," "rules=," "ignore," "bypass," and "override" in the Subject_Title field, assigning severity scores based on the manipulation type (score of 4 for amoral impersonation or explicit rule injection, score of 3 for entity roleplay or bypass commands). Prompts with a jailbreak score of 2 or higher are flagged, prioritizing the most severe attempts to override AI safety mechanisms through direct instruction injection or unauthorized persona adoption.
data_source:
    - M365 Exported eDiscovery Prompts
search: |
    `m365_exported_ediscovery_prompt_logs`
    | search Subject_Title IN (
                                "*act as*",
                                "*bypass*",
                                "*ignore*",
                                "*override*",
                                "*pretend you are*",
                                "*rules=*"
                              )
    | eval user = Sender
    | eval jailbreak_score=case(
                                match(Subject_Title, "(?i)pretend you are.*amoral"), 4,
                                match(Subject_Title, "(?i)act as.*entities"), 3,
                                match(Subject_Title, "(?i)(ignore|bypass|override)"), 3,
                                match(Subject_Title, "(?i)rules\s*="), 4, 1=1, 1
    )
    | where jailbreak_score >= 2
    | table _time, user, Subject_Title, jailbreak_score, Workload, Size
    | sort -jailbreak_score, -_time
    | `m365_copilot_jailbreak_attempts_filter`
how_to_implement: To export M365 Copilot prompt logs, navigate to the Microsoft Purview compliance portal (compliance.microsoft.com) and access eDiscovery. Create a new eDiscovery case, add target user accounts or date ranges as data sources, then create a search query targeting M365 Copilot interactions across relevant workloads. Once the search completes, export the results to generate a package containing prompt logs with fields like Subject_Title (prompt text), Sender, timestamps, and workload metadata. Download the exported files using the eDiscovery Export Tool and ingest them into Splunk for security analysis and detection of jailbreak attempts, data exfiltration requests, and policy violations.
known_false_positives: Legitimate users discussing AI ethics research, security professionals testing system robustness, developers creating training materials for AI safety, or academic discussions about AI limitations and behavioral constraints may trigger false positives.
references:
    - https://www.splunk.com/en_us/blog/artificial-intelligence/m365-copilot-log-analysis-splunk.html
intermediate_findings:
    entities:
        - field: user
          type: user
          score: 20
          message: User $user$ attempted M365 Copilot Jailbreak with score $jailbreak_score$ using prompt injection techniques to bypass AI safety controls and manipulate system behavior, potentially violating acceptable use policies.
analytic_story:
    - Suspicious Microsoft 365 Copilot Activities
asset_type: Web Application
mitre_attack_id:
    - T1685
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: application
security_domain: endpoint

Stages and Predicates

Stage 1: search

`m365_exported_ediscovery_prompt_logs`

Stage 2: search

| search Subject_Title IN (
                            "*act as*",
                            "*bypass*",
                            "*ignore*",
                            "*override*",
                            "*pretend you are*",
                            "*rules=*"
                          )

Stage 3: eval

| eval user = Sender

Stage 4: eval

| eval jailbreak_score=case(
                            match(Subject_Title, "(?i)pretend you are.*amoral"), 4,
                            match(Subject_Title, "(?i)act as.*entities"), 3,
                            match(Subject_Title, "(?i)(ignore|bypass|override)"), 3,
                            match(Subject_Title, "(?i)rules\s*="), 4, 1=1, 1
)
jailbreak_score =
ifmatch(Subject_Title, "(?i)pretend you are.*amoral")4
elifmatch(Subject_Title, "(?i)act as.*entities")3
elifmatch(Subject_Title, "(?i)(ignore|bypass|override)")3
elifmatch(Subject_Title, "(?i)rules\s*=")4
else1

Stage 5: where

| where jailbreak_score >= 2

Stage 6: table

| table _time, user, Subject_Title, jailbreak_score, Workload, Size

Stage 7: sort

| sort -jailbreak_score, -_time

Stage 8: search

| `m365_copilot_jailbreak_attempts_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Subject_Titlein
  • "*act as*"
  • "*bypass*"
  • "*ignore*"
  • "*override*"
  • "*pretend you are*"
  • "*rules=*"
field:"Subject_Title" kind:in
jailbreak_scorege
  • 2
field:"jailbreak_score" kind:ge value:"2"
sourcetypeeq
  • csv
field:"sourcetype" kind:eq value:"csv"