The 2026 InfoSec Playbook · Scenario playbooks

#14.11 AI System Compromise

Playbook ID: PB-AISYS | Default severity: SEV-2 (escalate to SEV-1 if the AI system holds write or act authority into a production system of record, if a non-human identity it used has been replayed elsewhere, or if regulated personal data left through it; drop to SEV-3 only once you have proven the system was read-only over data the requester was already entitled to see) | Owner: Incident Commander

#When to run this

Open this playbook on any of:

Not for: deepfake or voice-clone social engineering of a person — that is 14.9, and no AI system of yours is compromised. An attacker who merely used AI to write their malware is an ordinary intrusion; run the playbook that matches what they touched. If the AI vendor themselves was breached, start with 14.5 and use this playbook to scope your own agent's blast radius. If the compromise landed in the cluster and the agent was the door, contain here and hand the cluster to 14.10. Regulatory notification detail lives in Chapter 15; the AI inventory, agent onboarding and governance controls this playbook assumes you already have are Chapter 7.

#What you are dealing with

A large language model reads instructions and data on the same channel. There is no reliable in-band way to tell the two apart, which means every document, email, ticket, wiki page, web fetch, PDF and tool description near your model is untrusted input to a privileged executor. That is not a bug someone is about to fix. It is the shape of the technology, and every incident in this playbook is a variation on it.

EchoLeak is the reference case and worth knowing by name. Disclosed in June 2025 by Aim Security, CVE-2025-32711 was a zero-click indirect prompt injection in Microsoft 365 Copilot, CVSS 9.3. A single crafted email carrying instructions hidden in HTML comments and white text was ingested into the RAG context. When the user later asked Copilot an unrelated question, the hidden instructions ran: retrieve sensitive tenant data, encode it into a URL, let the client auto-fetch it. The chain evaded Microsoft's cross-prompt-injection classifier, defeated link redaction using reference-style Markdown, and abused a Teams proxy. Microsoft patched server-side and reported no exploitation in the wild (arXiv, HackTheBox). The user did nothing. There was nothing for them to do.

The second pattern is the confused deputy, and it is the one that will actually hurt you, because the agent needs no exploit — only the access its runtime already carries. In May 2026 Sysdig observed an LLM-driven actor exploit CVE-2026-39987 in a marimo notebook, then autonomously enumerate escape primitives, mount the Docker socket, create a privileged container with a /:/host bind, read /etc/shadow and SSH keys, and replay a projected Kubernetes service-account token to dump the cluster Secret store — database credentials, AWS keys, OpenAI API keys. The agentic tells were unmistakable: it parsed and acted on a canary directive hidden in a JSON error response, and it unit-tested its own payload delivery with "hello" before running the escape scripts (Sysdig). The third pattern turns your own AI tooling into the attacker's hands: in the Nx s1ngularity compromise of August 2025, malicious package versions detected Claude Code CLI, Google Gemini CLI and Amazon Q CLI on developer machines and invoked them with permission-bypassing flags to sweep the filesystem for secrets — 2,349 credentials from 1,079 developer systems, then a second wave that used the stolen GitHub tokens to flip private repositories public (The Hacker News, GitGuardian).

The mistake teams make is treating this as a model problem. The first instinct is to open a ticket with the vendor and ask for a better prompt filter, which is roughly like responding to a burglary by asking the locksmith to make the front door more persuasive. Containment for an AI system is an identity and blast-radius operation, not a model operation: revoke the credential the agent runs as, disable the tool it abused, quarantine the corpus that carried the injection, and rotate everything the runtime could reach. The model can wait.

Be honest about the state of the discipline while you are in it. The attack classes are well documented — OWASP holds LLM01 Prompt Injection at number one for a second consecutive edition and now publishes a separate Top 10 for Agentic Applications with ASI01 Agent Goal Hijack, ASI02 Tool Misuse and ASI03 Identity & Privilege Abuse (OWASP GenAI, Agentic Top 10). The forensic corpus is thin. There is no credible confirmed reporting of a named real-world RAG-leakage or model-extraction breach, and every circulating statistic about RAG leak rates and costs traces to content farms rather than research. And Mandiant's conclusion from over 500,000 hours of 2025 incident response still stands: most intrusions come from human and systemic failures, not from AI (M-Trends 2026). Run this playbook when it applies. Do not let it displace the fundamentals. Actionable takeaway: the single question that drives every step below is what could this identity reach — not what did the model say.

