发现并防御本地智能体中多步植入的持久化后门攻击
From Prompt Injection to Persistent Control: Defending Agentic Harness Against Trojan Backdoors

- 通过嵌入文件和工具输出,分步植入恶意指令
- 95.5%攻击成功率,单步检测手段失效
- 动态扫描+溯源清除,防御持久化控制
LLM智能体正从对话工具演变为真实工作场景中的操作性工具。在本地智能体环境中,智能体可读写文件、调用工具并跨会话复用工作区状态。此类能力虽提升实用性,但也引入新攻击面:攻击者可在文件或工具输出中嵌入提示注入,智能体读取后存储并后续执行。这种多步后门攻击中,每一步均无明显恶意,但组合后可将不可信文本转化为持久控制内容。现有防御常孤立检查各步骤,虽能拦截显式恶意行为,却无法发现早期写入操作所植入的后门。为揭示此威胁,我们提出ClawTrojan基准,在基于GPT-5.4的OpenClaw模拟环境中实现95.5%攻击成功率(ASR),而传统单步提示注入攻击在此模型上接近0 ASR。针对该威胁,我们提出DASGuard,通过扫描敏感本地文件中的控制类文本,追踪其来源,并清除非可信源的内容。实验表明,DASGuard结合运行时阻断与工作区清洗,实现强动态防御。
原文摘要 · Abstract (English)
LLM agents are evolving from conversational chatbots to operational tools in real-world workspaces. In local agentic harnesses, an LLM can read and write files, call tools, and reuse workspace state across sessions. While such capabilities enhance utility, they also expose a new attack surface for attackers. Attackers can embed a prompt injection within a file or tool output. Agents may read this hidden instruction, store it, and execute it later. In this multi-step trojan attack paradigm, no individual step appears malicious on its own, but these steps can collectively turn untrusted text into persistent control content. However, existing defenses often inspect each step in isolation. As a result, they can block a clear harmful action, but fail to detect the earlier write operation that plants the backdoor. To reveal this threat, we introduce ClawTrojan, a benchmark designed to identify multi-step trojan attacks in local agentic harnesses. In an OpenClaw-style simulated workspace with GPT-5.4, ClawTrojan reaches a 95.5% attack success rate (ASR), while existing single-turn prompt-injection attacks produce near-zero ASR on the same model. To address this threat, we propose DASGuard, which scans control-like text in sensitive local files, traces its origin, and removes control content that does not originate from a trusted source. Our results show that DASGuard achieves strong dynamic defense by combining runtime attack blocking with sanitized commits to the workspace.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。