arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.02753cs.SEcs.CR
收藏

漏洞是否威胁我们的项目?面向第三方库的自动化漏洞 API 检测

Does the Vulnerability Threaten Our Projects? Automated Vulnerable API Detection for Third-Party Libraries

Fangyuan Zhang, Lingling Fan, Sen Chen, Miaoying Cai, Sihan Xu, Lida Zhao

AI总结:

本文提出 VAScanner,通过补丁筛选与增强机制识别漏洞根方法,并结合后向调用图分析检测 Java 项目实际使用的第三方库漏洞 API,显著降低误报和漏报。

摘要:

开发者通常使用第三方库(TPLs)来促进项目开发,避免重复造轮子,然而存在漏洞的第三方库确实会带来严重的安全威胁。现有研究大多只考虑项目是否使用了存在漏洞的第三方库,而忽略了第三方库中的漏洞代码是否真正被项目所使用,这不可避免地导致误报,并进一步带来额外的补丁工作和维护成本。为了解决这一问题,我们提出了 VAScanner,它能够有效识别第三方库中导致漏洞的漏洞根方法,并进一步识别 Java 项目所使用的第三方库的全部漏洞 API。具体来说,我们首先从补丁提交中收集初始补丁方法,并通过一种与补丁无关的筛选机制提取准确的补丁方法,然后我们进一步通过一种增强机制为每个漏洞识别漏洞根方法。在此基础上,我们利用后向调用图分析来识别每个存在漏洞的第三方库版本的全部漏洞 API,并构建了一个数据库,该数据库包含来自 362 个第三方库、14,775 个版本的 90,749 个(含库版本则为 2,410,779 个)漏洞 API,误报比例为 1.45%,95% 置信区间为 [1.31%, 1.59%]。我们的实验表明,由于所提出的筛选机制和增强机制,VAScanner 消除了 5.78% 的误报和 2.16% 的漏报。此外,在分析直接依赖方面,它优于最先进的方法级工具 Eclipse Steady,实现了更有效的漏洞 API 检测。进一步地,在对 3,147 个使用存在漏洞的第三方库的项目进行大规模分析时,我们发现只有 21.51% 的项目(误报比例为 1.83%,95% 置信区间为 [0.71%, 4.61%])通过漏洞 API 受到存在漏洞的第三方库的威胁,这表明 VAScanner 可以显著减少误报。

英文摘要:

Developers usually use TPLs to facilitate the development of the projects to avoid reinventing the wheels, however, the vulnerable TPLs indeed cause severe security threats. The majority of existing research only considered whether projects used vulnerable TPLs but neglected whether the vulnerable code of the TPLs was indeed used by the projects, which inevitably results in false positives and further requires additional patching efforts and maintenance costs. To address this, we propose VAScanner, which can effectively identify vulnerable root methods causing vulnerabilities in TPLs and further identify all vulnerable APIs of TPLs used by Java projects. Specifically, we first collect the initial patch methods from the patch commits and extract accurate patch methods by employing a patch-unrelated sifting mechanism, then we further identify the vulnerable root methods for each vulnerability by employing an augmentation mechanism. Based on them, we leverage backward call graph analysis to identify all vulnerable APIs for each vulnerable TPL version and construct a database consisting of 90,749 (2,410,779 with library versions) vulnerable APIs with 1.45% false positive proportion with a 95% CI of [1.31%, 1.59%] from 362 TPLs with 14,775 versions. Our experiments show VAScanner eliminates 5.78% false positives and 2.16% false negatives owing to the proposed sifting and augmentation mechanisms. Besides, it outperforms the state-of-the-art method-level tool in analyzing direct dependencies, Eclipse Steady, achieving more effective detection of vulnerable APIs. Furthermore, in a large-scale analysis of 3,147 projects using vulnerable TPLs, we find only 21.51% of projects (with 1.83% false positive proportion and a 95% CI of [0.71%, 4.61%]) were threatened through vulnerable APIs by vulnerable TPLs, demonstrating that VAScanner can potentially reduce false positives significantly.

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

↑