DeepBinDiff: Learning Program-Wide Code Representations for Binary Diffing
Open accessThe DOI matches its Crossref record; 42 of the 42 references it cites were found in a registry or an index.
Abstract
Binary diffing analysis quantitatively measures the differences between two given binaries and produces fine-grained basic block level matching.It has been widely used to enable different kinds of critical security analysis.However, all existing program analysis and machine learning based techniques suffer from low accuracy, poor scalability, coarse granularity, or require extensive labeled training data to function.In this paper, we propose an unsupervised program-wide code representation learning technique to solve the problem.We rely on both the code semantic information and the program-wide control flow information to generate basic block embeddings.Furthermore, we propose a khop greedy matching algorithm to find the optimal diffing results using the generated block embeddings.We implement a prototype called DEEPBINDIFF and evaluate its effectiveness and efficiency with a large number of binaries.The results show that our tool outperforms the state-of-the-art binary diffing tools by a large margin for both cross-version and cross-optimization-level diffing.A case study for OpenSSL using real-world vulnerabilities further demonstrates the usefulness of our system.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Semi-supervised classification with graph convolutional networks
Kipf, T. N., & Welling, M. (2016) · arXiv · doi:10.48550/arxiv.1609.02907 · Cited by 24,853 · cited 2×
“GCN [33] uses a localized first-order approximation of spectral graph convolutions to perform semi-supervised learning on graphs in a scalable way.”
MethodDistributed Representations of Words and Phrases and their Compositionality
Mikolov, T., Sutskever, I., Chen, K., Corrado, G., & Dean, J. (2013) · arXiv · doi:10.48550/arxiv.1310.4546 · Cited by 24,533 · cited 7×
“To further improve the efficiency of the computation, Word2Vec adopts the hierarchical softmax as a computationally efficient approximation [42].”
BackgroundMethodInfluentialThe Hungarian method for the assignment problem
Kuhn, H. W. (1955) · Naval Research Logistics Quarterly · doi:10.1002/nav.3800020109 · Cited by 13,120
Matrix Factorization Techniques for Recommender Systems
Koren, Y., Bell, R., & Volinsky, C. (2009) · Computer · doi:10.1109/mc.2009.263 · Cited by 11,673 · cited 1×
“The algorithm factorizes the matrix M into three matrices by minimizing the loss function depicted in Equation 4 using Alternating Least Squares (ALS) algorithm [34].”
Methodnode2vec: Scalable Feature Learning for Networks
Grover, A., & Leskovec, J. (2016) · Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining · doi:10.1145/2939672.2939754 · Cited by 10,926 · cited 1×
“DeepWalk [48] is proposed to learn latent representations of nodes in a graph using local information from truncated uniform random walks. node2vec [31] specifically designs a biased random walk procedure that efficiently explores diverse neighborhoods of a node to learn continuous feature…”
BackgroundDeepWalk: online learning of social representations
Perozzi, B., Al-Rfou, R., & Skiena, S. (2014) · Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining · doi:10.1145/2623330.2623732 · Cited by 10,123 · cited 4×
“As the name suggests, it is an improvement over the DeepWalk algorithm [48].”
BackgroundMethodInfluentialDistributed Representations of Sentences and Documents
Le, Q. V., & Mikolov, T. (2014) · arXiv (Cornell University) · doi:10.48550/arxiv.1405.4053 · Cited by 4,934 · cited 1×
“Various techniques [29], [54], [58], [23] have been proposed to leverage graph representation learning techniques [16], [42], [37] and incorporate code information into embeddings (i.e., high dimensional numerical vectors).”
BackgroundA STATISTICAL INTERPRETATION OF TERM SPECIFICITY AND ITS APPLICATION IN RETRIEVAL
SPARCK JONES, K. (1972) · Journal of Documentation · doi:10.1108/eb026526 · Cited by 4,505 · cited 1×
“To tackle this problem, DEEPBINDIFF adopts a weighting strategy to adjust the weights of opcodes based on the opcodes importance with TF-IDF model [50].”
MethodStructural Deep Network Embedding
Wang, D., Cui, P., & Zhu, W. (2016) · Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining · doi:10.1145/2939672.2939753 · Cited by 2,845 · cited 1×
“SDNE [52] designs a semi-supervised model that has multiple layers of non-linear functions to capture both the local and global graph structures.”
BackgroundThe Hungarian method for the assignment problem
Kuhn, H. W. (2005) · Naval Research Logistics (NRL) · doi:10.1002/nav.20053 · Cited by 1,260
Asymmetric Transitivity Preserving Graph Embedding
Ou, M., Cui, P., Pei, J., Zhang, Z., & Zhu, W. (2016) · Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining · doi:10.1145/2939672.2939751 · Cited by 1,248 · cited 1×
“HOPE [47] preserves higher-order proximity and uses generalized Singular Value Decomposition to improve efficiency.”
MethodNetwork representation learning with rich text information
Yang, C. H., Liu, Z., Zhao, D., Sun, M., & Chang, E. Y. (2015) · International Conference on Artificial Intelligence · Cited by 1,246
DeepWalk: Online Learning of Social Representations
Perozzi, B., Al‐Rfou, R., & Skiena, S. (2014) · arXiv (Cornell University) · doi:10.48550/arxiv.1403.6652 · Cited by 1,107 · cited 4×
“As the name suggests, it is an improvement over the DeepWalk algorithm [48].”
BackgroundMethodInfluentialDeep Neural Networks for Learning Graph Representations
Cao, S., Lu, W., & Xu, Q. (2016) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v30i1.10179 · Cited by 1,014 · cited 1×
“DNGR [13] proposes a graph representation model based on deep neural networks that captures the graph structure information directly.”
BackgroundAnO(ND) difference algorithm and its variations
Myers, E. W. (1986) · Algorithmica · doi:10.1007/bf01840446 · Cited by 893 · cited 1×
“Particularly, for two input binaries, we first extract source file names from the binaries and use Myers algorithm [46] to perform text based matching for the source code in order to get the line number matching.”
MethodOverfitting and undercomputing in machine learning
Dietterich, T. (1995) · ACM Computing Surveys · doi:10.1145/212094.212114 · Cited by 757 · cited 1×
“Also, supervised learning could suffer from the overfitting problem [22].”
BackgroundDiscriminative Embeddings of Latent Variable Models for Structured Data
Dai, H., Dai, B., & Song, L. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1603.05629 · Cited by 454 · cited 2×
“Various techniques [29], [54], [58], [23] have been proposed to leverage graph representation learning techniques [16], [42], [37] and incorporate code information into embeddings (i.e., high dimensional numerical vectors).”
BackgroundDing, S. H. H., Fung, B. C. M., & Charland, P. (2019) · 2019 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp.2019.00003 · Cited by 438 · cited 14×
“Note that Asm2Vec is designed only for function level similarity detection.”
BackgroundMethodInfluentialCross-Architecture Bug Search in Binary Executables
Pewny, J., Garmany, B., Gawlik, R., Rossow, C., & Holz, T. (2015) · IEEE Symposium on Security and Privacy (S&P) · doi:10.1109/sp.2015.49 · Cited by 403
Scalable Graph-based Bug Search for Firmware Images
Feng, Q., Zhou, R., Xu, C., Cheng, Y., Testa, B., & Yin, H. (2016) · Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security · doi:10.1145/2976749.2978370 · Cited by 401 · cited 6×
“These approaches embrace two major advantages over the traditional static and dynamic approaches: 1) higher accuracy as they incorporate unique features of the code into the analysis by using either manual engineered features [29], [54] or deep learning based automatic methods [23], [58]; 2) better scalability since t…”
BackgroundMethodInfluentialSelf-citationdiscovRE: Efficient Cross-Architecture Identification of Bugs in Binary Code
Eschweiler, S., Yakdan, K., & Gerhards-Padilla, E. (2016) · Proceedings 2016 Network and Distributed System Security Symposium · doi:10.14722/ndss.2016.23185 · Cited by 302
REGAL: Representation Learning-based Graph Alignment
Heimann, M., Shen, H., Safavi, T., & Koutra, D. (2018) · Proceedings of the 27th ACM International Conference on Information and Knowledge Management · doi:10.1145/3269206.3271788 · Cited by 257 · cited 1×
“REGAL [32] also performs factorization with node features.”
MethodBinHunt: Automatically Finding Semantic Differences in Binary Programs
Gao, D., Reiter, M. K., & Song, D. (2008) · Lecture Notes in Computer Science · doi:10.1007/978-3-540-88625-9_16 · Cited by 255 · cited 2×
“Other static analysis based techniques perform matching on the generated control and data flow graphs [25], [30], [49], [27] or decompose the graphs into fragments [20], [17], [18], [40] for similarity detection.”
MethodBinGo: cross-architecture cross-OS binary search
Chandramohan, M., Xue, Y., Xu, Z., Liu, Y., Cho, C. Y., & Tan, H. B. K. (2016) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/2950290.2950350 · Cited by 254 · cited 1×
“BinGo [14] performs selective function inlining and extracts partial traces for function similarity detection.”
Backgroundnode2vec: Scalable Feature Learning for Networks
Grover, A., & Leskovec, J. (2016) · PubMed · doi:10.48550/arxiv.1607.00653 · Cited by 229 · cited 1×
“DeepWalk [48] is proposed to learn latent representations of nodes in a graph using local information from truncated uniform random walks. node2vec [31] specifically designs a biased random walk procedure that efficiently explores diverse neighborhoods of a node to learn continuous feature…”
BackgroundSAFE: Self-Attentive Function Embeddings for Binary Similarity
Massarelli, L., Di Luna, G. A., Petroni, F., Baldoni, R., & Querzoni, L. (2019) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-22038-9_15 · Cited by 224
Luo, L., Ming, J., Wu, D., Liu, P., & Zhu, S. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635900 · Cited by 220 · cited 3×
“…it has enabled many critical security usages in various scenarios when program-wide analysis is required, such as changed parts locating [1], malware analysis [28], [45], security patch analysis [55], [38], binary wide plagiarism detection [40] and patch-based exploit generation [11].”
BackgroundMethodSPAIN: Security Patch Analysis for Binaries towards Understanding the Pain and Pills
Xu, Z., Chen, B., Chandramohan, M., Liu, Y., & Song, F. (2017) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2017.49 · Cited by 217 · cited 2×
“…it has enabled many critical security usages in various scenarios when program-wide analysis is required, such as changed parts locating [1], malware analysis [28], [45], security patch analysis [55], [38], binary wide plagiarism detection [40] and patch-based exploit generation [11].”
BackgroundAEG: Automatic Exploit Generation
Avgerinos, T., Kil, S., Hao, B. L. T., & Brumley, D. (2018) · doi:10.1184/r1/6468296 · Cited by 202
αDiff: cross-version binary code similarity detection with DNN
Liu, B., Huo, W., Zhang, C., Li, W., Li, F., Piao, A., & Zou, W. (2018) · Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/3238147.3238199 · Cited by 192 · cited 3×
“αDiff [39] uses a similar Siamese network with CNN to generate function embeddings.”
BackgroundMethodTracelet-based code search in executables
David, Y., & Yahav, E. (2014) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/2594291.2594343 · Cited by 191 · cited 2×
“To avoid heavy graph matching, Tracelet [20] converts CFGs into a number of paths with fixed-length called tracelets and then matches them via rewriting.”
MethodBlanket Execution: Dynamic Similarity Testing for Program Binaries and Components
Egele, M., Woo, M., Chapman, P., & Brumley, D. (2014) · KiltHub Repository · doi:10.1184/r1/6468446 · Cited by 187
Parallel matrix factorization for recommender systems
Yu, H., Hsieh, C., Si, S., & Dhillon, I. S. (2013) · Knowledge and Information Systems · doi:10.1007/s10115-013-0682-2 · Cited by 163
BinSIM: Trace-based semantic binary diffing via system call sliced segment equivalence checking
Ming, J., Xu, D., Jiang, Y., & Wu, D. (2017) · USENIX Security Symposium · Cited by 153
Similarity of binaries through re-optimization
David, Y., Partush, N., & Yahav, E. (2017) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/3062341.3062387 · Cited by 147 · cited 2×
“Other static analysis based techniques perform matching on the generated control and data flow graphs [25], [30], [49], [27] or decompose the graphs into fragments [20], [17], [18], [40] for similarity detection.”
MethodStatistical similarity of binaries
David, Y., Partush, N., & Yahav, E. (2016) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/2908080.2908126 · Cited by 144 · cited 2×
“Esh [17] decomposes the functions into data-flow dependent segments named strands and uses statistical reasoning to calculate similarities.”
BackgroundMethodiBinHunt: Binary Hunting with Inter-procedural Control Flow
Ming, J., Pan, M., & Gao, D. (2013) · Lecture notes in computer science · doi:10.1007/978-3-642-37682-5_8 · Cited by 133 · cited 2×
“These techniques carry out the analysis by directly executing the given code [26], [53], performing dynamic slicing [44] or tainting [43] on the given binaries, and checking the semantic level equivalence based on the information collected during the execution.”
BackgroundMethodIn-memory fuzzing for binary code similarity analysis
Wang, S., & Wu, D. (2017) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2017.8115645 · Cited by 94 · cited 1×
“These techniques carry out the analysis by directly executing the given code [26], [53], performing dynamic slicing [44] or tainting [43] on the given binaries, and checking the semantic level equivalence based on the information collected during the execution.”
MethodBinClone: Detecting Code Clones in Malware
Farhadi, M. R., Fung, B. C. M., Charland, P., & Debbabi, M. (2014) · IEEE International Conference on Software Security and Reliability Companion · doi:10.1109/sere.2014.21 · Cited by 76 · cited 1×
“…it has enabled many critical security usages in various scenarios when program-wide analysis is required, such as changed parts locating [1], malware analysis [28], [45], security patch analysis [55], [38], binary wide plagiarism detection [40] and patch-based exploit generation [11].”
BackgroundMemoized Semantics-Based Binary Diffing with Application to Malware Lineage Inference
Ming, J., Xu, D., & Wu, D. (2015) · IFIP advances in information and communication technology · doi:10.1007/978-3-319-18467-8_28 · Cited by 47 · cited 1×
“Because of the precision and fine-granularity, it has enabled many critical security usages in various scenarios when program-wide analysis is required, such as changed parts locating [1], malware analysis [28], [45], security patch analysis [55], [38], binary wide plagiarism detection [40] and patch-based exploit gen…”
BackgroundBinDNN: Resilient Function Matching Using Deep Learning
Lageman, N., Kilmer, E. D., Walls, R. J., & McDaniel, P. D. (2017) · Lecture notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering · doi:10.1007/978-3-319-59608-2_29 · Cited by 16 · cited 2×
“Most of the current techniques conduct diffing at a granularity of functions [29], [54], [36], [23], [39].”
BackgroundChen, T., Wang, Z., Li, L., Li, D., Li, Z., Chang, X., Bian, P., Liang, G., Wang, Q., & Xie, T. (2025) · Schloss Dagstuhl – Leibniz-Zentrum für Informatik · doi:10.4230/lipics.ecoop.2025.6
Cited by
jTrans: jump-aware transformer for binary code similarity detection
Wang, H., Qu, W., Katz, G., Zhu, W., Gao, Z., Qiu, H., Zhuge, J., & Zhang, C. (2022) · Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3533767.3534367 · Cited by 169
“Other approaches [14, 15, 40, 43, 51, 61, 63] neglect some or all of the structural information of binary functions, as they do not use the control-flow information, or generate instruction sequences with CFG using random walk.”
MethodThe Threat of Offensive AI to Organizations
Mirsky, Y., Demontis, A., Kotak, J., Shankar, R., Gelei, D., Yang, L., Zhang, X., Pintor, M., Lee, W., Elovici, Y., et al. (2023) · Computers & Security · doi:10.1016/j.cose.2022.103006 · Cited by 97
Metadata
- Authors
- Duan, Y., Li, X., Wang, J., & Yin, H.
- Venue
- Proceedings 2020 Network and Distributed System Security Symposium
- Publisher
- Internet Society
- Published
- 2020
- OpenAlex
- W3007413911
- Cited by
- 184
- References
- 42
- FWCI
- 19.65
- Type
- conference paper
- Language
- en
- Open access
- bronze
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.