arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.09356cs.CRcs.SE
收藏

面向工业环境中开源软件供应链投毒攻击的鲁棒检测

Towards Robust Detection of Open Source Software Supply Chain Poisoning Attacks in Industry Environments

Xinyi Zheng, Chen Wei, Shenao Wang, Yanjie Zhao, Peiming Gao, Yuanchao Zhang, Kailong Wang, Haoyu Wang

AI总结:

针对 NPM 与 PyPI 供应链投毒,本文提出 OSCAR 动态检测流水线,结合沙箱执行、模糊测试和方面级行为监控,在工业部署中显著降低误报并发现大量恶意包。

摘要:

开源包生态系统(尤其是 NPM 和 PyPI)的指数级增长,导致软件供应链投毒攻击惊人增加。现有静态分析方法面临较高的误报率,并且容易被混淆和动态代码执行技术规避。尽管动态分析方法有所改进,但它们往往会捕获非包行为,并采用过于简单的测试策略,无法触发复杂的恶意行为。为应对这些挑战,我们提出 OSCAR,这是一个面向 NPM 和 PyPI 生态系统的鲁棒动态代码投毒检测流水线。OSCAR 在沙箱环境中完整执行软件包,对导出的函数和类采用模糊测试,并通过定制的 API hook 点实现基于方面的行为监控。我们使用包含真实恶意和良性软件包的综合基准数据集,将 OSCAR 与六种现有工具进行评估。OSCAR 在 NPM 上取得 0.95 的 F1 分数,在 PyPI 上取得 0.91 的 F1 分数,证实 OSCAR 与当前最先进技术同样有效。此外,对于表现出恶意软件包典型特征的良性软件包,与其他工具相比,OSCAR 在 NPM 中将误报率平均降低 32.06%(从 34.63% 降至 2.57%),在 PyPI 中平均降低 39.87%(从 41.10% 降至 1.23%),显著减少实际部署中的人工审查工作量。通过与领先金融科技公司蚂蚁集团合作,我们自 2023 年 1 月起将 OSCAR 部署在其 NPM 和 PyPI 镜像上,在 18 个月内识别出 10,404 个恶意 NPM 包和 1,235 个恶意 PyPI 包。本工作不仅弥合了代码投毒检测领域学术研究与工业应用之间的差距,还提供了一种已在真实工业环境中经过充分测试的鲁棒实用解决方案。

英文摘要:

The exponential growth of open-source package ecosystems, particularly NPM and PyPI, has led to an alarming increase in software supply chain poisoning attacks. Existing static analysis methods struggle with high false positive rates and are easily thwarted by obfuscation and dynamic code execution techniques. While dynamic analysis approaches offer improvements, they often suffer from capturing non-package behaviors and employing simplistic testing strategies that fail to trigger sophisticated malicious behaviors. To address these challenges, we present OSCAR, a robust dynamic code poisoning detection pipeline for NPM and PyPI ecosystems. OSCAR fully executes packages in a sandbox environment, employs fuzz testing on exported functions and classes, and implements aspect-based behavior monitoring with tailored API hook points. We evaluate OSCAR against six existing tools using a comprehensive benchmark dataset of real-world malicious and benign packages. OSCAR achieves an F1 score of 0.95 in NPM and 0.91 in PyPI, confirming that OSCAR is as effective as the current state-of-the-art technologies. Furthermore, for benign packages exhibiting characteristics typical of malicious packages, OSCAR reduces the false positive rate by an average of 32.06% in NPM (from 34.63% to 2.57%) and 39.87% in PyPI (from 41.10% to 1.23%), compared to other tools, significantly reducing the workload of manual reviews in real-world deployments. In cooperation with Ant Group, a leading financial technology company, we have deployed OSCAR on its NPM and PyPI mirrors since January 2023, identifying 10,404 malicious NPM packages and 1,235 malicious PyPI packages over 18 months. This work not only bridges the gap between academic research and industrial application in code poisoning detection but also provides a robust and practical solution that has been thoroughly tested in a real-world industrial setting.

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

↑