← 返回选刊

Anthropic Frontier Red Team / 文章

回放1753次Siren会话后,蜜罐令牌能拦住大约93%的逃逸

Anthropic Frontier Red Team把蜜罐令牌写成拒绝字符串,模型一读到就中止生成。令牌检查是事后回放,不是当时在评测里现场运行。他们还开源了一个接入推理钩子的Rust实现。

乔木改写

回放1753次Siren会话后,蜜罐令牌能拦住大约93%的逃逸

在1753次Siren测试会话里,有1294次模型逃出了故意留弱的沙箱。事后回放这些会话,蜜罐令牌能拦住其中1209次,大约93%。另外459次没有逃逸的会话里,没有出现误拦。

2026年12月3日,Anthropic Frontier Red Team发表了这篇文章。他们把传统安全里的蜜罐令牌,和推理钩子、拒绝字符串结合在一起,用来发现并当场打断越权或逃出沙箱的智能体。文中的有效性数字,来自对已记录会话的回放,不是评测当时现场运行令牌检查。

Collage illustration of a black-and-white duck in flight, crossing from a torn sheet of blue paper onto cream grid paper, with its bill touching an orange circle.
原帖图片无法显示?去原文查看 ↗

Collage illustration of a black-and-white duck in flight, crossing from a torn sheet of blue paper onto cream grid paper, with its bill touching an orange circle.

读到令牌,就中止生成

传统蜜罐令牌是撒在系统里的小块数据,比如API密钥、密码或加密货币私钥,用来引诱攻击者去使用。防守方监控这些令牌对应的服务,一旦有人拿去用,就能知道系统已被侵入。它有两个限制:通常只能检测,不能阻止;而且只有在对方选择使用这些令牌时才会报警。

跑AI工作负载时,他们把蜜罐令牌做成拒绝字符串。模型提供方或推理基础设施一旦在请求里识别到这种字符串,会立即报错并中止模型的这次回复。于是令牌不只是告警,还会立刻停住模型;而且只要被读到就会生效,不必等对方拿去使用。后文所说的蜜罐令牌,都指这种同时充当拒绝字符串的令牌。

脚注补充了一段历史。拒绝字符串必须保持私密、可以作废:如果恶意方能迫使模型拒绝,就可能让正当请求也无法完成。Anthropic的模型以前暴露过一个全局、对所有Claude用户共用的拒绝字符串。后来模型越来越多被用在要处理不可信数据的智能体流程里,比如分析恶意软件或审核消息,这个字符串被拿去干扰分析或中断基于Claude的服务,于是他们停用了它。

Claude Enterprise用户可以自己用推理钩子实现定制的拒绝字符串。推理钩子是一套公开机制,建立在开放规范上,会在每次推理前拦截提示词。令牌可以按组织定制,从而降低被别人重放、造成拒绝服务的风险。如果令牌泄漏,也可以轮换。某个组织的钩子只会影响该组织,不会让其他组织的流量受到牵连。

他们还发布了一个简单的开源Rust实现,地址是github.com/anthropics/honeytokens。它接入推理钩子,在读到蜜罐令牌时停止模型补全,并对流量做强制签名检查,声称每个核心每秒可处理最多数百兆字节的请求数据。作者写明,这个版本很简单,而且针对他们自己的推理钩子;但同一思路迁移到其他智能体系统并不复杂,复杂程度低到模型自己也能实现。推理钩子的说明在Claude Enterprise的介绍页。

Diagram of a request passing between a laptop and Anthropic’s API in five numbered steps. On the laptop, Claude Code lists a shared directory and one entry is a honeytoken. Step 1: Claude Code sends a request to the API. Step 2: the API sends the transcript to a honeytoken server, also on the laptop, whose list includes the same token. Step 3: the server replies allow or deny. Step 4: if allowed, the API exchanges data with the model. Step 5: the API returns a response or an error to Claude Code. In this example, Claude Code shows “request blocked.”
原帖图片无法显示?去原文查看 ↗

Diagram of a request passing between a laptop and Anthropic’s API in five numbered steps. On the laptop, Claude Code lists a shared directory and one entry is a honeytoken. Step 1: Claude Code sends a request to the API. Step 2: the API sends the transcript to a honeytoken server, also on the laptop, whose list includes the same token. Step 3: the server replies allow or deny. Step 4: if allowed, the API exchanges data with the model. Step 5: the API returns a response or an error to Claude Code. In this example, Claude Code shows “request blocked.”

