arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.06095cs.CRcs.AI
收藏

LLM4CodeRE: 生成式AI用于代码反编译分析与逆向工程

LLM4CodeRE: Generative AI for Code Decompilation Analysis and Reverse Engineering

Hamed Jelodar, Samita Bai, Tochukwu Emmanuel Nwankwo, Parisa Hamedi, Mohammad Meymani, Roozbeh Razavi-Far, Ali A. Ghorbani

AI总结:

本文提出LLM4CodeRE框架,通过双向代码逆向工程实现反编译与源码翻译,采用多适配器和序列到序列统一方法提升任务适应性,实验显示其在反编译任务中表现优异。

摘要:

代码反编译分析是恶意软件逆向工程中的基础且具有挑战性的任务,尤其由于广泛使用复杂的混淆技术。尽管最近的大型语言模型(LLMs)在将低级表示转换为高级源代码方面表现出潜力,但现有方法大多依赖通用代码预训练,缺乏对恶意软件的适应性。我们提出了LLM4CodeRE,一个用于双向代码逆向工程的领域自适应LLM框架,支持在统一模型中实现汇编到源码的反编译和源码到汇编的翻译。为了实现有效的任务适应,我们引入了两种互补的微调策略:(i) 多适配器方法用于任务特定的语法和语义对齐,以及(ii) 使用任务条件前缀的序列到序列统一方法以强制端到端生成约束。实验结果表明,LLM4CodeRE在反编译任务中优于现有工具和通用代码模型,实现了稳健的双向泛化。

英文摘要:

Code decompilation analysis is a fundamental yet challenging task in malware reverse engineering, particularly due to the pervasive use of sophisticated obfuscation techniques. Although recent large language models (LLMs) have shown promise in translating low-level representations into high-level source code, most existing approaches rely on generic code pretraining and lack adaptation to malicious software. We propose LLM4CodeRE, a domain-adaptive LLM framework for bidirectional code reverse engineering that supports both assembly-to-source decompilation and source-to-assembly translation within a unified model. To enable effective task adaptation, we introduce two complementary fine-tuning strategies: (i) a Multi-Adapter approach for task-specific syntactic and semantic alignment, and (ii) a Seq2Seq Unified approach using task-conditioned prefixes to enforce end-to-end generation constraints. Experimental results demonstrate that LLM4CodeRE outperforms existing decompilation tools and general-purpose code models, achieving robust bidirectional generalization.

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

↑