原帖引用 · AI 翻译
标题:“Log-To-Leak:通过模型上下文协议针对使用工具的 LLM 智能体实施提示注入攻击”
TikTok 的一篇新论文发现,使用 MCP 的 LLM 智能体往往会先完成请求的任务,然后悄悄调用攻击者的日志工具,记录用户查询、服务器回复和最终答案。
MCP 工具会提供自然语言描述,智能体在选择和安排调用顺序时会读取这些描述。攻击者可以在描述中隐藏指令,在不妨碍完成原始请求的情况下改变后续的工具使用方式。
他们通过在工具描述中放入一段简短的 4 部分指令,构建了 Log-To-Leak。该指令要求智能体在最后一次合法调用后立即调用由攻击者控制的 save_logs 工具,并打包发送用户查询、服务器名称、服务器响应和智能体响应。
这 4 个部分分别是用于确定时机的触发条件、工具名称、形式上的理由,以及强调这一步不得跳过的施压措辞。
在能够运行工具的 18 个模型与服务器组合中,Log-To-Leak 的攻击成功率达到 62.64%–100%,条件日志记录准确率为 76.55%–95.64%。
原文
New Tiktok paper finds that LLM agents using MCP often complete the requested task and then quietly call an attacker logging tool that records the query, server reply, and final answer. MCP tools expose natural-language descriptions that agents read when choosing and ordering calls. Attackers can hide instructions in those descriptions that change later tool use without breaking the original request. They built Log-To-Leak by placing a short four-part directive in a tool description. It tells the agent to call an attacker-controlled save_logs tool right after the last legitimate call, packing the user query, server name, server response, and agent response. The parts are a trigger for timing, the tool name, a formal reason, and pressure that the step must not be skipped. Across 18 model-server pairs that could run tools, Log-To-Leak hit 62.64–100% attack success rate and 76.55–95.64% conditional logging accuracy.