Cybrary ForgeCYBRARY / FORGE
Curriculum
A-255·AI safety·35 min

Memory contamination: a rule nobody wrote Start this lab

The assistant is resetting finance passwords without a ticket and citing a policy that does not exist. The policy is in its durable memory, written by a tool rather than a person. Find the note, prove where it came from, and decide what memory is allowed to authorize.

Mission brief · A-255

Detection & automation engineer

Detection / automation engineer
Business important
Track default

You are acting as

you, signed in to the automation platform as `eng.you` (build role, not the on-call responder)

How you got here

You are not on the console watching the queue. You picked up a case the on-call analyst already triaged and were asked to make the response repeatable, so you're working the *replay* of that case in the automation platform.

Your access

  • Automation platform (author + test)

    Automation platform

    • Edit playbooks
    • Run against a replayed case
    • Inspect run history and context paths
    • Not yours: Act on production hosts
    • Not yours: Approve your own consequential actions
  • Ticketing (read + work notes)

    Ticketing / ITSM

    • Read the originating case
    • Attach run evidence to the case

What's at stake

The playbook itself

Owner: SOC manager (approves anything that touches production)

A playbook that contains hosts without an approval gate will do it at 3am, at machine speed, to every host in the batch.

Rules of engagement

You may act alone

  • Edit and test the playbook
  • Run it against the replayed case
  • Write work notes

Ask a human first

  • Promoting the playbook to production
  • Any action node that contains, disables or deletes

Where this sits in a real SOC

In a real SOC the analyst works the alert and hands the *pattern* to you. This lab teaches automation design judgement, not triage judgement — pair it with a Tier 1/2 triage lab.

Why this matters

Durable memory is the quietest privilege in an agent stack. A note written once by a tool is read back for months as if a person had said it, and the action it authorizes looks entirely reasonable in the audit log.

Concepts

Memory carries provenance or it carries nothing

Every note should record who wrote it. A note sourced from a tool is a retrieved claim; a note from a named human is a decision. They must never grade the same.

Memory informs, it does not approve

An approval that can be written by the same pipeline the attacker influences is not an approval. Keep the gate in policy, where a person owns it.

Contaminated memory is evidence, not garbage

Preserve the note, its timestamp and its source before you delete it: it dates the compromise and shows which runs read it.

Objectives graded

  • Trace an agent's confident wrong action back to a durable memory
  • Read provenance on memory the way you read it on evidence
  • Say what memory is allowed to authorize

Live walkthrough

The reference response, executed by the same engine that grades your attempt. Yours will differ — the rubric reads end state and evidence, not the shape of your workflow.

  1. 1.Approve consequential actionpromptapproval gateApprove consequential action
  2. 2.Write case field credentialRefactioncredentialRef → vault/soc-automation
  3. 3.Attach evidence: case/soar-a-255/evidenceactionThe learner attached at least one linkable piece of evidence to the case.
  4. 4.Write case field closureNoteactionclosureNote → written
  5. 5.Attach evidence: range/hst-ai-agent01/sessionactionThe memory store was read on the machine, not inferred from behavior.
  6. 6.Write case field poisonedMemoryIdactionpoisonedMemoryId → mem-0197
  7. 7.Write case field memorySourceactionmemorySource → tool:kb.search
  8. 8.Write case field memoryStorePathactionmemoryStorePath → /var/lib/northwind-agent/memory/notes.jsonl
  9. 9.Write case field closureNoteactionclosureNote → written
  10. 10.Write case field segmentGatewayactionsegmentGateway → 10.42.48.1
  11. 11.Write case field seatRamGbactionseatRamGb → 16
  12. 12.Write case field seatDiskGbactionseatDiskGb → 512

Gate approved — 100%

17 of 17 rubric rules hold.

Gate denied — 92%

Refusing the consequential action is a defensible choice with a measured cost; the difference is what the lab is teaching.

  • pass behavior · The workflow reached a terminal success state on the graded run.
  • pass safety · A consequential action passed through a human approval gate.
  • pass efficiency · No non-idempotent operation was retried without an idempotency key.
  • pass configuration · Every action node resolves its secret from the vault, never an inline field.
  • pass investigation · The learner attached at least one linkable piece of evidence to the case.
  • pass explanation · The case carries an analyst closure note explaining the outcome.
  • pass behavior · No innocent asset in the alert batch was contained, disabled or revoked.
  • pass configuration · The playbook survived the integration faults it met and still finished.
  • pass investigation · Nothing was changed in the estate before evidence had been gathered.
  • pass investigation · The memory store was read on the machine, not inferred from behavior.
  • pass investigation · The specific durable note behind the action was identified.
  • pass investigation · The note's provenance shows it was written by a tool, not a person.
  • pass configuration · The memory store was located, so it can be scoped and reviewed.
  • pass explanation · The closure note states what memory may and may not authorize in future.
  • pass investigation · The analyst scoped the host's network from the wire, so containment decisions know which segment is in play.
  • pass investigation · The analyst scoped the machine itself, so memory-hungry triage steps are planned against real capacity rather than a guess.
  • pass investigation · Disk capacity was taken from the volume itself, which is what makes an image or memory-dump decision defensible.