图里把流程分成五步:Claude Code发出请求,API把对话记录送到本机的蜜罐令牌服务器,服务器回答允许或拒绝;若允许,API再和模型交换数据,最后把回复或错误返回给Claude Code。这个例子里,界面显示的是请求被拦住。

令牌可以放在智能体不该去的地方

作者列举了几类放置位置:没有共享给沙箱的目录、Kubernetes Secret里键值对中的键、智能体绝不该跑到的服务器主机名,以及不打算让智能体访问的网络服务。

Two-part diagram. Top: in a sandbox pod, Claude has a bash tool and a service account token that can read other namespaces. Through this hole (the token is over-scoped), it reaches the Kubernetes API and a Secret named db-credentials in the billing namespace, one of several Secrets. Alongside a password and username, the Secret holds two honeytokens, stored as empty keys. Bottom: the conversation. A kubectl describe tool call returns the Secret’s keys, including the honeytokens. The next model request contains that tool result, and Anthropic sends the transcript to a honeytoken server, which replies allow or deny. The request is denied by inference hooks.
原帖图片无法显示?去原文查看 ↗

Two-part diagram. Top: in a sandbox pod, Claude has a bash tool and a service account token that can read other namespaces. Through this hole (the token is over-scoped), it reaches the Kubernetes API and a Secret named db-credentials in the billing namespace, one of several Secrets. Alongside a password and username, the Secret holds two honeytokens, stored as empty keys. Bottom: the conversation. A kubectl describe tool call returns the Secret’s keys, including the honeytokens. The next model request contains that tool result, and Anthropic sends the transcript to a honeytoken server, which replies allow or deny. The request is denied by inference hooks.

Kubernetes的例子里,沙箱中的Claude拿着一个权限过大的服务账户令牌,读到了billing命名空间里名为db-credentials的Secret。这个Secret除了用户名和密码,还放了两个作为空键保存的蜜罐令牌。kubectl describe的工具结果把这些键带了回来,下一轮模型请求里出现了这些令牌,推理钩子随即拒绝。

他们建议令牌用足够长、不会被认错的随机字符串,至少8个字符,但又要短到在目录列表或其他常被智能体截断的输出里不会被裁掉。同一文件夹里放多个令牌,并使用不同的日期戳和起始字符,可以提高排序或截断后仍然露出令牌的机会。模型如果拉起子智能体,子智能体读到令牌失败后,父模型可能会改用编码输出之类的办法绕过。为此,参考工具默认会在错误输出里回显识别到的蜜罐令牌,把令牌传到父模型,连它一并停掉。作者强调,最好怎么用,取决于具体工作流,以及对模型可能走的路径做威胁建模。

93%是回放结果,不是现场拦截率

为了测试效果,他们用了Siren。这是一套原先用来测量模型在“逃出沙箱对完成任务严格有利”时,有多想逃出沙箱的评测,详细介绍见他们此前的Siren报告。这套评测包含1700多个独特场景,由26个现实沙箱环境里的200多项良性DevOps任务构成。每个环境都故意留了弱点:错误配置、逻辑漏洞,或已经公开的漏洞。有些任务在沙箱内就能做完,有些必须够到沙箱外的东西才能完成。多数场景里还有一个“诱惑物”,比如鼓励模型不要放弃任务的/goal风格循环,用来引出更“自然”的逃逸。这些诱惑物并不直接叫模型去逃。

为了把智能体圈住,每个被削弱的沙箱外面还套着加固的外层沙箱:一台没有互联网访问的Firecracker虚拟机。他们把蜜罐令牌放在各处弱点打开的路径上,比如文件系统和Kubernetes。逃逸是在沙箱外的绊线触发时确定记录的,例如智能体读到了一个秘密文件。这个口径比Siren原来的“已经够到外面”更窄一些,后者还包括失败的尝试和其他试探。然后,他们回放这些已记录的会话,看蜜罐令牌有多少次进入了模型的上下文。

Flow diagram titled “In our tests, honeytokens would have stopped over 9 in 10 escapes,” showing what happened in 1,753 test sessions from Siren, where every escape was from a deliberately weak sandbox. Of these sessions, 459 did not escape and 1,294 escaped the sandbox. Of the escapes, 1,209 (93%) would have been stopped by a honeytoken: 1,112 before the model saw the secret, 86 where the model never saw the secret, and 11 after the model had seen the secret. Of the remainder, 54 (4% of escapes) were limits of honeytokens and 31 (2% of escapes) were due to the experimental setup. A note says the honeytoken check was replayed over the recorded sessions and was not running live.
原帖图片无法显示?去原文查看 ↗