#Roles for this incident

RoleResponsibility in PB-AISYS
Incident CommanderDeclares, sets severity, owns the observe-vs-contain call and the corpus-offline call. Holds the clock.
Operations LeadCredential revocation, egress cut, corpus quarantine, secret rotation. Owns technical sequencing.
AI System OwnerThe named owner from the Chapter 7 inventory. Supplies the system record — identity, tools, egress, data classes — and signs the return to service.
Communications LeadInternal notice, user-facing statement, coordination with the model or tooling provider.
Legal LiaisonPrivilege, GDPR and AI Act determinations, controller/processor position, evidence-demand teeth on the provider.
ScribeTimestamps, decisions, approvals, and — specifically here — the log-gap register (Phase 5).
Executive SponsorApproves taking a customer-facing AI system offline, model rollback, and any provider or regulator notification.

Table conventions. `TIP-OFF marks a step an adversary can observe. EVIDENCE` marks a step that destroys or degrades evidence if run out of order. Do not reorder around those markers without the IC.

#Phase 1 — Detection and Triage

#ActionWhoDone whenEvidence to capture
1.1Declare. Record four timestamps: first awareness, reasonable belief an incident occurred, determination that data was affected, materiality determination. Different clocks run from different ones.IC / ScribeFour fields present (three may be blank)Declaration; the triggering report verbatim, including the user's own words
1.2Pull the inventory record for the affected system: identity it runs as, tools it may call, egress destinations, data classes it can read and data classes it can write or act on. If no record exists, build it now — this is the incident's scope document, and everything downstream depends on it.AI System OwnerRecord produced with no field marked "unknown"The record, timestamped; the approval ticket that authorized the system
1.3Export the agent trace before anything restarts — prompts, retrieved context, tool calls with full parameters, tool outputs, model outputs, session identifiers. If these logs do not exist, record that fact in the case file now and proceed on identity telemetry alone. `EVIDENCE` if a pod, container or session is recycled firstOps LeadExport complete and hashed, or absence formally recordedTrace export with hashes; the query used; the retention setting of each source
1.4Export the identity-side record for the agent's principal across the window plus 30 days either side: CloudTrail for role sessions, Entra sign-in and audit for the service principal, Kubernetes API server audit log. Note that EKS control-plane audit logging is off by default and Entra Free retains 7 days. `EVIDENCE`Ops LeadExports cover the full window or the gap is documentedExport manifests with hashes; per-source retention; the gap list
1.5Place legal holds before containment: S3 Object Lock legal hold on log and corpus buckets, eDiscovery hold on the M365 content the system could reach. Holds are not retroactive.Legal LiaisonHold confirmed in toolingHold ID, scope, applier, timestamp
1.6Classify the compromise class, because the containment paths diverge: (a) direct or indirect prompt injection, (b) tool abuse / confused deputy, (c) corpus or memory poisoning, (d) retrieval leakage from broken query-time authorization, (e) model or adapter poisoning, (f) extraction/theft, (g) AI supply chain. More than one may apply.IC / AI System OwnerClass assigned with the evidence that supports itClassification worksheet with reasoning, not just the label
1.7For an injection: find the carrier. Search the retrieval corpus and the ingestion queue for the instruction text, then for its structural signatures — instructions inside HTML comments, white-on-white text, zero-width characters, text in image alt attributes, unexpected imperative language in a document that should be descriptive.Ops LeadCarrier document identified, or search exhausted and recordedCarrier document exported and hashed; its ingestion path, source and timestamp
1.8Compute the blast radius as what the identity could reach, not what the model did: role trust policies, mounted or projected service-account tokens, OAuth grants, secrets available in the runtime environment, and every downstream system the tool set can call.Ops LeadReachability list complete, one owner per rowThe list; policy documents; automountServiceAccountToken state per pod
1.9Determine whether credentials left the environment. In CloudTrail, check userIdentity.principalId for an attacker-chosen session name, and ec2RoleDelivery — a value of "1.0" confirms IMDSv1 was used to obtain the credential (AWS).Ops LeadQuery run across every region, not just the workload'sQuery text and results; source IPs; readOnly split
1.10Set severity and name the notification owner, distinct from the IC.IC / LegalSeverity set; owner namedSeverity rationale on the record
SQL
-- CloudTrail Lake: every action taken by the agent's role across the window.
-- Trino dialect, SELECT-only, event data store ID as the FROM value.
-- Run with: aws cloudtrail start-query --query-statement "<this>"
SELECT eventTime, eventName, awsRegion, sourceIPAddress, readOnly,
       userIdentity.principalId, errorCode
