arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2305.04026cs.SEcs.CR
收藏

LibAM:一种用于检测二进制文件中第三方库的区域匹配框架

LibAM: An Area Matching Framework for Detecting Third-party Libraries in Binaries

Siyuan Li, Yongpan Wang, Chaopeng Dong, Shouguo Yang, Hong Li, Hao Sun, Zhe Lang, Zuxin Chen, Weijie Wang, Hongsong Zhu, Limin Sun

AI总结:

本文提出LibAM框架,通过在函数调用图上构建函数区域并比较相似性来检测第三方库复用,能精确定位复用区域,优于现有方法并助力下游漏洞分析。

摘要:

第三方库(TPLs)被开发者广泛使用,以加速软件开发过程并集成外部功能。然而,不安全的 TPL 复用可能导致显著的安全风险。现有方法通过提取字符串或进行函数匹配,被用于确定目标二进制文件中是否存在 TPL 代码。然而,由于字符串的重复出现以及大量相似的非同源函数的存在,这些方法往往产生不令人满意的结果。此外,它们难以识别目标二进制文件中复用的具体代码片段,这使得复杂复用关系的检测变得复杂,并阻碍了下游任务。在本文中,我们观察到 TPL 复用通常不仅涉及孤立的函数,还涉及函数调用图(FCG)上包含多个相邻函数的区域。我们提出了 LibAM,一种新颖的区域匹配框架,它将孤立的函数连接成 FCG 上的函数区域,并通过比较这些函数区域的相似性来检测 TPL。此外,LibAM 是第一种能够检测 FCG 上精确复用区域的方法,并为下游任务提供了实质性的好处。实验结果表明,LibAM 优于所有现有的 TPL 检测方法,并通过识别精确的复用区域为 TPL 检测结果提供了可解释的证据。我们还评估了 LibAM 在物联网固件中大规模真实世界二进制文件上的准确性,并为这些设备生成了潜在漏洞列表。最后,通过分析物联网固件的检测结果,我们得出了几个有趣的发现,例如不同的目标二进制文件总是倾向于复用 TPL 的相同代码区域。

英文摘要:

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 are employed to determine the presence of TPL code in the target binary. 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. Additionally, they struggle to identify specific pieces of reused code in the target binary, complicating the detection of complex reuse relationships and impeding downstream tasks. In this paper, 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. Furthermore, LibAM is the first approach capable of detecting the exact reuse areas on FCG and offering substantial benefits for downstream tasks. 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 accuracy on large-scale, real-world binaries in IoT firmware and generate a list of potential vulnerabilities for these devices. Last but not least, by analyzing the detection results of IoT firmware, we make several interesting findings, such as different target binaries always tend to reuse the same code area of TPL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