超越恶意性:Agent Skills 的静态与运行时攻击面剖析
研究论文 · 2026/10/20
Agent技能是Markdown文档,工具型代理将其作为指令读取,并以加载会话的权限执行。安装技能即授予权限(指导代理的资格,而非新特权),我们测量的是这种授权的大小。我们提出一种两阶段攻击面分析方法,结合全包静态分析和依赖来源检查,以及插桩沙箱执行和基于模型的轨迹评估。将该方法应用于两个市场的6309个列表,选择执行列表时不基于先前的威胁或风险信号。一半语料库有shell执行能力的证据;文件系统读取为35%,文件系统写入和网络出口各31%,凭证访问13%;十分之七的列表至少有一种提升的能力。这是用户在安装时接受的攻击面,但几乎当时不可见。存在权限模型但近乎无效。作者可以在frontmatter中列出技能预批准的工具,这移除了确认提示而非限制技能可触及的范围;在6061个frontmatter可解析的列表中,770个有声明,词汇无法表达凭证或环境访问,且没有检查声明与实际包是否一致。声明也不准确:59%的声明列表低估了其包的能力。ClawHub声明频率约为skillsmp的两倍,但88%的声明低估,而skillsmp为31%。因此,市场边界的分诊不能依赖列表声明,而必须依赖包的实际能力。这些结果将面向能力的攻击面分析定位为恶意性检测的必要补充。
该研究首次系统量化了Agent技能安装时隐含的攻击面,揭示了权限模型的失效和声明的不准确,为安全分诊提供了新方向。
Agent skills are Markdown documents that a tool-using agent reads as instructions and then acts on with the privileges of the session that loaded them. Installing one grants authority (the standing to direct the agent, not new privilege), and the size of that grant is what we measure. We present a two-phase attack-surface profiling methodology that combines whole-bundle static analysis and dependency provenance checking with instrumented sandbox execution and separate model-based assessment of the resulting traces. We apply the methodology to 6,309 listings from two marketplaces, selecting listings for execution without conditioning that decision on a prior threat or risk signal. Half the corpus carries evidence of shell-execution capability; the corresponding shares are 35% for filesystem read, 31% each for filesystem write and network egress, and 13% for credential access; seven listings in ten carry at least one elevated capability. That is the surface a user accepts at install time, and almost none of it is visible then. A permission model exists but is close to inert. Authors may list the tools a skill pre-approves in its own frontmatter, which removes confirmation prompts rather than restricting what the skill can reach; of the 6,061 listings whose frontmatter parses, 770 declare anything at all, the vocabulary cannot express credential or environment access, and nothing checks what it does express against the bundle. Declaring is also not declaring accurately: 59% of declaring listings understate what their bundle can do. ClawHub declares roughly twice as often as skillsmp, yet under-declares on 88% of its declarations against 31%. Triage at the marketplace boundary therefore cannot rest on what a listing declares. It must rest on what the bundle can do. These results position capability-oriented attack-surface profiling as a necessary complement to maliciousness detection.