arXiv:2606.14154 · 中英对照阅读
SkillMutator:大语言模型(LLM)智能体技能上的语言与代码跨模态攻击的基准测试与防御
SkillMutator: Benchmarking and Defending Language-and-Code Cross-modal Attacks on LLM Agent Skills
中文速览
Agent Skills 把操作说明和脚本打包在一起,攻击者可能让说明看似正常、实际却引导脚本窃取数据,而现有扫描器很难看出两者之间的猫腻。研究者构建了 SkillMutator 基准,让恶意技能经过多轮改写、躲避检测,并训练小型本地模型按四个阶段对照技能目的、说明和代码来判断风险。测试中,现有扫描器的检出率普遍不到 17%,而训练后的模型在最难的一组攻击上达到 88.2%,高于 GPT-5.4 的 86.8%。这说明,不把敏感技能交给第三方、也不依赖昂贵大模型,仍有机会在安装前有效拦截这类跨说明与代码的攻击。
摘要
大语言模型(LLM)智能体越来越多地通过加载 Agent Skills,在运行时扩展其能力:Agent Skills 是一种复合工件,由自然语言规范 SKILL.md、可执行脚本和特定任务资源构成。由于技能的行为由自然语言指令与可执行行为共同决定,评估其安全性需要跨越这两种模态进行推理。这使技能具有实用价值,但也带来了语言与代码跨模态攻击面。攻击者可以在 SKILL.md 中呈现看似良性的工作流,同时嵌入隐式指令,引导智能体窃取敏感文件,即使配套脚本和资源看起来无害也是如此。尽管技能市场迅速发展,这一攻击面仍未得到充分研究。既有工作通常将技能视为提示注入载体,或视为可进行静态扫描的代码工件,因此基本未对两种模态交互所引发的攻击进行测量。在我们的评估中,开源技能扫描器仅能检测出 $2\%$ – $8\%$ 的此类攻击,而商业扫描器仅能检测出 $9\%$ – $17\%$。
Large language model (LLM) agents increasingly extend their capabilities at runtime by loading Agent Skills: composite artifacts that pair a natural-language specification, SKILL.md, with executable scripts and task-specific resources. Because a skill’s behavior is determined jointly by natural-language instructions and executable behavior, assessing its safety requires reasoning across both modalities. This makes skills useful, but also creates a language-and-code cross-modal attack surface. An attacker can present a benign-looking workflow in SKILL.md while embedding implicit directives that steer the agent to exfiltrate sensitive files even when the accompanying scripts and resources appear harmless. Despite the rapid growth of skill marketplaces, this attack surface remains understudied. Prior work typically treats skills either as prompt-injection vectors or as code artifacts for static scanning, leaving attacks that emerge from the interaction between two modalities largely unmeasured. In our evaluation, an open-source skill scanner detects only $2\%$ – $8\%$ of such attacks, while a commercial scanner detects only $9\%$ – $17\%$ .
术语表
- large language model (LLM) agent
- 大语言模型(LLM)智能体
- Agent Skills
- Agent Skills
- SKILL.md
- SKILL.md
- cross-modal attack surface
- 跨模态攻击面
- language-and-code cross-modal attack
- 语言与代码跨模态攻击
- skill scanner
- 技能扫描器
- install-time detection
- 安装时检测
- SkillMutator
- SkillMutator
- skill-mutation process
- 技能变异过程
- attack category
- 攻击类别
- scanner feedback
- 扫描器反馈
- evasion refinement
- 规避优化
- reasoning-trajectory distillation
- 推理轨迹蒸馏
- four-phase analysis framework
- 四阶段分析框架
- purpose grounding
- 目的锚定
- out-of-scope detection
- 范围外行为检测
- security principle reasoning
- 安全原则推理
- attack category labeling
- 攻击类别标注
- frontier teacher model
- 前沿教师模型
- open-weight model
- 开放权重模型
- forced prefix prefilling
- 强制前缀预填充
- adversarial oracle
- 对抗性预言机
- Persistence Control mutation
- 持久化控制变异
- prompt injection
- 提示注入
- Qwen2.5-Coder-7B-Instruct
- Qwen2.5-Coder-7B-Instruct
- GPT-4o-mini
- GPT-4o-mini
- GPT-5.4-mini
- GPT-5.4-mini
- GPT-5.4
- GPT-5.4