Compiler Differentiation Detection Method for Binary Similarity
Xiaoxue Liu, Xinwei Duan, Xinhong Hei, Yichuan Wang, Xin Yu Song · 2024
Compiler differential detection can be performed by detecting the similarity between the binary compiled by the compiler and the ideal compiled file. This article proposes a javac compiler differentiation detection system based on binary file similarity: we extract opcode sequences from binary files, use BERT to extract features of the opcodes, and finally obtain the similarity score by calculating the distance between vectors. Under the premise of ensuring the retrieval speed requirements, this algorithm is superior to most existing models in accuracy, with the accuracy rate of $99.7 \%$. It shows that the method in this article can effectively detect whether two binary files are similar. This method will have a good effect on detecting whether the javac compiler has been invaded by malicious code in the future.