arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.33489cs.CR
收藏

从指令到漏洞利用:将程序分析应用于跨自然语言与代码的恶意智能体技能

From Instructions to Exploits: Applying Program Analysis to Malicious Agent Skills Across Natural Language and Code

Institute of Information Engineering, CAS(中国科学院信息工程研究所);MYbank, Ant Group(蚂蚁集团网商银行)

Shiwu Zhao, Baizhu Wang, Guoqiang Zheng, Tingyu Gao, Yuheng Xie, Rujie Chen, Xingchen Chen, Xuezhang Liu, Qixu Liu

AI总结:

该研究针对LLM智能体跨自然语言与代码的技能供应链风险,提出SCS静态分析框架,在基准测试与真实技能分析中取得优异检测性能。

摘要:

基于大语言模型(LLM)的智能体日益依赖结合自然语言指令与可执行代码的第三方技能,这产生了可能覆盖两类产物的供应链风险。现有技能扫描器通常依赖规则匹配或直接的LLM判断,对追踪这类跨域行为的支持有限。我们提出智能体技能供应链扫描器(SCS),这是一个将指令与代码统一用于安全分析的静态分析框架。SCS使用有限的面向安全的API集,将自然语言指令编译为受约束的Python风格中间表示;随后为指令和绑定代码构建程序依赖图,并将它们连接为跨域图(xPDG)。信任-敏感度-能力(TSC)模型在图上传播安全属性,以支持结构化、基本确定的风险检测。在经人工验证的包含117个恶意技能与117个良性技能的基准测试中,SCS在5种LLM上的评估方法中取得最高的平均准确率(85.6%)、召回率(95.2%)和F1分数(86.9%),精确率为80.2%,平均令牌消耗为1370万。其NL到IR编译器在400个人工标注的指令步骤上达到92.5%-94.5%的步骤级正确性。最后,对66157个真实世界的ClawHub技能进行分析,得到2473个候选,其中627个通过辅助动态验证和人工审查被确认为恶意。

英文摘要:

LLM-powered agents increasingly rely on third-party skills that combine natural-language instructions with executable code, creating supply-chain risks that may span both artifacts. Existing skill scanners often rely on rule matching or direct LLM judgments and provide limited support for tracing such cross-domain behavior. We present the Supply-Chain Scanner for Agent Skills (SCS), a static analysis framework that unifies instructions and code for security analysis. SCS compiles natural-language instructions into a constrained Python-style intermediate representation using a limited set of security-oriented APIs. It then constructs program dependence graphs for instructions and bundled code and connects them into a cross-domain graph (xPDG). A Trust-Sensitivity-Capability (TSC) model propagates security properties over the graph to support structured, largely deterministic risk detection. On a manually verified benchmark of 117 malicious and 117 benign skills, SCS achieves the highest average accuracy (85.6%), recall (95.2%), and F1-score (86.9%) among evaluated methods across five LLMs, with 80.2% precision and average token consumption of 13.7 million. Its NL-to-IR compiler achieves 92.5%-94.5% step-level correctness on 400 human-annotated instruction steps. Finally, analyzing 66,157 real-world ClawHub skills yields 2,473 candidates, of which 627 are confirmed malicious through auxiliary dynamic validation and manual review.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