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

XDA:具有迁移学习的精确、鲁棒的学习

XDA: Accurate, Robust Disassembly with Transfer Learning

Columbia University(哥伦比亚大学);University of Toronto(多伦多大学)

Kexin Pei, Jonas Guan, David Williams-King, Junfeng Yang, Suman Jana

摘要:

准确和强大的拆卸剥离二进制文件是具有挑战性的。困难的根源在于高级结构,例如指令和函数边界,在剥离的二进制文件中不存在,并且必须基于不完整的信息来恢复。目前的反汇编方法依赖于解析或简单的模式匹配来近似恢复,但这些方法通常是不准确和脆弱的,特别是在不同的编译器优化。我们提出了XDA,一个基于迁移学习的反汇编框架,它学习机器码中存在的不同上下文依赖关系,并将这些知识转移到准确和鲁棒的反汇编中。我们设计了一个自监督学习任务,以掩码语言建模为动机,学习二进制文件中字节序列之间的相互作用。这个任务的输出是字节嵌入,它对输入二进制文件的字节标记之间复杂的上下文依赖关系进行编码,然后可以对这些字节标记进行微调,以用于下游的反汇编任务。我们评估了XDA在两个反汇编任务(恢复函数边界和汇编指令)上的性能,这些任务来自SPEC CPU 2017,SPEC CPU 2006和BAP语料库中的3,121个二进制文件。二进制文件由GCC、ICC和MSVC在x86/x64 Windows和Linux平台上编译,超过4个优化级别。XDA在恢复函数边界和指令方面分别达到了99.0%和99.7%的F1分数,在这两项任务上都超过了之前的最先进水平。它还保持了与最快的基于ML的方法相当的速度,并且比IDA Pro等手写反汇编程序快38倍。我们在https://github.com/CUMLSec/XDA上发布了XDA的代码。

英文摘要:

Accurate and robust disassembly of stripped binaries is challenging. The root of the difficulty is that high-level structures, such as instruction and function boundaries, are absent in stripped binaries and must be recovered based on incomplete information. Current disassembly approaches rely on heuristics or simple pattern matching to approximate the recovery, but these methods are often inaccurate and brittle, especially across different compiler optimizations. We present XDA, a transfer-learning-based disassembly framework that learns different contextual dependencies present in machine code and transfers this knowledge for accurate and robust disassembly. We design a self-supervised learning task motivated by masked Language Modeling to learn interactions among byte sequences in binaries. The outputs from this task are byte embeddings that encode sophisticated contextual dependencies between input binaries' byte tokens, which can then be finetuned for downstream disassembly tasks. We evaluate XDA's performance on two disassembly tasks, recovering function boundaries and assembly instructions, on a collection of 3,121 binaries taken from SPEC CPU2017, SPEC CPU2006, and the BAP corpus. The binaries are compiled by GCC, ICC, and MSVC on x86/x64 Windows and Linux platforms over 4 optimization levels. XDA achieves 99.0% and 99.7% F1 score at recovering function boundaries and instructions, respectively, surpassing the previous state-of-the-art on both tasks. It also maintains speed on par with the fastest ML-based approach and is up to 38x faster than hand-written disassemblers like IDA Pro. We release the code of XDA at https://github.com/CUMLSec/XDA.

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

↑