Lexo:通过LLM辅助程序再生消除隐蔽供应链攻击 Lexo: Eliminating Stealthy Supply-Chain Attacks via LLM-Assisted Program Regeneration 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2025-10-16
👁️ 预览文献
💡 AI 中文简介
开源软件供应链攻击会在组件中隐藏恶意功能,只在特定环境触发,难以发现。Lexo通过自动学习组件行为,用大语言模型重新生成无漏洞的代码版本。它先生成输入输出对来建模组件行为,再合成新版本,保留原功能但去除恶意行为。在100多个真实软件包上测试,平均30分钟内完成再生,成功消除了多个真实攻击中的恶意代码,甚至比直接让先进LLM修改源码更有效。
领域软件安全与供应链安全
适合谁读需要一定专业背景(软件安全、程序分析或LLM应用方向的研究者与工程师)
核心贡献1. 提出Lexo框架,利用LLM辅助的程序再生自动消除隐蔽供应链攻击,无需人工分析恶意代码。2. 设计多LLM实例协作与正确性/覆盖率引导机制,确保再生代码功能兼容且无恶意行为。
关键数据在100多个真实软件包上评估,平均再生时间<30分钟;成功消除多个真实供应链攻击中的恶意代码,包括最先进LLM直接修改源码时无法消除的案例。
推荐理由如果你关心开源软件安全,这篇论文展示了一种用AI自动“洗白”恶意代码的新思路,效果惊人且实用。
关键词["供应链安全", "大语言模型", "程序再生", "隐蔽攻击", "代码合成", "软件安全"]

原文摘要

查看英文原文摘要

Software supply-chain attacks are an important and ongoing concern in the open source software ecosystem. These attacks maintain the standard functionality that a component implements, but additionally hide malicious functionality activated only when the component reaches its target environment. Lexo addresses such stealthy attacks by automatically learning and regenerating vulnerability-free versions of potentially malicious components. Lexo first generates a set of input-output pairs to model a component's full observable behavior, which it then uses to synthesize a new version of the original component. The new component implements the original functionality but avoids stealthy malicious behavior. Throughout this regeneration process, Lexo consults several distinct instances of Large Language Models (LLMs), uses correctness and coverage metrics to shepherd these instances, and guardrails their results. An evaluation on 100+ real-world packages, including high-profile stealthy supply-chain attacks, indicates that Lexo scales across multiple domains, regenerates code efficiently (<30m on average), maintains compatibility, and succeeds in eliminating malicious code in several real-world supply-chain-attacks, even in cases when a state-of-the-art LLM fails to eliminate malicious code when given the source code of the component and prompted to do so.