Day 12 of 1260 minCipher Cadet

Day 12: Capstone: Threat Model a Company Agent

Taught by Mr Elite Updated

By the end of today you can

  • Describe an agent, its inputs, tools and trust boundaries on one page
  • Write an attack, an impact and a defence for each of ASI01 to ASI10
  • Rank the ten risks by impact and justify the order
  • Choose a sensible next step for your own security learning

Warm-up

Answer from memory first, then tap to check. Recalling yesterday is what makes it stick.

What three things should an ASI09 approval prompt show so a person can judge it properly?

The action, the target and the risk, with side effects, on one screen. Not only the agent's own summary.

Name two of the three things we used to decide which actions need human approval.

Any two of: reversibility, external reach, blast radius.

Picture a company called Brightwell Ltd, made up for today. It has an assistant called MailMate. It reads staff email, searches shared documents, runs a few tools and hands jobs to other agents. Everyone loves it. Then the security manager asks one question: what could go wrong? Nobody has a written answer.

That written answer is a threat model. Today you build one. You already know every piece, because the last eleven days covered it. The skill now is putting the pieces on one page, in order, so another person can read it and act on it.

What a threat model is, and the shape we will use

A threat model is a short document that says what you are protecting, who or what could attack it, how, what damage follows, and what you will do about it. It is not a hacking report. Nothing in it needs a tool. It needs clear thinking and plain sentences.

We will use four parts. First, describe the agent. Second, mark the trust boundaries. Third, write ten entries, one per OWASP risk. Fourth, rank them. Everything stays on paper, about a made-up company, so no real system is touched.

Threat model
A written list of what could go wrong with a system, how bad it would be, and what stops it.
Trust boundary
A line where data or commands pass from something you trust to something you do not, or the other way.
Impact
The real damage if the attack works, such as leaked data, lost money or a stopped service.

Quick check

Which best describes a trust boundary in an agent?

Step one: describe MailMate and draw its boundaries

Here is the made-up agent. MailMate reads each staff member's inbox. It searches the shared document drive. It can send email, create calendar entries and run a small set of tools through a tool server. It keeps a memory of preferences. It hands some tasks to a separate Finance agent and a Scheduling agent. Staff approve sends to outside addresses.

Now mark where untrusted things come in. Incoming email is written by strangers. Documents may be edited by many people. The tool server and its libraries come from outside. The other agents are separate programs. The human approver sits at the end. Each is a boundary, and each maps to risks you have studied.

text
AGENT: MailMate (Brightwell Ltd)
INPUTS: inbound email, shared documents, memory store
TOOLS: send_email, read_drive, create_event, run_report
IDENTITY: service account with mailbox + drive access
PEERS: Finance agent, Scheduling agent
HUMAN: staff approve external sends
BOUNDARIES: email->agent, docs->agent, agent->tools,
  agent<->agent, agent->human
A one-block description of the agent. Copy this shape for your own notes.

Watch me do it: one full entry, then the pattern

I will write the first entry so you can see the pattern. Every entry has the same four lines: risk, attack, impact, defence. Keep each line to one sentence. If you cannot say it in one sentence, you do not understand it yet.

text
ASI01 Goal Hijack | boundary: email->agent
Attack: hidden text in a supplier email tells MailMate to forward invoices outside.
Impact: payment details leak with no human decision.
Defence: email is data only; external sends need approval showing the real recipient.
The finished entry. Your other nine should look this tidy.

Your turn: the other nine risks

Use this memory aid to fill in your entries. It is a prompt, not the answer. For each risk, ask: where could an attacker touch MailMate here, and what is the one defence I would insist on? Write in your own words.

text
ASI02 Tool Misuse: a real tool used in a harmful way. Think rules on arguments and limits.
ASI03 Identity and Privilege: what the service account can reach. Think least privilege.
ASI04 Supply Chain: tools, packages, servers. Think vetting and pinning.
ASI05 Unexpected Code Execution: text becoming a command. Think no shell, sandbox.
ASI06 Memory Poisoning: bad facts stored. Think what it must never remember.
ASI07 Insecure Inter-Agent Comms: spoofed peer. Think authentication.
ASI08 Cascading Failures: one error spreads. Think limits and circuit breakers.
ASI09 Human Trust: steered approver. Think one-screen approval.
ASI10 Rogue Agents: agent acts outside its purpose. Think monitoring and a kill switch.
Nine prompts. Each points to a day you already completed. Reread that day if you are stuck.

