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

CP-BCS:由控制流图与伪代码引导的二进制代码摘要生成

CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Code

Zhejiang University(浙江大学);Stony Brook University(纽约州立大学石溪分校)

Tong Ye, Lingfei Wu, Tengfei Ma, Xuhong Zhang, Yangkai Du, Peiyu Liu, Shouling Ji, Wenhai Wang

AI总结:

本文提出 CP-BCS 框架,利用双向指令级控制流图与融合专家知识的伪代码学习二进制函数执行行为与逻辑语义,在 X86、X64、ARM 三种架构及 O1-O3 优化级别上验证了其在生成二进制函数摘要和提升逆向工程效率方面的优越性。

摘要:

自动为二进制文件生成函数摘要是一项极具价值但极具挑战性的任务,因为它涉及将低级语言(汇编代码)的执行行为和语义转换为人类可读的自然语言。然而,当前大多数理解汇编代码的工作都面向生成函数名称,这些名称包含大量缩写,使其仍然令人困惑。为了弥合这一差距,我们专注于为二进制函数生成完整摘要,尤其是针对剥离二进制文件(现实中无符号表和调试信息)。为了充分利用汇编代码的语义,我们提出了一种由控制流图和伪代码引导的二进制代码摘要生成框架,称为 CP-BCS。CP-BCS 利用双向指令级控制流图和融合专家知识的伪代码来学习全面的二进制函数执行行为和逻辑语义。我们在 3 种不同的计算机体系结构(X86、X64 和 ARM)上,针对 3 种不同的二进制优化级别(O1、O2 和 O3)评估了 CP-BCS。评估结果表明 CP-BCS 性能优越,并显著提高了逆向工程的效率。

英文摘要:

Automatically generating function summaries for binaries is an extremely valuable but challenging task, since it involves translating the execution behavior and semantics of the low-level language (assembly code) into human-readable natural language. However, most current works on understanding assembly code are oriented towards generating function names, which involve numerous abbreviations that make them still confusing. To bridge this gap, we focus on generating complete summaries for binary functions, especially for stripped binary (no symbol table and debug information in reality). To fully exploit the semantics of assembly code, we present a control flow graph and pseudo code guided binary code summarization framework called CP-BCS. CP-BCS utilizes a bidirectional instruction-level control flow graph and pseudo code that incorporates expert knowledge to learn the comprehensive binary function execution behavior and logic semantics. We evaluate CP-BCS on 3 different binary optimization levels (O1, O2, and O3) for 3 different computer architectures (X86, X64, and ARM). The evaluation results demonstrate CP-BCS is superior and significantly improves the efficiency of reverse engineering.

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

↑