paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis

Acoda:面向基于 LLM 分析的对抗性代码混淆防御
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 论文关注对抗代码混淆以防御 LLM 代码分析,属于 LLM 代码安全与隐私方向,而非用户核心的静态分析、形式化验证或浮点/贝叶斯程序分析与 LLM 的交叉;仅在“LLM 用于代码分析”的鲁棒性上有边缘关联。引用 1 inbox
Hongzhou Rao, Zikan Dong, Yanjie Zhao, Haodong Li, Haoyu Wang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出基于遗传算法的对抗代码混淆框架 Acoda,用 8 种保语义混淆方法诱导 LLM 拒绝或误读代码分析。

随着大语言模型(LLM)广泛应用于代码理解、调试和漏洞检测等软件工程任务,其强大的语义推理能力也带来新的安全与隐私风险:LLM 可分析、重构甚至逆向源代码逻辑,导致知识产权泄露。为此,本文提出 Acoda,一个基于遗传算法的对抗性代码混淆框架,用于防御基于 LLM 的代码分析。Acoda 利用 LLM 的安全对齐机制与基于 token 的信息处理特性,设计了 8 种保持语义的混淆方法,并通过遗传算法迭代优化混淆策略以生成防御效果最大化的对抗样本。此外,作者提出基于 LLM 响应的量化评估框架,结合辅助 LLM 与四个评价指标全面评估目标 LLM 对混淆代码的分析行为。实验表明,在 GPT-4o、DeepSeek、Qwen、Llama、Gemma 等 7 个先进 LLM 上,Acoda 的攻击成功率最高达 70%,具有较强跨模型迁移性且运行时开销很小,同时保证原始代码语义不变。

问题
LLM 具备强大语义推理能力,可分析、重构甚至逆向源代码逻辑,可能造成知识产权泄露,亟需有效的代码保护与防御手段。
方法
提出基于遗传算法的对抗性代码混淆框架 Acoda,利用 LLM 的安全对齐与基于 token 的信息处理机制设计 8 种语义保持的混淆方法,并迭代优化混淆策略生成对抗样本;同时给出基于 LLM 响应的量化评估框架。
评估
在 GPT-4o、DeepSeek、Qwen、Llama、Gemma 等 7 个先进 LLM 上评估攻击成功率、跨模型迁移性与运行时开销,并验证混淆后代码语义保持不变。
原文摘要(Abstract)

With the widespread adoption of Large Language Models (LLMs) in software engineering (SE) tasks such as code understanding, debugging, and vulnerability detection, their powerful semantic reasoning ability has also introduced new security and privacy risks. LLMs can analyze, reconstruct, or even reverse-engineer source code logic, potentially leading to the leakage of intellectual property. To address this issue, we propose Acoda, a genetic algorithm–based adversarial code obfuscation framework that defends against LLM-based code analysis. Acoda leverages two key mechanisms of LLMs, namely safety alignment and token-based information processing, to design 8 semantics-preserving obfuscation methods. It iteratively optimizes obfuscation strategies through a genetic algorithm to generate adversarial samples that maximize defensive effectiveness. In addition, we propose a quantitative evaluation framework based on LLM responses, which combines an auxiliary LLM and four evaluation metrics to assess how target LLMs analyze obfuscated code comprehensively. Experimental results show that Acoda can effectively induce LLMs to refuse or misinterpret code analysis. On 7 state-of-the-art LLMs, including GPT-4o, DeepSeek, Qwen, Llama, and Gemma, Acoda achieves an attack success rate (ASR) of up to 70%, with strong cross-model transferability and minimal runtime overhead, while ensuring that the semantics of the original code remain unchanged. Overall, this study provides a new perspective for code protection and LLM security defense in the era of LLMs.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2606-11755,
  title = {Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis},
  author = {Hongzhou Rao and Zikan Dong and Yanjie Zhao and Haodong Li and Haoyu Wang},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3774748.3793624}
}