Proceedings

BinMetric: A Comprehensive Binary Code Analysis Benchmark for Large Language Models

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 7715-7723.

https://doi.org/10.24963/ijcai.2025/858

Abstract

Binary analysis is crucial for software security, offering insights into compiled programs without source code. As large language models (LLMs) excel in language tasks, their potential for complex decoding binary data structures is growing. However, the lack of standardized benchmarks hinders their evaluation and progress in this domain.

To bridge this gap, we introduce BinMetric, a first comprehensive benchmark designed specifically to evaluate LLMs performance on binary analysis tasks. BinMetric comprises 1,000 questions derived from 20 real-world open-source projects across 6 practical binary analysis tasks, including decompilation, code summarization, etc., which reflect actual reverse engineering scenarios. Our empirical study on this benchmark investigates various state-of-the-art LLMs, revealing their strengths and limitations. The findings indicate that while LLMs show strong potential, challenges still exist, particularly in the areas of precise binary lifting and assembly synthesis. In summary, BinMetric makes a significant step forward in measuring binary analysis capabilities of LLMs, establishing a new benchmark leaderboard, and our study offers valuable insights for advancing LLMs in software security.

  1. BinMetric Overall Score GPT-4 GPT-3.5-Turbo CodeLlama-34B WizardCoder-33B Mistral-8x7B DeepSeekCoder-33B DeepSeekCoder-7B Mistral-7B WizardCoder-15B CodeLlama-7B DeepSeek-7B Llama2-7B Avg:27.46 Avg:22.93
  2. [Achiam et al., 2023] Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Alt- man, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
  3. [Al-Kaswan et al., 2023] Ali Al-Kaswan, Toufique Ahmed, Maliheh Izadi, Anand Ashok Sawant, Premkumar De- vanbu, and Arie van Deursen. Extending source code pre- trained language models to summarise decompiled binarie. In 2023 IEEE International Conference on Software Anal- ysis, Evolution and Reengineering (SANER), pages 260- 271. IEEE, 2023.
  4. [C-Algorithms, 2024] C-Algorithms. https://github.com/ TheAlgorithms/C, 2024. Link
  5. [Chen et al., 2021] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
  6. [Chen et al., 2022] Qibin Chen, Jeremy Lacomis, Edward J Schwartz, Claire Le Goues, Graham Neubig, and Bogdan Vasilescu. Augmenting decompiler output with learned variable names and types. In 31st USENIX Security Sym- posium (USENIX Security 22), pages 4327-4343, 2022.
  7. [Dai et al., 2022] Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Shuming Ma, Zhifang Sui, and Furu Wei. Why can gpt learn in-context? language models implicitly per- form gradient descent as meta-optimizers. arXiv preprint arXiv:2212.10559, 2022.
  8. [David et al., 2020] Yaniv David, Uri Alon, and Eran Yahav. Neural reverse engineering of stripped binaries using aug- mented control flow graphs. Proceedings of the ACM on Programming Languages, 4(OOPSLA):1-28, 2020.
  9. [EvalPlus, 2024] EvalPlus. https://evalplus.github.io/ leaderboard.html, 2024. Link
  10. [for Standardization, 2011] International Organization for Standardization. Systems and Software Engineering: Sys- tems and Software Quality Requirements and Evaluation (SQuaRE): System and Software Quality Models. ISO, 2011.
  11. [Gao et al., 2023] Zeyu Gao, Hao Wang, Yuchen Zhou, Wenyu Zhu, and Chao Zhang. How far have we gone in vulnerability detection using large language models. arXiv preprint arXiv:2311.12420, 2023.
  12. [Guo et al., 2024] Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y Wu, YK Li, et al. Deepseek-coder: When the large language model meets programming-the rise of code intelligence. arXiv preprint arXiv:2401.14196, 2024.
  13. [Heimann, 2014] D Heimann. Ieee standard 730-2014 soft- ware quality assurance processes. IEEE Computer Society, New York, NY, USA, IEEE Std, 730:2014, 2014.
  14. [Hex-RaysSA, 2024] Hex-RaysSA. "ida pro". https://www. hex-rays.com/products/ida, 2024. [International, 2010] Link
  15. I. UNIX International. Dwarf debug- ging information format version 4. https://dwarfstd.org/ doc/DWARF4.pdf, 2010. Link
  16. [Jiang et al., 2023] Nan Jiang, Kevin Liu, Thibaud Lutellier, and Lin Tan. Impact of code language models on auto- mated program repair. In 2023 IEEE/ACM 45th Interna- tional Conference on Software Engineering (ICSE), pages 1430-1442. IEEE, 2023.
  17. [Jiang et al., 2024] Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. Mixtral of ex- perts. arXiv preprint arXiv:2401.04088, 2024.
  18. [Jin et al., 2022] Xin Jin, Kexin Pei, Jun Yeon Won, and Zhiqiang Lin. Symlm: Predicting function names in stripped binaries via context-sensitive execution-aware code embeddings. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security, pages 1631-1645, 2022.
  19. [Jin et al., 2023] Xin Jin, Jonathan Larson, Weiwei Yang, and Zhiqiang Lin. Binary code summarization: Bench- marking chatgpt/gpt-4 and other large language models. arXiv preprint arXiv:2312.09601, 2023.
  20. [Just et al., 2014] René Just, Darioush Jalali, and Michael D Ernst. Defects4j: A database of existing faults to enable controlled testing studies for java programs. In Proceed- ings of the 2014 international symposium on software test- ing and analysis, pages 437-440, 2014.
  21. [Kong et al., 2023] Aobo Kong, Shiwan Zhao, Hao Chen, Qicheng Li, Yong Qin, Ruiqi Sun, and Xin Zhou. Bet- ter zero-shot reasoning with role-play prompting. arXiv preprint arXiv:2308.07702, 2023.
  22. [Lavie and Denkowski, 2009] Alon Lavie and Michael J. Denkowski. The meteor metric for automatic eval- uation of machine translation. Machine Translation, 23(2-3):105-115, sep 2009.
  23. [Lin, 2004] Chin-Yew Lin. ROUGE: A package for auto- matic evaluation of summaries. In Text Summarization Branches Out, pages 74-81, Barcelona, Spain, 2004. As- sociation for Computational Linguistics.
  24. [LLVM, 2024] LLVM. "clang static analyzer". https:// clang-analyzer.llvm.org/, 2024. Link
  25. [Maletic and Collard, 2015] Jonathan I. Maletic and Michael L. Collard. Exploration, analysis, and manipula- tion of source code using srcml. In 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, volume 2, pages 951-952, 2015.
  26. [Nguyen Hung et al., 2023] Thinh Nguyen Hung, Hai Nguyen Phuc, Khoa Tran Dinh, Nhan Le Tran Thanh, Nghia To Trong, Khoa Ngo Khanh, Duy Phan The, and Hau Pham Van. Binary representation embedding and deep learning for binary code similarity detection in software security domain. In Proceedings of the 12th International Symposium on Information and Communication Technology, pages 785-792, 2023.
  27. [of Standards and (NIST), 2023] National Institute of Stan- dards and Technology (NIST). Trustworthy and respon- sible ai., 2023.
  28. [Ouyang et al., 2022] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instruc- tions with human feedback. Advances in neural informa- tion processing systems, 35:27730-27744, 2022.
  29. [Papineni et al., 2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for au- tomatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Compu- tational Linguistics, pages 311-318, Philadelphia, Penn- sylvania, USA, 2002. Association for Computational Lin- guistics.
  30. [Ren et al., 2020] Shuo Ren, Daya Guo, Shuai Lu, Long Zhou, Shujie Liu, Duyu Tang, Neel Sundaresan, Ming Zhou, Ambrosio Blanco, and Shuai Ma. Codebleu: a method for automatic evaluation of code synthesis. arXiv preprint arXiv:2009.10297, 2020.
  31. [Roziere et al., 2023] Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950, 2023.
  32. [Sawada et al., 2023] Tomohiro Sawada, Daniel Paleka, Alexander Havrilla, Pranav Tadepalli, Paula Vidas, Alexander Kranias, John J Nay, Kshitij Gupta, and Aran Komatsuzaki. Arb: Advanced reasoning benchmark for large language models. arXiv preprint arXiv:2307.13692, 2023.
  33. [Sutherland et al., 2006] Iain Sutherland, George E Kalb, Andrew Blyth, and Gaius Mulley. An empirical exami- nation of the reverse engineering process for binary files. Computers & Security, 25(3):221-228, 2006.
  34. [Tan et al., 2024a] Hanzhuo Tan, Qi Luo, Jing Li, and Yuqun Zhang. Llm4decompile: Decompiling binary code with large language models. arXiv preprint arXiv:2403.05286, 2024.
  35. [Tan et al., 2024b] Zhen Tan, Alimohammad Beigi, Song Wang, Ruocheng Guo, Amrita Bhattacharjee, Bohan Jiang, Mansooreh Karami, Jundong Li, Lu Cheng, and Huan Liu. Large language models for data annotation: A survey. arXiv preprint arXiv:2402.13446, 2024.
  36. [Touvron et al., 2023] Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
  37. [Wei et al., 2023] Yuxiang Wei, Chunqiu Steven Xia, and Lingming Zhang. Copiloting the copilots: Fusing large language models with completion engines for automated program repair. In Proceedings of the 31st ACM Joint Eu- ropean Software Engineering Conference and Symposium on the Foundations of Software Engineering, pages 172- 184, 2023.
  38. [Xiong et al., 2023] Jiaqi Xiong, Guoqiang Chen, Kejiang Chen, Han Gao, Shaoyin Cheng, and Weiming Zhang. Hext5: Unified pre-training for stripped binary code infor- mation inference. In 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 774-786. IEEE, 2023.
  39. [Xu et al., 2017] Zhengzi Xu, Bihuan Chen, Mahinthan Chandramohan, Yang Liu, and Fu Song. Spain: secu- rity patch analysis for binaries towards understanding the pain and pills. In 2017 IEEE/ACM 39th International Con- ference on Software Engineering (ICSE), pages 462-472. IEEE, 2017.
  40. [Zeng et al., 2024] Zhengran Zeng, Yidong Wang, Rui Xie, Wei Ye, and Shikun Zhang. Coderujb: An executable and unified java benchmark for practical programming scenar- ios. arXiv preprint arXiv:2403.19287, 2024.
  41. [Zhang et al., 2021] Zhuo Zhang, Wei You, Guanhong Tao, Yousra Aafer, Xuwei Liu, and Xiangyu Zhang. Stochfuzz: Sound and cost-effective fuzzing of stripped binaries by incremental and stochastic rewriting. In 2021 IEEE Sym- posium on Security and Privacy (SP), pages 659-676. IEEE, 2021.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards