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

REx86:一种用于协助x86汇编逆向工程的本地大语言模型

REx86: A Local Large Language Model for Assisting in x86 Assembly Reverse Engineering

Darrin Lea, James Ghawaly, Golden Richard, Aisha Ali-Gombe, Andrew Case

AI总结:

REx86是一种本地大语言模型,通过微调提升x86汇编逆向工程的效率,显著提高代码理解和解决率。

摘要:

x86二进制文件的逆向工程(RE)对于恶意软件和固件分析至关重要,但因元数据被剥离和对抗性混淆而变得缓慢。大型语言模型(LLMs)通过自动化理解和注释有潜力提高RE的效率,但云托管的封闭权重模型存在隐私和安全风险,且无法在封闭网络环境中使用。我们评估了参数高效微调的本地LLMs在这些环境中的逆向工程任务中的表现。在CodeLlama、Qwen2.5-Coder和CodeGemma系列中,八个开放权重模型在定制整理的5,981个x86汇编示例数据集上进行了微调。我们定量评估了它们,并确定微调后的Qwen2.5-Coder-7B为最佳表现者,我们将其命名为REx86。REx86将测试集的交叉熵损失减少了64.2%,并在与地面真实值的语义余弦相似度上提高了20.3%。在有限的用户案例研究(n=43)中,REx86显著提高了行级代码理解(p=0.031),并将正确解决率从31%提高到53%(p=0.189),尽管后者未达到统计显著性。定性分析显示更准确、简洁的注释,且错误较少。REx86在本地开放权重LLMs中为x86 RE提供了最先进的帮助。我们的发现证明了领域特定微调的价值,并突显了需要更多注释反汇编数据以进一步提升LLM在RE中的性能的必要性。REx86、其数据集和LoRA适配器在https://github.com/dlea8/REx86和https://zenodo.org/records/15420461上公开可用。

英文摘要:

Reverse engineering (RE) of x86 binaries is indispensable for malware and firmware analysis, but remains slow due to stripped metadata and adversarial obfuscation. Large Language Models (LLMs) offer potential for improving RE efficiency through automated comprehension and commenting, but cloud-hosted, closed-weight models pose privacy and security risks and cannot be used in closed-network facilities. We evaluate parameter-efficient fine-tuned local LLMs for assisting with x86 RE tasks in these settings. Eight open-weight models across the CodeLlama, Qwen2.5-Coder, and CodeGemma series are fine-tuned on a custom curated dataset of 5,981 x86 assembly examples. We evaluate them quantitatively and identify the fine-tuned Qwen2.5-Coder-7B as the top performer, which we name REx86. REx86 reduces test-set cross-entropy loss by 64.2% and improves semantic cosine similarity against ground truth by 20.3\% over its base model. In a limited user case study (n=43), REx86 significantly enhanced line-level code understanding (p = 0.031) and increased the correct-solve rate from 31% to 53% (p = 0.189), though the latter did not reach statistical significance. Qualitative analysis shows more accurate, concise comments with fewer hallucinations. REx86 delivers state-of-the-art assistance in x86 RE among local, open-weight LLMs. Our findings demonstrate the value of domain-specific fine-tuning, and highlight the need for more commented disassembly data to further enhance LLM performance in RE. REx86, its dataset, and LoRA adapters are publicly available at https://github.com/dlea8/REx86 and https://zenodo.org/records/15420461.

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

↑