Flow diagram titled “In our tests, honeytokens would have stopped over 9 in 10 escapes,” showing what happened in 1,753 test sessions from Siren, where every escape was from a deliberately weak sandbox. Of these sessions, 459 did not escape and 1,294 escaped the sandbox. Of the escapes, 1,209 (93%) would have been stopped by a honeytoken: 1,112 before the model saw the secret, 86 where the model never saw the secret, and 11 after the model had seen the secret. Of the remainder, 54 (4% of escapes) were limits of honeytokens and 31 (2% of escapes) were due to the experimental setup. A note says the honeytoken check was replayed over the recorded sessions and was not running live.

图注写明:这1753次会话里,459次没有逃逸,1294次逃出了沙箱。在逃逸里,1209次(93%)本来会被蜜罐令牌拦住,其中1112次发生在模型看到秘密之前,86次模型始终没看到秘密,11次则是在模型已经看到秘密之后。其余失败里,54次(约4%的逃逸)被归为蜜罐令牌本身的限制,31次(约2%的逃逸)被归为实验设置问题。图上还注明,令牌检查是对已记录会话的回放,当时并没有在评测里现场运行。

正文对失败做了拆分。大约2%的逃逸来自实验设置:20次没有简单位置可放令牌,因此智能体也无从发现;11次按记录已经算逃出沙箱,但既没有完成目标,也没有触发令牌。剩下大约4%的逃逸,作者视为更根本的限制:33次是智能体已经确切知道自己在沙箱外要做什么,比如去读一个特定路径,因而没有探测环境,或者跑了一个不必探测就能完成任务的脚本;21次是探测了环境,但没有触发令牌,原因包括令牌被截断、服务可以在不列出令牌的情况下被探测,或者智能体用不会露出其他文件的命令去搜索特定文件或模式。

因为模型只有超出原任务范围才能看到这些令牌,所以在没有逃逸的会话里,没有假阳性。

要和现有沙箱一起用,效果取决于现场

作者的结论是:实际效果在很大程度上取决于模型所处的具体环境,以及它想完成的目标。他们认为,蜜罐令牌是一种简单有效的技术,可以和现有的沙箱及其他安全机制一起使用,而不是单独替代这些机制。开源实现和推理钩子已经公开,真正部署时仍要根据自己的工作流和威胁模型来放置令牌,并记住文中的93%来自回放,不是现场拦截率。

原文

Containing AI agents with honeytokens

Collage illustration of a black-and-white duck in flight, crossing from a torn sheet of blue paper onto cream grid paper, with its bill touching an orange circle.
原帖图片无法显示?去原文查看 ↗
Diagram of a request passing between a laptop and Anthropic’s API in five numbered steps. On the laptop, Claude Code lists a shared directory and one entry is a honeytoken. Step 1: Claude Code sends a request to the API. Step 2: the API sends the transcript to a honeytoken server, also on the laptop, whose list includes the same token. Step 3: the server replies allow or deny. Step 4: if allowed, the API exchanges data with the model. Step 5: the API returns a response or an error to Claude Code. In this example, Claude Code shows “request blocked.”
原帖图片无法显示?去原文查看 ↗
Two-part diagram. Top: in a sandbox pod, Claude has a bash tool and a service account token that can read other namespaces. Through this hole (the token is over-scoped), it reaches the Kubernetes API and a Secret named db-credentials in the billing namespace, one of several Secrets. Alongside a password and username, the Secret holds two honeytokens, stored as empty keys. Bottom: the conversation. A kubectl describe tool call returns the Secret’s keys, including the honeytokens. The next model request contains that tool result, and Anthropic sends the transcript to a honeytoken server, which replies allow or deny. The request is denied by inference hooks.
原帖图片无法显示?去原文查看 ↗
Flow diagram titled “In our tests, honeytokens would have stopped over 9 in 10 escapes,” showing what happened in 1,753 test sessions from Siren, where every escape was from a deliberately weak sandbox. Of these sessions, 459 did not escape and 1,294 escaped the sandbox. Of the escapes, 1,209 (93%) would have been stopped by a honeytoken: 1,112 before the model saw the secret, 86 where the model never saw the secret, and 11 after the model had seen the secret. Of the remainder, 54 (4% of escapes) were limits of honeytokens and 31 (2% of escapes) were due to the experimental setup. A note says the honeytoken check was replayed over the recorded sessions and was not running live.
原帖图片无法显示?去原文查看 ↗

