arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.21071cs.CRcs.AI
收藏

本地LLM智能体作为易受攻击的运行时:智能体运行时层的源代码审计

Local LLM Agents as Vulnerable Runtimes:A Source-Code Audit of the Agent Runtime Layer

Department of Computer Science and Engineering(计算机科学与工程系);University at Buffalo, SUNY(布法罗大学)

Zhengsong Zhang, Zongze Li, Jiawei Guo, Haipeng Cai

AI总结:

提出CLAWAUDIT静态审计框架,通过STRIDE导出的五类漏洞分类法和自定义静态分析规则,评估本地LLM智能体运行时的安全弱点,在OpenClaw基准上显著提升召回率。

摘要:

本地LLM智能体(如OpenClaw和Nanobot)在终端用户机器上运行,并通过自然语言目标对主机资源(shell、文件系统、浏览器、存储的凭证和消息应用程序)进行操作。这些智能体已成为特权软件运行时,在用户意图、模型输出和主机级操作之间进行中介。现有研究通过提示注入、恶意技能、市场风险或智能体的黑盒评估来描述这一领域。但执行这种中介的实现层——提示构建器、解析器、工具调度器、技能加载器、内存写入器、网络客户端和权限门——仍然是一个未经检查的安全边界。据我们所知,之前没有工作检查智能体的源代码树来审计这些组件的实现级安全弱点。我们提出了CLAWAUDIT,一个用于测量本地LLM智能体运行时漏洞暴露的静态审计框架。CLAWAUDIT从STRIDE导出一个五类漏洞分类法,并开发了针对智能体特定模式的自定义静态分析规则,这些模式在现有的漏洞分析规则集中不存在。我们在两个后端中实例化该分类法:47个Semgrep YAML规则和30个CodeQL查询,并在OPENCLAWBENCH上进行评估,该基准包含来自OpenClaw仓库的446个源代码级建议,并按时间分为229个规则推导(训练)和217个保留(测试)建议。在保留测试集上,CLAWAUDIT将Semgrep召回率从21.7%(Pro基线)提升到66.8%,将CodeQL召回率从13.8%(安全扩展)提升到75.1%。所有四种配置的训练/测试差距保持在4个百分点以内,表明这些规则能够泛化到规则编写时未见过的漏洞。初步的实时代码审计表明,这些面向召回率的规则需要手动分类,这促使在生产部署前进行语义过滤。

英文摘要:

Local LLM agents such as OpenClaw and Nanobot run on end-user machines and act on host resources - the shell, filesystem, browser, stored credentials, and messaging applications - through natural-language goals. These agents have become privileged software runtimes that mediate between user intent, model outputs, and host-level actions. Existing research characterizes the landscape through prompt injection, malicious skills, marketplace risks, or black-box evaluation of agents. But the implementation layer that performs this mediation, the prompt builder, parser, tool dispatcher, skill loader, memory writer, network client, and permission gate, has remained an unexamined safety boundary. To our knowledge, no prior work has examined the agent's source tree to audit these components for implementation-level security weaknesses. We present CLAWAUDIT, a static auditing framework for measuring vulnerability exposure in local LLM agent runtimes. CLAWAUDIT derives a five-category vulnerability taxonomy from STRIDE and develops custom static-analysis rules that target agent-specific patterns absent from established rule sets for vulnerability analysis. We instantiate the taxonomy in two backends, 47 Semgrep YAML rules and 30 CodeQL queries, and evaluate on OPENCLAWBENCH, a benchmark of 446 source-code-level advisories from the OpenClaw repository and split temporally into 229 rule-derivation (train) and 217 held-out (test) advisories. On the held-out test, CLAWAUDIT raises Semgrep recall from 21.7% (Pro baseline) to 66.8%, and CodeQL recall from 13.8% (security-extended) to 75.1%. Train/test gaps remain within 4 percentage points for all four configurations, indicating that the rules generalize to vulnerabilities unseen during rule writing. A preliminary live-code audit shows that these recall-oriented rules require manual triage, motivating semantic filtering before production deployment.

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

↑