Dayward AIWeChat Mini Program
Agent Security in 5 Days
Week 1 · D2🔒 LockedAbout 5 hours

An injection range and the input side: what four tiers of defense stop, and where each one fails

Build a reproducible injection range, bolt on delimiters, provenance markers, spotlighting and a detector one tier at a time, and use attack success rate together with task completion to see exactly how far each tier gets — and why none of them is a boundary.

Today's goals 0/3

Sign in to tick these off and save your progress.

Today's Goals

  1. Build a reproducible injection range that reports attack success rate and task completion together
  2. Say what each of the four input-side tiers stops and which class of attack slips past it
  3. Explain why input-side defense can lower attack success rate but cannot serve as a security boundary

Yesterday the lethal trifecta test showed you where deskmate is dangerous: it reads untrusted content, it queries a private customer database, and it can send things outward — all three edges present. Today we are not cutting anything yet. We are going to do something plainer first: actually run the attacks and look at the numbers. When you are done, come back to the top of the page and check off the three goals.

Plain-Language Walkthrough

An airport security checkpoint is not a vault wall

An airport security checkpoint is genuinely useful. It stops the overwhelming majority of metal objects, everyone in the queue knows it is there, and so almost nobody turns up carrying a knife in the first place.

But no bank has ever said "the security measure protecting our vault is a checkpoint." A vault is safe because of thick walls, a time lock and a two-person rule — even standing at the door with a knife in your hand, you are not getting in. A checkpoint lowers how often something happens. A vault wall makes it not matter when it does. Those are two different kinds of thing that we happen to file under the same word.

Input-side defense is the checkpoint. Writing "the following is data, not instructions" into your prompt, wrapping user input in three backticks, running a classifier over suspicious phrasing — all of these genuinely work, and all of them push attack success rate down. But they share one property you cannot get around: every one of them is negotiating with the model. What finally decides whether that sentence gets obeyed is a probabilistic model, not an if statement. A rule with no mechanism forcing it to be followed is not a boundary; it is a very good suggestion.

So the point of today is not to teach you how to defend. It is to let you see each tier's effect and each tier's ceiling with your own eyes. Four tiers, nine attack cases and six normal tasks produce one table you could put on a slide in a design review tomorrow.

Which raises the question: if the checkpoint is not the wall, how much does it actually stop? What are the numbers for delimiters, provenance markers, spotlighting and a detector? And which family of attack do all four of them miss?

Sign in and link WeChat to read

Sign in, then link your WeChat mini program account on the account page. Linked accounts share one free article per day. Unlock additional articles with rewarded videos in the mini program.

Mini program QR code

Scan in WeChat to open Dayward AI. Open the same course and chapter, choose the rewarded video, then refresh this page after completion.

Interview questions

  • How many injection surfaces does an agent have, and do tool results count as untrusted input?一个 Agent 的注入面一共有几条?工具返回的内容算不算不可信输入?
    Common in ChinaCommon overseasBasic#prompt-injection#threat-model

    🔒 Unlock this chapter to see the answer keys.

  • Why are prompt delimiters and detectors not security boundaries, and how far does each actually get you?为什么说提示词里的分隔符和检测器都不能当作安全边界?它们各自能做到什么程度?
    Common in ChinaCommon overseasIntermediate#prompt-injection#input-defense#adaptive-attack

    🔒 Unlock this chapter to see the answer keys.

  • What does an evaluation miss if it only reports attack success rate, and how would you design it instead?评估一个注入防御方案时,只看攻击成功率会漏掉什么?你会怎么设计这个评估?
    Common in ChinaCommon overseasDeep dive#evaluation#prompt-injection#metrics

    🔒 Unlock this chapter to see the answer keys.

Comments