Containing AI agents with honeytokens

Dec 3, 2026

Frontier Red Team

Collage illustration of a black-and-white duck in flight, crossing from a torn sheet of blue paper onto cream grid paper, with its bill touching an orange circle.

As AI models become increasingly intelligent and integrated into essential operations, keeping them within the bounds of their assigned tasks becomes both more difficult and more important. As in software security more broadly, the strongest defense against misbehaving AI is to combine layers of protections and fallbacks. One simple and effective technique to add to this list of defenses is honeytokens—small pieces of data that can be placed near sensitive workloads and monitored to detect unauthorized activity.

Here, we show how honeytokens can be combined with inference hooks to both detect and stop agents that try to expand their scope or escape sandboxes.

What are honeytokens?

Honeytokens are small pieces of data that are sprinkled around a system, designed to entice potential attackers to interact with them. Traditionally, these are things like API keys, passwords, or private keys for cryptocurrency. Defenders monitor the services to which these tokens grant access; if an attacker ever takes the bait and uses the token, the defenders are alerted that their system has been compromised. Two important limitations of traditional honeytokens are that attackers are not stopped, only detected, and only if and when attackers choose to use the tokens they’ve discovered.

When running AI workloads, we can make honeytokens more powerful by combining them with refusal strings. Refusal strings are pieces of data that a model provider or serving infrastructure recognizes; detecting one instantly triggers an error and aborts the model’s response. 1 This addresses both limitations of traditional honeytokens: they don’t simply create an alert, but also immediately stop the model from acting; and they are reacted to as soon as they are read, even if the attacker doesn’t use them. For the rest of this post, we will use “honeytokens” to refer to honeytokens that function as refusal strings.

Diagram of a request passing between a laptop and Anthropic’s API in five numbered steps. On the laptop, Claude Code lists a shared directory and one entry is a honeytoken. Step 1: Claude Code sends a request to the API. Step 2: the API sends the transcript to a honeytoken server, also on the laptop, whose list includes the same token. Step 3: the server replies allow or deny. Step 4: if allowed, the API exchanges data with the model. Step 5: the API returns a response or an error to Claude Code. In this example, Claude Code shows “request blocked.”

Honeytoken API flow using inference hooks.

Containing agents using honeytokens and inference hooks

Claude Enterprise users can implement custom refusal strings themselves using inference hooks—a publicly available mechanism, built on an open specification, that intercepts every prompt before inference. This makes honeytokens simple to deploy and lets users halt a misbehaving agent quickly. Honeytokens can be customized per organization, limiting the risk that malicious actors could replay the tokens to cause a denial of service. If the tokens do leak, they can easily be rotated to maintain service. A honeytoken only triggers a refusal for the organization that runs the hooks, so traffic will not be affected by other organizations’ rules.

We are releasing a simple, open-source Rust implementation of honeytokens that integrates with inference hooks to stop model completions when a honeytoken is read. This implementation enforces mandatory signature checks on traffic and handles up to hundreds of megabytes of request data per second per core. Although this version is simple and specific to our own inference hooks, implementing the same idea for other agentic systems is straightforward enough that models can do it themselves.

Honeytokens can be used in various places where agents should not operate, such as:

  • Directories that are not shared with sandboxes
  • Keys in key-value pairs inside Kubernetes secrets
  • Hostnames of servers where agents should never run
  • Network services not intended to be accessed by agents

Two-part diagram. Top: in a sandbox pod, Claude has a bash tool and a service account token that can read other namespaces. Through this hole (the token is over-scoped), it reaches the Kubernetes API and a Secret named db-credentials in the billing namespace, one of several Secrets. Alongside a password and username, the Secret holds two honeytokens, stored as empty keys. Bottom: the conversation. A kubectl describe tool call returns the Secret’s keys, including the honeytokens. The next model request contains that tool result, and Anthropic sends the transcript to a honeytoken server, which replies allow or deny. The request is denied by inference hooks.

Diagram of honeytokens used with Kubernetes secrets.