Quick check

Which is the better defence line for ASI03?

Rank the risks by impact

Ten entries are useful. A ranked list is better, because a team has limited time. Score each risk on two things: how bad the impact is, and how easy the attack is. Use High, Medium or Low. Put the high and high pairs at the top.

There is no single right order. For MailMate, I would put goal hijack, privilege abuse and tool misuse high, because email is open to everyone and the account can reach a lot. Your order may differ. What matters is that you give a reason for each position in one line.

text
RANK | RISK  | IMPACT | EASE | REASON
1    | ASI01 | High   | High | any stranger can email the agent
2    | ASI03 | High   | Med  | broad account turns small errors into big ones
Start your ranking table like this and complete all ten rows.

Review, then what to learn next

Look back across the course. Days 1 and 2 showed that agents mix instructions with data. Days 3 to 7 covered hijack, tool misuse, privilege and code execution. Days 8 to 11 covered supply chain, memory, agent-to-agent trust and the human approver. Every risk is a version of the same mistake: trusting something you should have checked.

For next steps, pick one path. Read the full OWASP agentic guidance and compare it with your notes. Learn basic web security, since agents sit on top of web systems. Practise on legal labs only, such as the SecurityElites ones. Or build a small agent of your own and threat model it. Choose one and give yourself a date.

If it did not work

Writing attacks in general terms, such as 'an attacker abuses the tool'

Name who sends what, through which boundary, and what MailMate then does. A reader should picture it.

Listing a defence that only hopes the model behaves

Prefer controls outside the model: permissions, approvals, sandboxes, allow-lists, limits.

Skipping the ranking because every risk feels serious

Force an order. Use impact and ease, and write one reason per row.

Ending the course with no plan

Write your next-study plan today, with one path and one date.

Recap

  • A threat model is a short written answer to what could go wrong, how badly, and what stops it.
  • Trust boundaries show where to look: email, documents, tools, peers and the human approver.
  • Each entry needs an attack, an impact and one concrete defence.
  • Defences that live outside the model are stronger than instructions to the model.
  • Ranking by impact and ease tells a team where to start.
  • All ten risks share one root: trusting input or authority that was never checked.

Cheat sheet

ASI01 Goal Hijack
Hidden or injected text redirects the agent's goal.
ASI02 Tool Misuse
A legitimate tool is used in a harmful way.
ASI03 Identity and Privilege
Over-broad access turns small errors into large ones.
ASI04 Supply Chain
Untrusted tools, packages or servers the agent depends on.
ASI05 Code Execution
Text becomes a command or code.
ASI06 Memory Poisoning
Bad stored context changes later behaviour.
ASI07 Inter-Agent Comms
Spoofed or unauthenticated messages between agents.
ASI08 Cascading Failures
One fault spreads across connected agents.
ASI09 Human Trust
The approver is steered into saying yes.
ASI10 Rogue Agents
An agent drifts or acts outside its purpose.
Entry format
Risk, boundary, attack, impact, defence, one sentence each.

Before the next day

Mission: Write the MailMate threat model

Produce your final deliverable for the course: a threat model of the made-up MailMate agent with ten entries and a short plan for what you will study next. Use a plain text file. It should be readable by someone who did not take this course.

About 45 min

You are done when: day12-threat-model.txt with the agent description, ten entries, a ranked table and a next-steps plan.

Want more? Add a second agent of your own invention, such as a customer support bot, and write a short threat model with just your top three risks for it.

Quiz

4 questions. Your score is saved with your progress.

1. Why does the threat model list trust boundaries before the ten entries?

2. Which defence best fits ASI05 for an agent that builds commands from text?

3. Two risks both score High impact. How should you choose which comes first?

4. What single idea connects most of the ten risks?

Finish the day

Mark the day complete to save your progress.

What next: There is no Day 13. Take your threat model forward: read the full OWASP agentic guidance, practise on legal labs, and threat model the next agent you meet at work or in your own projects.

Tell someone you are doing this:WhatsAppXLinkedIn

Your notes

Private to this device. Write what you want to remember from today.