The invention belongs to the technical field of
network security, and particularly relates to a cross-architecture binary function similarity detection method and
system based on a neural network, andthe method comprises the steps: traversing a binary file function
list for different types of binary files, constructing and optimizing a function
control flow graph, translating the program
basic block byte code to obtain an intermediate representation, generating a semantic embedding vector of the
basic block code, extracting function
control flow graph nodes by using a breadth-first
graph traversal algorithm, obtaining function embedding vectors according to semantic embedding vectors and
control flow information of the nodes, and calculating the
cosine distance between the function embedding vectors to measure the function similarity. The method is more beneficial to code intermediate representation, eliminates the difference between different instruction architectures, reduces the cross-architecture code similarity detection difficulty, and reduces the expansion
workload and difficulty, based on a function
embedding process of a PVDM model and a graph neural network, introductionof human prejudice is avoided, the improved graph neural network is faster in convergence speed and higher in
overall efficiency and accuracy of the
system.