arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.10232cs.CRcs.SE
收藏

LibDB:一个有效的二进制文件第三方库检测框架

LibDB: An Effective and Efficient Framework for Detecting Third-Party Libraries in Binaries

Wei Tang, Yanlin Wang, Hongyu Zhang, Shi Han, Ping Luo, Dongmei Zhang

摘要:

第三方库(TPL)在软件应用中被频繁地重用以降低开发成本。然而,它们也可能带来安全风险。已经提出了许多TPL检测方法来检测Android字节码或源代码中的TPL重用。本文的重点是检测TPL重用二进制代码,这是一个更具挑战性的任务。对于二进制形式的检测目标,库可以被编译并链接到单独的动态链接文件,或者被构建到包含多个库和项目特定代码的融合二进制文件中。这可能会导致可用的代码功能减少,并降低功能工程的有效性。在本文中,我们提出了一个二进制TPL重用检测框架,LibDB,它可以有效地和高效地检测进口的TPL,即使在剥离和融合的二进制文件。除了基本和粗粒度的特性(字符串字面量和导出的函数名),LibDB还将函数内容作为一种新的特性类型。它将二进制文件中的所有函数嵌入到经过训练的神经网络的低维表示中。进一步采用了基于函数调用图的比较方法,提高了检测的准确性。LibDB能够支持检测目标中包含的TPL的版本识别,这是现有检测方法所没有考虑的。为了评估LibDB的性能,我们构建了三个基于二进制的TPL重用检测数据集。实验结果表明,LibDB在二进制TPL检测任务和版本识别任务上比最先进的工具更准确和有效。我们在这项工作中使用的数据集和源代码可以在https://github.com/DeepSoftwareAnalytics/LibDB上匿名获得。

英文摘要:

Third-party libraries (TPLs) are reused frequently in software applications for reducing development cost. However, they could introduce security risks as well. Many TPL detection methods have been proposed to detect TPL reuse in Android bytecode or in source code. This paper focuses on detecting TPL reuse in binary code, which is a more challenging task. For a detection target in binary form, libraries may be compiled and linked to separate dynamic-link files or built into a fused binary that contains multiple libraries and project-specific code. This could result in fewer available code features and lower the effectiveness of feature engineering. In this paper, we propose a binary TPL reuse detection framework, LibDB, which can effectively and efficiently detect imported TPLs even in stripped and fused binaries. In addition to the basic and coarse-grained features (string literals and exported function names), LibDB utilizes function contents as a new type of feature. It embeds all functions in a binary file to low-dimensional representations with a trained neural network. It further adopts a function call graph-based comparison method to improve the accuracy of the detection. LibDB is able to support version identification of TPLs contained in the detection target, which is not considered by existing detection methods. To evaluate the performance of LibDB, we construct three datasets for binary-based TPL reuse detection. Our experimental results show that LibDB is more accurate and efficient than state-of-the-art tools on the binary TPL detection task and the version identification task. Our datasets and source code used in this work are anonymously available at https://github.com/DeepSoftwareAnalytics/LibDB.

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

↑