一句话:提出 ModX,通过程序模块化与句法/语义特征度量,在细粒度模块层面检测完全与部分引入的第三方库。
随着第三方库(TPL)被广泛复用,如何管理大规模库及其在宿主软件中的使用成为难题。已有 TPL 检测方法多依赖句法特征,一旦特征被修改或对抗性隐藏便失效,且通常把每个导入库视为整体,无法处理宿主软件只使用库中部分代码的情形。为此,作者提出 ModX 框架,利用新的程序模块化技术将程序分解为细粒度、基于功能的模块,并同时抽取句法与语义特征,通过度量模块之间的距离来识别程序中相似的库模块复用,从而在语义层面同时支持完全导入与部分导入的 TPL 检测。实验表明,ModX 相较其他模块化工具能划分出更内聚的程序模块,模块质量得分高出 353%;在 TPL 检测任务上,其精度平均优于其他工具 17%,召回率平均优于 8%。
With the rapid growth of software, using third-party libraries (TPLs) has become increasingly popular. The prosperity of the library us-age has provided the software engineers with a handful of methods to facilitate and boost the program development. Unfortunately, it also poses great challenges as it becomes much more difficult to manage the large volume of libraries. Researches and studies have been proposed to detect and understand the TPLs in the soft-ware. However, most existing approaches rely on syntactic features, which are not robust when these features are changed or deliber-ately hidden by the adversarial parties. Moreover, these approaches typically model each of the imported libraries as a whole, there-fore, cannot be applied to scenarios where the host software only partially uses the library code segments. To detect both fully and partially imported TPLs at the semantic level, we propose Modx, a framework that leverages novel program modularization techniques to decompose the program into fine-grained functionality-based modules. By extracting both syntactic and semantic features, it measures the distance between modules to detect similar library module reuse in the program. Experimental results show that Modx outperforms other modularization tools by distinguishing more coherent program modules with 353% higher module quality scores and beats other TPL detection tools with on average 17% better in precision and 8% better in recall.