一句话:提出统一预训练模型 HexT5,把伪代码当作特殊编程语言预训练,在四类剥离二进制信息推断任务上达到最优性能。
编译与符号剥离会不可逆地丢弃注释、标识符名与类型等对代码理解至关重要的高层语义信息,而现有方法通常只恢复其中一类信息,语义推断效果受限。本文将反编译得到的伪代码视为一种特殊编程语言,提出统一预训练模型 HexT5,基于新颖的伪代码预训练目标,在大量自然语言注释、源码标识符与伪代码上进行训练。随后在代码摘要、变量名恢复、函数名恢复与相似性检测四类下游任务上微调。实验表明 HexT5 在四个下游任务上均取得当时最优性能,并展现出在二进制相关任务上稳定的有效性与泛化能力。
Decompilation is a widely used process for reverse engineers to significantly enhance code readability by lifting assembly code to a higher-level C-like language, pseudo-code. Nevertheless, the process of compilation and stripping irreversibly discards high-level semantic information that is crucial to code comprehension, such as comments, identifier names, and types. Existing approaches typically recover only one type of information, making them suboptimal for semantic inference. In this paper, we treat pseudo-code as a special programming language, then present a unified pre-trained model, HexT5, that is trained on vast amounts of natural language comments, source identifiers, and pseudo-code using novel pseudo-code-based pre-training objectives. We fine-tune HexT5 on various downstream tasks, including code summarization, variable name recovery, function name recovery, and similarity detection. Comprehensive experiments show that HexT5 achieves state-of-the-art performance on four downstream tasks, and it demonstrates the robust effectiveness and generalizability of HexT5 for binary-related tasks.
@inproceedings{XiongCCGCZ23,
title = {HexT5: Unified Pre-Training for Stripped Binary Code Information Inference},
author = {Jiaqi Xiong and Guoqiang Chen and Kejiang Chen and Han Gao and Shaoyin Cheng and Weiming Zhang},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00099}
}