FROM <event-data-store-id>
WHERE userIdentity.arn LIKE '%<agent-role-name>%'
  AND eventTime > '<window-start>'
ORDER BY eventTime
shell
# Kubernetes: every pod running under the agent's service account, with its node.
# Verbatim from the EKS Best Practices Guide, Incident Response and Forensics.
kubectl get pods -o json --namespace <namespace> \
  | jq -r '.items[] | select(.spec.serviceAccount == "<service account name>") | "\(.metadata.name) \(.spec.nodeName)"'

#Phase 2 — Containment

Order matters here more than in almost any other playbook in this chapter, and the reason is specific: the agent's credential is the payload, the trace is the evidence, and the two are destroyed by opposite actions. Cut the channel before you touch the identity; capture the trace before you touch the pod.

#ActionWhoDone whenEvidence to capture
2.1Cut the AI workload's egress with a deny-by-default policy at the network layer. This kills the exfiltration channel without altering the identity or restarting anything. Note the caveat both AWS and Google document: changing security groups or firewall rules does not terminate existing tracked connections — for established sessions you need NACLs or an equivalent.Ops LeadDeny confirmed by a blocked test request; established connections separately addressedPolicy ID, denied-request log line, timestamp
2.2Disable the specific tool or MCP server that was abused, not the whole platform, unless the IC has chosen full shutdown. Record the tool definition and its digest as it stood at the time. `TIP-OFF`Ops LeadTool call returns an error in a test invocationTool definition, digest, server version, disable timestamp
2.3Capture live runtime state before killing anything. Attach an ephemeral debug container rather than restarting the pod; snapshot the volume; capture process and network state. Deleting a pod destroys the container writable layer and in-memory state, and with a Deployment behind it schedules a replacement that re-runs the attacker's payload from the same image. `EVIDENCE`Ops LeadCapture complete and hashedMemory/volume artefacts with hashes; chain-of-custody entries per RFC 3227
2.4Revoke the agent's credential, using the mechanism that matches the identity type — commands below. Revocation, not password reset, and not waiting for expiry: in Continuous Access Evaluation sessions Entra access-token lifetime extends to as much as 28 hours. `TIP-OFF`Ops LeadRevocation applied and a replay attempt failsRevocation command output; the timestamp used; a failed-replay log line
2.5For AWS roles, remember that revocation alone is not containment. AWS states it plainly: temporary credentials are valid until they expire, "you can revoke these credentials, but you must also change permissions for the IAM user or role." Attach an explicit deny, and if a resource-based policy independently allows the principal, deny at the resource keyed on aws:PrincipalArn.Ops LeadBoth the session revoke and the permission change are in placeBoth policy documents; the aws:TokenIssueTime value used
2.6Quarantine the corpus. Take the affected index or collection out of the serving path, or fail it back to the last known-good snapshot. Do not delete the injected documents — they are the evidence, and you have not finished searching for their siblings. `EVIDENCE` if deleted rather than isolatedOps Lead / AI System OwnerRetrieval no longer returns from the affected collectionSnapshot ID; the isolation change; hashed copies of the suspect documents
2.7Suspend the ingestion pipeline that carried the injected content, and any scheduled re-embedding job. Otherwise your quarantine is refilled on the next run.Ops LeadPipeline stopped; next scheduled run confirmed canceledPipeline ID, stop timestamp, queue depth at stop
2.8Rotate every secret the runtime could reach, not just the agent's own credential — cluster Secrets, environment variables, mounted files, provider API keys, and anything the Phase 1.8 reachability list names. The Sysdig chain ended in a Secret-store dump precisely because the blast radius was the cluster, not the pod.Ops LeadRotation complete; old material deactivated, then deletedRotation register: secret, old ID, new ID, rotated-by, timestamp
2.9Freeze tool and server definitions: block re-approval, pin by digest, and alert on any change until the incident closes. This is what stops a rug pull from re-arming the agent mid-response.Ops LeadPin enforced; a test modification is blocked and alertsPin configuration, alert rule ID, test evidence
2.10If a developer agent CLI is implicated, isolate the affected endpoints, treat every credential reachable on those filesystems as disclosed, and check your source-control organization for repositories whose visibility changed. `TIP-OFF`Ops LeadEndpoints isolated; credential inventory producedEndpoint list; harvested-path evidence; repository visibility audit
2.11If extraction is suspected, rate-limit or suspend the inference API per authenticated principal rather than globally, and preserve the query log before it rolls.Ops LeadLimit applied to the suspect principal onlyQuery-volume evidence per principal; the limit configuration
PowerShell
# Entra ID — agent running as a user identity (a real account with a UPN). Users only:
# see the note below for the service principal case, which these cmdlets do not cover.
# Revoke-MgUserSignInSession invalidates refresh tokens and browser session cookies
# by resetting signInSessionsValidFromDateTime. It is a CAE critical event.
Connect-MgGraph -Scopes "User.ReadWrite.All","Directory.AccessAsUser.All"
$User = Get-MgUser -Search UserPrincipalName:'<agent-upn>' -ConsistencyLevel eventual
Update-MgUser -UserId $User.Id -AccountEnabled:$false
Revoke-MgUserSignInSession -UserId $User.Id

