LibAM: An Area Matching Framework for Detecting Third-Party Libraries in Binaries
ACM Transactions on Software Engineering and Methodology · 29.02.2024 · 33 (2) · 1-35
DOI: 10.1145/3625294 ↗Kurz gefasst
Fachartikel in der Zeitschrift ACM Transactions on Software Engineering and Methodology, online erschienen am 23.12.2023. Verfasst von Siyuan Li und 10 weiteren Autor:innen. Die Arbeit wurde bisher 33-mal zitiert (Crossref) und nennt 56 Literaturangaben. Gefördert von: National Key Research and Development Program of China, National Natural Science Youth Foundation, National Natural Science Foundation of China.
Abstract (Originalsprache)
Third-party libraries (TPLs) are extensively utilized by developers to expedite the software development process and incorporate external functionalities. Nevertheless, insecure TPL reuse can lead to significant security risks. Existing methods, which involve extracting strings or conducting function matching, are employed to determine the presence of TPL code in the target binary. However, these methods often yield unsatisfactory results due to the recurrence of strings and the presence of numerous similar non-homologous functions. Furthermore, the variation in C/C++ binaries across different optimization options and architectures exacerbates the problem. Additionally, existing approaches struggle to identify specific pieces of reused code in the target binary, complicating the detection of complex reuse relationships and impeding downstream tasks. And, we call this issue the poor interpretability of TPL detection results. In this article, we observe that TPL reuse typically involves not just isolated functions but also areas encompassing several adjacent functions on the Function Call Graph (FCG). We introduce LibAM, a novel Area Matching framework that connects isolated functions into function areas on FCG and detects TPLs by comparing the similarity of these function areas, significantly mitigating the impact of different optimization options and architectures. Furthermore, LibAM is the first approach capable of detecting the exact reuse areas on FCG and offering substantial benefits for downstream tasks. To validate our approach, we compile the first TPL detection dataset for C/C++ binaries across various optimization options and architectures. Experimental results demonstrate that LibAM outperforms all existing TPL detection methods and provides interpretable evidence for TPL detection results by identifying exact reuse areas. We also evaluate LibAM’s scalability on large-scale, real-world binaries in IoT firmware and generate a list of potential vulnerabilities for these devices. Our experiments indicate that the Area Matching framework performs exceptionally well in the TPL detection task and holds promise for other binary similarity analysis tasks. Last but not least, by analyzing the detection results of IoT firmware, we make several interesting findings, for instance, different target binaries always tend to reuse the same code area of TPL. The datasets and source code used in this article are available at https://github.com/Siyuan-Li201/LibAM .
Förderung
- National Key Research and Development Program of China
- National Natural Science Youth Foundation
- National Natural Science Foundation of China
Zitieren
APA
Li, S., Wang, Y., Dong, C., Yang, S., Li, H., Sun, H., Lang, Z., Chen, Z., Wang, W., Zhu, H., & Sun, L. (2024). LibAM: An Area Matching Framework for Detecting Third-Party Libraries in Binaries. ACM Transactions on Software Engineering and Methodology, 33(2), 1-35. https://doi.org/10.1145/3625294
Vancouver
Li S, Wang Y, Dong C, Yang S, Li H, Sun H, et al. LibAM: An Area Matching Framework for Detecting Third-Party Libraries in Binaries. ACM Transactions on Software Engineering and Methodology. 2024;33(2):1-35. doi:10.1145/3625294
BibTeX
@article{Li2024,
author = {Li, Siyuan and Wang, Yongpan and Dong, Chaopeng and Yang, Shouguo and Li, Hong and Sun, Hao and Lang, Zhe and Chen, Zuxin and Wang, Weijie and Zhu, Hongsong and Sun, Limin},
title = {LibAM: An Area Matching Framework for Detecting Third-Party Libraries in Binaries},
journal = {ACM Transactions on Software Engineering and Methodology},
year = {2024},
volume = {33},
number = {2},
pages = {1--35},
doi = {10.1145/3625294}
}
EUVIMED