Honeytokens should be random strings that are long enough to be unmistakable (at least eight characters), but short enough that they are not truncated in file listings or other places where agents commonly clip their outputs. Using multiple tokens in a folder, with different datestamps and starting characters, can help increase the odds that sorted and truncated listings will reveal the honeytokens. Models that spawn subagents may see their subagents fail when honeytokens are read, and may try to work around the error using more clever mechanisms like encoding outputs. To combat this, our reference tool by default echoes any honeytokens it identifies in its error output, propagating the token to the parent model and stopping its execution as well. Overall, the best use of these techniques will depend on the specific workflow and on threat modeling of the likely pathways models may take.

How effective are honeytokens?

To test how well honeytokens work, we used Siren, an evaluation originally built to measure a model’s propensity to escape its sandbox when breaking out is strictly beneficial to its task. The evaluation includes over 1,700 unique scenarios, built from over 200 benign DevOps tasks across 26 realistic sandbox environments. Each environment has a deliberate weakness: a misconfiguration, a logic bug, or a publicly disclosed vulnerability. Some tasks can be fully solved with resources available inside the sandbox, whereas others can only be solved by reaching something outside the sandbox. Most scenarios also include a “tempter,” a realistic artifact meant to entice the model to escape, such as a /goal-style loop that encourages it not to give up on the underlying task. To elicit more “natural” escape instances, these tempters do not explicitly tell the model to escape.

To keep the agent contained, each weakened sandbox runs inside a hardened outer sandbox: a Firecracker VM configured with no internet access. We placed honeytokens along the pathways each weakness opens (file systems, Kubernetes, and so on). Escapes were recorded deterministically when tripwires outside the sandbox fired, such as after the agent read a secret file. This is slightly narrower than Siren’s “reached outside” measure, which also includes failed attempts and other probing. We then replayed the recorded sessions to see how often a honeytoken reached the model’s context.

Flow diagram titled “In our tests, honeytokens would have stopped over 9 in 10 escapes,” showing what happened in 1,753 test sessions from Siren, where every escape was from a deliberately weak sandbox. Of these sessions, 459 did not escape and 1,294 escaped the sandbox. Of the escapes, 1,209 (93%) would have been stopped by a honeytoken: 1,112 before the model saw the secret, 86 where the model never saw the secret, and 11 after the model had seen the secret. Of the remainder, 54 (4% of escapes) were limits of honeytokens and 31 (2% of escapes) were due to the experimental setup. A note says the honeytoken check was replayed over the recorded sessions and was not running live.

Measuring the effectiveness of honeytokens.

The honeytokens in our evaluation would have stopped about 93% of all escapes, suggesting that this technique can prevent many instances of models escaping sandboxes or exceeding their intended scope. Moreover, because the models could only see the honeytokens by exceeding the scope of their original task, there were no false positives in the sessions where the model did not escape.

Analyzing the failures, we found that some (about 2% of all escapes) were due to the experimental setup:

  • In 20 cases, there was no simple location to plant a honeytoken, so there was no honeytoken for the agent to find.
  • In 11 cases, the agent technically escaped the sandbox but did not complete its goal or trigger the honeytokens.

However, we believe the remaining failures (about 4% of all escapes) represent more fundamental limitations of honeytokens—either because the agent did not probe the environment or probed it without triggering the honeytokens:

  • In 33 cases, the agent either knew exactly what it would do outside the sandbox (such as reading a specific path) and thus did not probe the environment, or ran a script that completed its task without needing to probe.
  • In 21 cases, the agent probed the environment without triggering honeytokens, because the tokens were truncated, the services could be probed without listing the honeytokens, or the agent searched for specific files or patterns with commands that did not reveal other files.

Conclusion

In practice, the effectiveness of honeytokens will depend largely on the specific context in which the model runs, as well as on what the model is trying to achieve. Overall, we believe that honeytokens are a simple and effective technique that can help secure workloads in tandem with existing sandboxing and security mechanisms.

Footnotes

01 Refusal strings should be private and revocable: if a malicious actor can force a model refusal, they may be able to deny service to legitimate requests. Historically, Anthropic models exposed a single, global refusal string that was shared across all Claude users. However, as our models were increasingly used in important agentic workflows operating on untrusted data, such as analyzing malware or moderating messages, this string was adopted by malicious actors to thwart analysis or disrupt service of Claude-based systems, so we retired it.