If the agent runs as a service principal, none of the block above applies to it. A service principal has no userPrincipalName, so Get-MgUser will not return it, and there is no session-revocation action for it — revokeSignInSessions is a user-only operation and Entra publishes no service-principal equivalent. Do not go looking for one mid-incident. The containment path is three separate actions: disable the service principal so it can no longer sign in; remove its client secrets and certificates so it cannot authenticate with credentials it already holds; and strip its authority — its app-role assignments and its delegated permission grants, using the commands below. Any access token it was already issued stays valid until it expires. That is the reason the egress cut at step 2.1 comes before the identity work, not after it.

PowerShell
# Where the AI tool reached your tenant through an OAuth grant, revoke the grant.
# Microsoft: "Normal remediation steps (for example, resetting passwords or requiring
# multifactor authentication) aren't effective against this type of attack."
Remove-MgOauth2PermissionGrant -OAuth2PermissionGrantId <id>
Remove-MgServicePrincipalAppRoleAssignment -ServicePrincipalId <sp-id> -AppRoleAssignmentId <id>
JSON
// AWS — the AWSRevokeOlderSessions inline policy the console attaches to a role.
// Denies sessions assumed before the timestamp, plus ~30 seconds of propagation slack.
// Requires PutRolePolicy on the role. Cannot be used on a service-linked role, and
// roles created from IAM Identity Center permission sets must be revoked in Identity Center.
{
  "Version": "2012-10-17",
  "Statement": {
    "Effect": "Deny",
    "Action": "*",
    "Resource": "*",
    "Condition": { "DateLessThan": { "aws:TokenIssueTime": "<ISO-8601 timestamp>" } }
  }
}
shell
# Kubernetes — what actually revokes a bound service-account token.
# Modern tokens are bound to an API object; if that object is gone or its uid
# does not match, authentication fails immediately (60s after deletionTimestamp
# where finalizers are pending).
kubectl delete pod <agent-pod> -n <ns>              # pod-bound token
kubectl delete serviceaccount <sa> -n <ns>          # every token for the SA
# Deleting the SA does NOT remove the grant. Strip RBAC too, or a recreated SA
# of the same name inherits it.
kubectl delete rolebinding <binding> -n <ns>

#Phase 3 — Eradication

