arrow
返回

Identifying Compiler and Optimization Level in Binary Code From Multiple Architectures

delete2021-01-01
delete11
delete
OA
AI
D
Davide Pizzolotto *
K
Katsuro Inoue
DOI:10.1109/ACCESS.2021.3132950delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
While compiling a native application, different compiler flags or optimization levels can be configured. This choice depends on the different requirements. For example, if the application binary is intended for final release, the flags and optimization settings should be set for execution speed and efficiency. Alternatively, if the application is to be used for debugging purposes, debug flags should be configured accordingly, usually involving minor or no code optimization. However, this information cannot be easily extracted from a compiled binary. Nonetheless, ensuring the same compiler and compilation flags is particularly important when comparing different binary files, to avoid inaccurate or unreliable analyses. Unfortunately, to understand which flags and optimizations have been used, a deep knowledge of the target architecture and the compiler used is required. In this study, we present two deep learning models used to detect both compiler and optimization level in a compiled binary. The optimization levels we study are O0, O1, O2, O3, and Os in the x86_64, AArch64, RISC-V, SPARC, PowerPC, MIPS, and ARM architectures. In addition, for the x86_64 and AArch64 architectures, we also determine whether the compiler is GCC or Clang. We created a dataset of more than 76000 binaries and used it for training. Our experiments showed over 99.95% accuracy in detecting the compiler and between 92% to 98%, depending on the architecture, in detecting the optimization level. Furthermore, we analyzed the change in accuracy when the amount of data was extremely limited. Our study shows that it is possible to accurately detect both compiler flag settings and optimization levels with function-level granularity.
Keyword:
Optimization
Codes
Convolutional neural networks
Binary codes
Libraries
Computer architecture
Training
Compilers
deep learning
static code analysis
reverse engineering

期刊

IEEE Access 封面图
IEEE Access
IF:
3.6
论文数:
9.8W
被引数:
29.4W

机构

T
the university of osaka
学者数:
2.8W
论文数: 1.8W
被引数: 6
引用论文

引用论文

Effects of titanium and tantalum adhesion layers on the properties of sol-gel derived SrBi2Ta2O9 thin films
err2002-08-01
err0
PREAI
errChing-Chich Leu; Hung-Tao Lin; Chen-Ti Hu; Chao-Hsin Chien; Ming-Jui Yang; Ming-Che Yang; Tiao-Yuan Huang
err分享
err收藏
A Survey on Compiler Autotuning using Machine Learning基于机器学习的编译器自动调优研究综述
err2018-09-18
err123
errOAAI
errAshouri, Amir H.; Killian, William; Cavazos, John; Palermo, Gianluca; Silvano, Cristina
err分享
err收藏
Case Report: Aperiodic Fluctuations of Neural Activity in the Ictal MEG of a Child With Drug-Resistant Fronto-Temporal Epilepsy
err2021-03-04
err0
errOAAI
errSaskia van Heumen; Jeremy T. Moreau; Elisabeth Simard-Tremblay; Steffen Albrecht; Roy WR. Dudley; Sylvain Baillet
err分享
err收藏
学者 查看更多内容