arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.21558cs.CR
收藏

发现来自未知指令集架构的二进制程序中的字节序与指令长度特征

Discovery of Endianness and Instruction Size Characteristics in Binary Programs from Unknown Instruction Set Architectures

Joachim Andreassen, Donn Morrison

AI总结:

本文针对未知ISA二进制程序逆向工程,提出基于bigram特征和自相关函数的机器学习方法,识别字节序并区分、估计固定或可变指令宽度,取得较高准确率。

摘要:

我们研究了简化对来自未知指令集架构(ISA)的二进制程序进行逆向工程(RE)的问题。我们聚焦于启动逆向工程过程所需的两个基本ISA特征:识别字节序,以及判断指令宽度是固定的还是可变的。对于具有固定指令宽度的ISA,我们还提出了估计该宽度的方法。除了推动软件逆向工程研究之外,我们的工作也可以被视为硬件逆向工程的第一步,因为字节序和指令格式描述了底层ISA的内在特征。我们详细介绍了在特征工程方面的努力,并在两个架构数据集上使用多种机器学习模型进行实验,采用留一组交叉验证(Leave-One-Group-Out-Cross-Validation)来模拟模型训练期间被测ISA未知的条件。我们使用基于二元语法(bigram)的特征进行字节序检测,并使用常用于信号处理应用的自相关函数来区分固定宽度与可变宽度指令长度。实验中使用了机器学习库scikit-learn中的一系列分类器来研究这些特征。初步结果令人鼓舞:字节序检测准确率为99.4%,固定与可变宽度指令长度区分准确率为86.0%,固定指令长度检测准确率为88.0%。

英文摘要:

We study the problem of streamlining reverse engineering (RE) of binary programs from unknown instruction set architectures (ISA). We focus on two fundamental ISA characteristics to beginning the RE process: identification of endianness and whether the instruction width is a fixed or variable. For ISAs with a fixed instruction width, we also present methods for estimating the width. In addition to advancing research in software RE, our work can also be seen as a first step in hardware reverse engineering, because endianness and instruction format describe intrinsic characteristics of the underlying ISA. We detail our efforts at feature engineering and perform experiments using a variety of machine learning models on two datasets of architectures using Leave-One-Group-Out-Cross-Validation to simulate conditions where the tested ISA is unknown during model training. We use bigram-based features for endianness detection and the autocorrelation function, commonly used in signal processing applications, for differentiation between fixed- and variable-width instruction sizes. A collection of classifiers from the machine learning library scikit-learn are used in the experiments to research these features. Initial results are promising, with accuracy of endianness detection at 99.4%, fixed- versus variable-width instruction size at 86.0%, and detection of fixed instruction sizes at 88.0%.

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

↑