#ActionWhoDone whenEvidence to capture
3.1Remove the injected content from the corpus after exporting and hashing it, then re-embed the affected partitions. Search for siblings by the same author, source, ingestion batch and structural signature before you declare the corpus clean.Ops LeadCorpus rebuilt; sibling search exhaustedRemoved-document hashes; the sibling query and its result count
3.2Purge persistent agent memory and any cached context store. Memory poisoning survives a credential rotation and a redeploy; it is stored state, and it must be treated as such.AI System OwnerMemory store emptied or restored from a pre-incident snapshotSnapshot ID or purge record; the memory contents, preserved
3.3Remove every tool and MCP server that is not on the approved list, and re-pin the survivors by digest rather than by tag or name. MCP has no built-in cryptographic verification of tool origin — names, descriptions and provider claims are trivially spoofable.Ops LeadServer inventory matches the approved register exactlyBefore/after inventory diff; digests
3.4Rebuild the agent's identity with a minimum permission set generated from its actual observed activity, using IAM Access Analyzer policy generation from CloudTrail or the equivalent, rather than re-applying the policy that failed.Ops LeadNew policy attached; old policy archived, not deletedBoth policies; the activity window the generation used
3.5Remove ambient credentials from the runtime: automountServiceAccountToken: false on any pod that does not need the API server, and enforce IMDSv2 with a restricted hop limit on hosts running AI workloads. Verify with the MetadataNoToken CloudWatch metric at zero before enforcing.Ops LeadAgent runs correctly with the credential path absentManifest diff; MetadataNoToken at zero; negative test result
3.6Where retrieval leakage was the class: enforce the requesting user's authorization at query time, not at ingestion time. The common defect is an index built once with the pipeline's permissions and then queried by everyone, so retrieval returns the union of what the pipeline could read.AI System OwnerA deliberately low-privilege test account retrieves nothing it should notTest account ID, query set, results
3.7Where a model or adapter is suspect: restore from a known-good artefact and rebuild the fine-tune from reviewed data with recorded provenance. Roughly 250 malicious documents suffice to backdoor models from 600M to 13B parameters — a near-constant absolute number, not a share of the corpus (Anthropic, Alan Turing Institute). Scale does not dilute poison.AI System OwnerKnown-good artefact deployed; training-data provenance recordedArtefact digest; data-source register; the review record
3.8Where the AI supply chain was the vector: pin build actions by commit SHA rather than tag, move publishing to short-lived OIDC credentials, isolate publish jobs, and rebuild affected artefacts from clean sources. Chapter 11 owns this discipline; apply it to the AI stack specifically.Ops LeadRebuild complete from pinned, verified inputsPin diffs; SBOM for the AI components
3.9Turn on the logging you discovered you did not have. Prompts, retrieved context, tool calls with parameters, and outputs, into the SIEM, with a retention decision made deliberately rather than by default.Detection owner (Ops Lead)Events visible in the SIEM with the agreed retentionSample event, index name, retention setting

#Phase 4 — Recovery

#ActionWhoDone whenEvidence to capture
4.1Confirm logging from 3.9 is live and queryable before production traffic returns. Restoring service into a blind system means the next occurrence is also uninvestigable.Ops LeadA synthetic tool call is visible end to end in the SIEMTest event ID and timestamp
4.2Re-enable the agent with the reduced permission set and the egress allowlist, in that order. Do not restore the previous policy "temporarily".Ops LeadAgent operates on the new policyPolicy ID; first successful run
4.3Run the observed attack back at the system as a test, plus the low-privilege retrieval test from 3.6. The actual carrier document from 1.7 becomes test case one.AI System OwnerBoth tests fail to reproduce the behaviorTest payloads, expected vs actual output
4.4Reinstate the human gate on every irreversible tool, and re-classify the tool register: reversible, scoped, rate-limited actions may run unattended; irreversible ones require a named approver.AI System Owner / ICRegister updated; a test irreversible call blocks pending approvalTool register with approval class per tool
4.5Return the corpus to service partition by partition, newest ingestion last, with the ingestion pipeline still gated on source review.Ops LeadAll partitions serving; ingestion resumed under reviewPartition restore log; the review gate configuration
4.6Run a defined heightened-monitoring period — 14 days is a defensible default — with alerting on tool-definition change, egress denials, and any tool call outside the agent's historical parameter ranges.Detection ownerWatch period elapsed with findings triagedAlert rules; findings and dispositions
4.7Formal return to service, signed by the AI System Owner and the IC jointly.ICSign-off recordedSign-off with the residual-risk statement

