journal article·2022-12-28Open access

BBDetector: A Precise and Scalable Third-Party Library Detection in Binary Executables with Fine-Grained Function-Level Features

Xiaoya Zhu, Junfeng Wang, Zhiyang Fang, Xiaokang Yin, Shengli Liu

Applied Sciences· Volume 13· Issue 1

Abstract

Third-party library (TPL) reuse may introduce vulnerable or malicious code and expose the software, which exposes them to potential risks. Thus, it is essential to identify third-party dependencies and take immediate corrective action to fix critical vulnerabilities when a damaged reusable component is found or reported. However, most of the existing methods only rely on syntactic features, which results in low recognition accuracy and significantly discounts the detection performance by obfuscation techniques. In addition, a few semantic-based approaches face the efficiency problem. To resolve these problems, we propose and implement a more precise and scalable TPL detection method BBDetector. In addition to syntactic features, we consider the rich function-level semantic features and form a feature vector for each function. Moreover, we design a scalable function vector similarity search method to identify anchor functions and the candidate libraries, based upon which we carry out TPL detection. The experiment results demonstrate that BBDetector outperforms B2SFinder and ModX in terms of effectiveness, efficiency, and obfuscation-resilient capability. For the nix binaries, the F1-score of BBDetector is 1.11% and 11.21% higher than that of ModX and B2SFinder, respectively. Moreover, for the Ubuntu binaries, the F1-score of BBDetector is 1.32% and 14.93% is higher than that of ModX and B2SFinder, respectively. And in terms of efficiency, the detection time of BBDetector is only 30.02% of ModX. Besides, for the obfuscation-resilient capability, BBDetector is much stronger than B2SFinder. BBDetector achieves a F1-score of 71%, slightly lower than the F1-score of 77% achieved with the non-obfuscated binary programs. However, B2SFinder only achieves an F1-score of 28%, much lower than that of 67% achieved with the non-obfuscated binary programs.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Malware Detection Techniques · Software Engineering Research · Web Application Security Vulnerabilities

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou 450001, China

College of Computer Science, Sichuan University, Chengdu 610065, China

School of Cyber Science and Engineering, Sichuan University, Chengdu 610207, China

Funding

Foundation Strengthening Key Project of the Science & Technology Commission · National Key Research and Development Program · National Natural Science Foundation of China · Basic Research Program of China · Sichuan Youth Science and Technology Innovation Team

References (25)

