Automatically Attacking Software Reverse Engineering AI Agents
作者: Brian Crawford, Justin Phillips, Patrick McClure
分类: cs.CR, cs.AI
发布日期: 2026-05-28
💡 一句话要点
提出基于遗传算法的提示生成方法,攻击软件逆向工程AI Agent。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 对抗性攻击 大型语言模型 软件逆向工程 代码混淆 遗传算法
📋 核心要点
- 现有的基于LLM的逆向工程工具易受恶意代码混淆攻击,导致分析结果不准确,影响安全分析效率。
- 利用遗传算法生成对抗性提示,通过在代码中插入不影响功能的字符串变量赋值,向LLM传递隐蔽指令。
- 通过概念验证实验,证明该方法能够欺骗LLM驱动的反汇编和反编译系统,使其错误解释二进制文件。
📝 摘要(中文)
本文提出了一种对抗性技术,利用基于遗传算法的提示生成方法(AutoDAN的改进版),来欺骗基于大型语言模型(LLM)的反汇编和反编译系统,使其错误地解释二进制可执行文件,从而有效地破坏其分析输出。该概念验证方法利用了LLM在处理和解释反编译机器代码时的固有漏洞,通过使用无关的字符串变量赋值向LLM传递秘密指令,同时不影响可执行文件的功能。通过几个简洁的例子展示了这种能力。这种方法使攻击者能够绕过依赖于LLM驱动的分析管道的自动化检测系统。通过研究和理解这种攻击,可以深入了解将LLM集成到网络安全工具链中的安全影响,并构建更强大的Agentic代码分析系统。
🔬 方法详解
问题定义:论文旨在解决基于LLM的软件逆向工程AI Agent容易受到对抗攻击的问题。现有的基于LLM的逆向工程工具,如GhidraMCP,虽然提高了恶意软件分析的效率,但也引入了新的安全漏洞,攻击者可以通过代码混淆技术欺骗LLM,使其产生错误的分析结果。
核心思路:论文的核心思路是利用对抗性攻击,特别是AutoDAN的变体,通过生成特定的提示(prompt),诱导LLM对二进制可执行文件进行错误的解释。这些提示被巧妙地嵌入到代码中,不会影响程序的正常功能,但会误导LLM的分析。
技术框架:该方法主要包含以下几个阶段:1) 选择目标二进制可执行文件;2) 使用反编译器(如Ghidra)将二进制文件反编译为C代码;3) 使用遗传算法生成对抗性提示,这些提示以字符串变量赋值的形式插入到反编译后的代码中;4) 编译修改后的代码,生成新的可执行文件;5) 使用LLM驱动的逆向工程工具分析新的可执行文件,观察LLM的分析结果是否被篡改。
关键创新:该方法最重要的创新点在于利用遗传算法自动生成对抗性提示,这些提示能够有效地欺骗LLM,而无需人工干预。与传统的代码混淆技术不同,该方法直接攻击LLM的分析过程,而不是试图隐藏代码的逻辑。
关键设计:对抗性提示的关键设计在于,它们必须满足以下两个条件:1) 不影响程序的正常功能;2) 能够有效地误导LLM的分析。为了实现这两个目标,论文使用了遗传算法来搜索满足这些条件的提示。遗传算法的目标函数是LLM分析结果与预期结果之间的差异,通过不断迭代,可以找到能够最大程度地欺骗LLM的提示。
📊 实验亮点
论文通过概念验证实验,展示了该方法能够有效地欺骗LLM驱动的反汇编和反编译系统。通过在代码中插入对抗性提示,可以使LLM产生错误的分析结果,例如错误地识别函数的功能或变量的类型。实验结果表明,该方法具有较高的攻击成功率,能够有效地绕过基于LLM的自动化检测系统。
🎯 应用场景
该研究成果可应用于评估和提高基于LLM的软件逆向工程工具的安全性。通过模拟对抗性攻击,可以发现LLM在代码分析方面的潜在漏洞,并开发相应的防御机制。此外,该技术还可以用于自动化恶意软件分析,帮助安全分析师更快地识别和应对新型威胁。
📄 摘要(原文)
Software tools for reverse engineering executable binary files, such as Ghidra, enable malware analysts to safely conduct robust static analysis without having access to original source code. Coupled with the analytic power of large language models (LLM), agentic systems enabled with tools, such as GhidraMCP, can allow analysts to automate a previously human driven process. Although this automation can increase the productivity of a single malware analyst, it also introduces a new area of vulnerability for malware obfuscation. This paper presents an adversarial technique using genetic algorithm-based prompt generation, a modification of an adversarial attack known as AutoDAN, to demonstrate the ability to deceive LLM-powered disassembly and decompilation systems into misinterpreting binary executables, effectively corrupting their analytical output. This proof-of-concept methodology exploits inherent vulnerabilities in how LLMs process and interpret decompiled machine code via prompt injection by using extraneous string variable assignments to pass surreptitious instructions to the LLM while not impacting the functionality of the executable file. We demonstrate this capability through several concise examples. This approach could enable attackers to bypass automated detection systems that rely on LLM-driven analysis pipelines. By studying and understanding this attack, insights can be gained regarding the security implication of integrating LLMs into cybersecurity toolchains and building more robust agentic code analysis systems.