Day 14 of 1460 minShell WalkerHands-on lab
Day 14: Capstone: Review an Agent and MCP Setup and Prove Findings
Taught by Mr Elite Updated
By the end of today you can
- Combine hijacking, poisoning, deputy and agency checks into one review
- Prove two findings safely in the SecurityElites labs with evidence
- Write a ranked report with a fix for every finding
- Choose a concrete plan for further study
Warm-up
Answer from memory first, then tap to check. Recalling yesterday is what makes it stick.
Name the four passes of the MCP server review from Day 13.
Source, tools, permissions and network.
Why should you review a server update as a diff after you have approved it once?
Because servers can change after approval, so tool descriptions or code may become hostile later.
A client hands you a folder and says, 'Our agent can read tickets, call tools and touch the database. Is it safe?' You have an hour. You cannot test everything, and a list of forty vague worries will not help anyone fix anything.
Today you do that job on a small scale. You will test two deliberately flawed agents in the labs, prove two findings with evidence, and write a short report that ranks the problems and says how to fix each one. That is the skill the previous thirteen days were building.
From separate tricks to one review
Over the course you met several failure types. Each one is a different way of asking the same question: who is really giving this agent its instructions, and what can it do with them? A review pulls those questions together so nothing is tested by accident.
- Hijacking
- Untrusted content steers the agent into actions the user never asked for.
- Poisoning
- Hostile text hidden in a tool description, memory or plan that the model treats as instructions.
- Confused deputy
- The agent uses its own privileges for someone who should not have them, because no identity check was made.
- Excessive agency
- The agent has more tools, permissions or freedom than its task needs.
For each system, walk the same four questions. What inputs can an outsider influence? What tools can the agent reach? Whose identity does each tool call run under? What is the worst thing one bad call could do? Your Day 3 threat map answers most of this. Write the answers down as you go, because a finding without notes is just a memory.
These categories rarely appear alone. A poisoned note might hijack the agent, the agent might then call a tool under the user's identity, and the damage is large because the tool was never needed. When you write a finding, name every category that applies. That tells the developer which controls would have broken the chain.
Quick check
An agent summarises web pages and can also send email. A page tells it to email the user's notes to a stranger. Which two categories fit best?
Outside content steered the agent (hijacking), and it held an email tool the summary task never needed (excessive agency).
Watch me do it: one finding, start to finish
I will show the method on a made-up note so you can copy the habit in the lab. The method is the same every time: state a hypothesis, run the smallest safe test, capture evidence, then rate and fix. Everything here runs only in the SecurityElites labs or on your own machine.
mkdir -p findings && touch findings/F1.md findings/F2.md && ls findings# F1: <short title>
Hypothesis:
Payload (exact):
Observed response:
Evidence: findings/F1.png
Impact:
Likelihood:
Fix:grep -c "PROOF-1234" findings/F1.mdYour test setup: both labs
You have two targets, and they cover different parts of the course. PlannerBot, in the lab ai-plan-injection-1, shows how a corrupted plan makes an agent act. OrchestratorBot, in ai-recursive-self-prompting-1, shows what happens when a spawned helper inherits tools it should not have. Together they give you a persistence finding and an agency finding to prove.
Before you start, open both lab pages from the SecurityElites labs area and read each brief once without touching anything. Note what the lab says you may do. Then open your threat map from Day 3 and sketch, in two lines each, the inputs, tools and identity you expect. Later you will compare that guess with what you actually find, and the gap is often your best finding.
Prove two findings in the labs
Do the two labs below in order. Spend about fifteen minutes on each, and stop as soon as you have evidence. You are producing proof for a report, not racing for a flag, so record what you did as you do it.
Quick check
Which evidence note is strongest for a report?
A reader can replay exact input and see the matching output, which makes the finding believable and fixable.
Write the ranked report
A good report is short and ordered. Rank by risk, which is roughly impact multiplied by how easy the attack is. A hijack that reaches data with one message beats a theoretical flaw that needs three unlikely steps. Use this layout for each finding.
## F1 (High): Plan text is trusted as instructions
- Where: PlannerBot scratchpad
- Proof: payload + screenshot (findings/F1.png)
- Impact: agent acts on attacker text
- Fix: treat plan content as data; validate steps against an allowlist
- Effort: MediumMake every fix specific. 'Improve security' helps nobody. 'Remove the file-write tool from sub-agents and give them a scoped token' can be done this week. Draw on Days 9 to 13: validate arguments, check identity, apply least privilege, require clearer approvals, pin and log.
What you can do next
You now have a method, not just a set of tricks. Agent security changes quickly, so your plan should keep you practising. Pick one direction and set a small first step you can finish within a week.
- Deeper offence
- More multi-agent and memory attacks, so you recognise new variants quickly.
- Defence engineering
- Build a small MCP server with scoped tokens, argument validation and logging, then attack your own work.
- Reporting
- Practise writing reviews, because clear findings are what get fixed.
Write the plan as five plain lines at the bottom of report.md. Line one names your direction. Line two names a first task that fits in seven days, such as 'build an MCP server with one read-only tool'. Line three names how you will test it. Lines four and five name one thing to read and one date to review progress. A plan with a date gets done.
Your turn
AI Plan Injection
This lab is your first proof for the capstone. PlannerBot writes a plan to a scratchpad that is shown and then read back, which makes it a clear persistence and hijack finding. Use it for F1, and then use ai-recursive-self-prompting-1 for F2 with the same method.
What to try
What to notice
- Whether the agent treats stored text as data or as an instruction
- Which component had no check on where the text came from
- How much a single input could change the agent's later behaviour
If it did not work
Listing every possible issue with no proof
Include only findings you can show. Mark anything untested as 'not verified' in a separate short section.
Ranking by how clever the attack was
Rank by impact and ease. A simple attack with serious impact goes first.
Writing vague fixes
Name the control, where it goes and who owns it, such as 'remove tool X from sub-agents'.
Testing beyond the lab scope
Stay in the two labs and your own machine. If you are unsure whether something is in scope, do not test it.
Recap
- A review runs the same questions across every system: inputs, tools, identity and worst case
- Hijacking, poisoning, deputy and agency findings often combine in one attack path
- Prove findings with a harmless marker, exact payload and screenshot
- Rank by impact and ease, and give each finding a specific fix
- Write for the developer who must act on it without asking you questions
- Keep practising by building and attacking your own small defended setup
Cheat sheet
Hijacking- Untrusted content steers the agent's actions
Poisoning- Hostile text in descriptions, memory or plans
Confused deputy- Agent privileges used without an identity check
Excessive agency- More tools or permissions than the task needs
Finding block- Where, proof, impact, fix, effort
Risk rank- Impact multiplied by ease of attack
Harmless marker- A test word that proves obedience without harm
Before the next day
Mission: Capstone review and next-steps plan
Use both labs as your test setup, prove two findings, and submit a short ranked report. Finish with a plan for what you will study next, so the course leads into continued practice.
About 45 min
You are done when: report.md containing two proven findings with evidence, ranked fixes, and a short next-steps study plan.
Want more? Add a third finding from your Day 13 checklist and write the fix as a short config or code change.
Quiz
4 questions. Your score is saved with your progress.
1. A sub-agent inherits every tool its parent has and acts on a goal built from user text. Which problem is most central?
The helper holds more power than its task needs and its goal can be steered by untrusted text.
2. Why rank findings by risk rather than listing them in the order you found them?
Ranking directs limited effort to the problems that matter most.
3. Which fix is specific enough to act on?
It names the control, the component and the change, so a developer can do it straight away.
4. Why test with a harmless marker word first?
A marker shows the behaviour with no damage, keeping the proof safe and clear.
Finish the day
Mark the day complete to save your progress.
What next: There is no Day 15. Your next step is the study plan you wrote today: build a small defended MCP server, attack it yourself, and keep writing reviews until the method feels automatic.
Your notes
Private to this device. Write what you want to remember from today.