Show source-provided references
1. (2022, October 06). 2021 State of the Software Supply Chain. Available online: https://www.sonatype.com/resources/state-of-the-software-supply-chain-2021.
2. (2022, October 06). Kaseya VSA Ransomware Attack. Available online: https://helpdesk.kaseya.com/hc/en-gb/articles/4403584098961-Incident-Overview-Technical-Details.
3. (2022, October 06). Popular NPM Library Hijacked to Install Password-Stealers, Miners. Available online: https://www.bleepingcomputer.com/news/security/popular-npm-library-hijacked-to-install-password-stealers-miners/.
4. Hemel, A., Kalleberg, K.T., Vermaas, R., and Dolstra, E. (2011, January 21–28). Finding Software License Violations through Binary Code Clone Detection. Proceedings of the 8th International Working Conference on Mining Software Repositories, MSR 2011, Waikiki, Honolulu, HI, USA.10.1145/1985441.1985453 ↗
5. Duan, R., Bijlani, A., Meng, X., Kim, T., and Lee, W. (November, January 30). Identifying open-source license violation and 1-day security risk at large scale. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, Dallas, TX, USA.10.1145/3133956.3134048 ↗
6. Tang, W., Chen, D., and Luo, P. (2018, January 4–7). BCFinder: A Lightweight and Platform-Independent Tool to Find Third-Party Components in Binaries. Proceedings of the 2018 25th Asia-Pacific Software Engineering Conference (APSEC), Nara, Japan.10.1109/APSEC.2018.00043 ↗
7. Yuan, Z., Xu, J., Piao, A., Xuey, J., and Yu, C. (2019, January 11–15). B2SFinder: Detecting Open-Source Software Reuse in COTS Software. Proceedings of the 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), San Diego, CA, USA.10.1109/ASE.2019.00100 ↗
8. Tang, W., Luo, P., Fu, J., and Zhang, D. (2020, January 18–21). LibDX: A Cross-Platform and Accurate System to Detect Third-Party Libraries in Binary Code. Proceedings of the 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER), Los Alamitos, CA, USA.10.1109/SANER48275.2020.9054845 ↗
9. B2SMatcher: Fine-Grained version identification of open-Source software in binary files10.1186/s42400-021-00085-7 ↗
10. Woo, S., Park, S., Kim, S., Lee, H., and Oh, H. (2021, January 22–30). CENTRIS: A Precise and Scalable Approach for Identifying Modified Open-Source Software Reuse. Proceedings of the 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), Madrid, Spain.10.1109/ICSE43902.2021.00083 ↗
11. Yang, C., Xu, Z., Chen, H., Liu, Y., Gong, X., and Liu, B. (2022, January 25–27). ModX: Binary Level Partially Imported Third-Party Library Detection via Program Modularization and Semantic Matching. Proceedings of the 2022 IEEE/ACM 44th International Conference on Software Engineering (ICSE), Pittsburgh, PA, USA.10.1145/3510003.3510627 ↗
12. Ding, S., Fung, B., and Charland, P. (2019, January 19–23). Asm2vec: Boosting static representation robustness for binary clone search against code obfuscation and compiler optimization. Proceedings of the 2019 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA.10.1109/SP.2019.00003 ↗
13. Dolstra, E., Visser, E. (2004, January 28). Imposing a memory management discipline on software deployment. Proceedings of the 26th International Conference on Software Engineering, Edinburgh, UK.
14. CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code10.1109/TSE.2002.1019480 ↗
15. Baxter, I.D., Yahin, A., Moura, L., Sant’Anna, M., and Bier, L. (1998, January 20–20). Clone detection using abstract syntax trees. Proceedings of the International Conference on Software Maintenance, Bethesda, MD, USA.
16. Shirani, P., Wang, L., and Debbabi, M. (2017, January 6–7). BinShape: Scalable and Robust Binary Library Function Identification Using Function Shape. Proceedings of the Detection of Intrusions and Malware, and Vulnerability Assessment, Bonn, Germany.10.1007/978-3-319-60876-1_14 ↗
17. Zhang, D., Luo, P., Tang, W., and Zhou, M. (2020, January 21–25). OSLDetector: Identifying open-source libraries through binary analysis. Proceedings of the 2020 35th IEEE/ACM International Conference on Automated Software Engineering (ASE), Melbourne, VIC, Australia.10.1145/3324884.3415303 ↗
18. Tang, W., Wang, Y., Zhang, H., Han, S., Luo, P., and Zhang, D. (2022, January 23–24). LibDB: An Effective and Efficient Framework for Detecting Third-Party Libraries in Binaries. Proceedings of the 2022 IEEE/ACM 19th International Conference on Mining Software Repositories (MSR), Pittsburgh, PA, USA.10.1145/3524842.3528442 ↗
19. (2022, October 06). Mobile Ads SDK. Available online: https://developers.google.cn/ad-manager/mobile-ads-sdk.
20. (2022, October 06). IDA Pro. Available online: https://www.hex-rays.com/products/ida/.
21. Product quantization for nearest neighbor search10.1109/TPAMI.2010.57 ↗
22. Billion-scale similarity search with GPUs10.1109/TBDATA.2019.2921572 ↗
23. Xu, X., Chang, L., Qian, F., Yin, H., and Song, D. (November, January 30). Neural network-based graph embedding for cross-platform binary code similarity detection. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, Dallas, TX, USA.10.1145/3133956.3134018 ↗
24. Massarelli, L., Di Luna, G.A., Petroni, F., Baldoni, R., and Querzoni, L. (2019, January 19–20). SAFE: Self-Attentive Function Embeddings for Binary Similarity. Proceedings of the 16th Conference on Detection of Intrusions and Malware & Vulnerability Assessment (DIMVA), Gothenburg, Sweden.10.1007/978-3-030-22038-9_15 ↗
25. (2022, September 16). Armariris. Available online: https://github.com/GoSSIP-SJTU/Armariris.