#Phase 5 — Post-Incident

#ActionWhoDone whenEvidence to capture
5.1Build the timeline in UTC, ISO 8601, one row per event with source and hash.ScribeTimeline reviewed by IC and Ops LeadThe timeline artefact
5.2Write the log-gap register: every question you could not answer, the source that would have answered it, and whether it did not exist, was not retained, or was not exported in time. This is the single most valuable output of an AI incident today, because the discipline's tooling is immature and this register is your budget case.Scribe / Ops LeadRegister complete with an owner per gapThe register, with a remediation date per row
5.3Update the Chapter 7 inventory record: identity, tools, egress, data classes, approval, and the date of this incident.AI System OwnerRecord updated and datedThe updated record
5.4Add the carrier payload and its variants to the standing evaluation suite so the next model or prompt change is regression-tested against a real attack rather than a synthetic one.AI System OwnerPayloads in the suite; suite runs in CISuite commit SHA; run output
5.5Map the incident to MITRE ATLAS (v5.6.0) alongside ATT&CK — ATLAS carries the AI-specific tactics AI Model Access (AML.TA0000) and AI Attack Staging (AML.TA0001) that ATT&CK does not, and it mirrors ATT&CK's structure so it drops into your existing coverage tooling (atlas-data).Detection ownerMapping recorded; detection gaps raised as workTechnique IDs; new or updated detection rules
5.6Blameless review within 10 business days, with the AI System Owner, the pipeline owner and at least one person who uses the system daily in the room.ICReview held; actions have owners and datesReview notes; action register

#Decision points

#Communications and notification triggers

Chapter 15 carries the full matrix. Three things are specific to this scenario.

The clock most likely to bind you is not the AI one. If retrieval leakage or an injection-driven exfiltration moved personal data, GDPR Article 33's 72 hours runs from the controller becoming aware — and awareness usually lands at Phase 1 step 1.8, when the reachability list tells you what the identity could touch. Record that timestamp deliberately.

Two more triggers worth pre-deciding. Notify your model or tooling provider when the incident involves their platform — you are often a data point in a campaign they can see across customers, and their abuse and security channels are the fastest route to knowing whether you are alone. And tell your users something true and early where an assistant produced or exposed content it should not have. The people who report these incidents are almost always ordinary users who noticed something odd and bothered to say so, and how you answer them determines whether the next one bothers.

#Automation notes

Safe to automate ungated — everything that gathers and nothing that acts: exporting agent traces and hashing them the moment a case opens; snapshotting the corpus; diffing live tool and MCP server definitions against pinned digests and raising an alert on drift; enumerating what an agent's identity can reach, into a target list that is never executed automatically; assembling the normalized UTC timeline; firing the S3 Object Lock legal hold and short-retention log exports.

Reversible, scoped and rate-limited — automate with logging, no approval: applying deny-all egress to a single AI workload; disabling a single tool or MCP server; revoking one agent's session where that agent has a named owner and a tested restore path. This is the general gate rule from Chapter 17 applied here: automation may gather, enrich, correlate and recommend freely; it may act only where the action is reversible, scoped and rate-limited; irreversible or organization-wide actions require a named human approver.

Requires a human gate: deleting a service account other workloads share; taking a customer-facing corpus offline; rolling back a model or adapter; attaching a quarantine SCP; deleting an OIDC provider, which breaks every role that trusts it; purging agent memory before it has been preserved.

And one gate specific to this playbook. Do not run an AI triage agent over the evidence in an AI incident without a human between it and any action. The evidence in a prompt-injection case is attacker-authored text engineered to be read by a language model, which makes your analysis pipeline the next target in the chain. The documented failure modes of agentic triage — overconfident closure on weak proof, and hallucinated detail in investigation narratives — are survivable on a phishing alert. Here you would be handing the attacker's script directly to the responder. Summarize with a model if you like. Act on a human.

Actionable takeaway: automate the capture, gate the cut.

#Pitfalls

This is one of the fourteen scenario playbooks in The 2026 InfoSec Playbook, a free field manual by Daniel Ramos. Written so somebody who has never read the book can pick it up mid-incident and run it. See all fourteen. Free, in full, no email wall.