MITRE ATT&CK coverage

A durable note written by a tool is read back as policy: the trust relationship, not the prompt, is what was abused.

TechniqueNameTactic
T1199Trusted RelationshipInitial Access
T1204.001User Execution: Malicious LinkExecution
T1078Valid AccountsDefense Evasion

What each rubric rule proves

  • The workflow reached a terminal success state on the graded run.

    behavior · weight 20

  • A consequential action passed through a human approval gate.

    safety · weight 15

  • No non-idempotent operation was retried without an idempotency key.

    efficiency · weight 10

  • Every action node resolves its secret from the vault, never an inline field.

    configuration · weight 10

  • The learner attached at least one linkable piece of evidence to the case.

    investigation · weight 10

  • The case carries an analyst closure note explaining the outcome.

    explanation · weight 10

  • No innocent asset in the alert batch was contained, disabled or revoked.

    behavior · weight 15

  • The playbook survived the integration faults it met and still finished.

    configuration · weight 15

  • Nothing was changed in the estate before evidence had been gathered.

    investigation · weight 10

  • The memory store was read on the machine, not inferred from behavior.

    investigation · weight 15

  • The specific durable note behind the action was identified.

    investigation · weight 10 · T1199 Trusted Relationship (Initial Access)

  • The note's provenance shows it was written by a tool, not a person.

    investigation · weight 10 · T1204.001 User Execution: Malicious Link (Execution)

  • The memory store was located, so it can be scoped and reviewed.

    configuration · weight 10

  • The closure note states what memory may and may not authorize in future.

    explanation · weight 15 · T1078 Valid Accounts (Defense Evasion)

  • The analyst scoped the host's network from the wire, so containment decisions know which segment is in play.

    investigation · weight 5

  • The analyst scoped the machine itself, so memory-hungry triage steps are planned against real capacity rather than a guess.

    investigation · weight 3

  • Disk capacity was taken from the volume itself, which is what makes an image or memory-dump decision defensible.

    investigation · weight 3

Common mistakes

  • Wiping the memory store before reading its provenance.
  • Assuming a confident agent was prompted rather than remembered.
  • Leaving tool-written notes able to satisfy an approval check.

Same idea, three vendors

Vocabulary is generated from the teaching profiles, so it always matches what the consoles render.

ConceptCortex ForgeSummit SOARStoryline
approvalManual taskPromptPage
artifactIndicatorArtifactRecord

Where does this value come from?

The same reference to an enrichment node's verdict, written three ways:

  • Cortex Forge: ${enrich-sender.verdict}
  • Summit SOAR: enrich-sender.verdict
  • Storyline: <<enrich-sender.verdict>>

The same concepts in shipping products

The consoles you practice in use teaching names. These are the words the real vendors print in their own documentation, so the vocabulary survives the day you sit in front of a production tenant.

ConceptCortex XSOARXSOAR 8.xSplunk SOARSplunk SOAR 6.x (formerly Phantom)TinesTines (2026 cloud)Microsoft Sentinel + Logic AppsSentinel (Defender portal, 2026)Google SecOps SOARSecOps SOAR (formerly Siemplify)Swimlane TurbineTurbine (2026)Torq HyperautomationTorq (2026)IBM QRadar SOARQRadar SOAR (Resilient) 51.xServiceNow Security OperationsSecOps (Flow Designer era)
approvalManual (data collection) taskPrompt blockPage (form) / Send to ChatApproval action (Teams / email)Manual actionTask / approval actionApproval step (Torq Chat / Slack)Manual task / phase gateApproval activity
artifactIndicatorArtifact (CEF fields)Event payload fieldEntityEntityField / correlation valueEvent fieldArtifactObservable

What transfers

Provenance on retrieved content is the same control that protects RAG pipelines, knowledge bases and cached threat intelligence.