paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An Empirical Study of Malicious Code In PyPI Ecosystem

PyPI 生态系统中恶意代码的实证研究
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 1/10 · 该论文是 PyPI 恶意代码的实证安全研究,核心在软件供应链安全、恶意包行为与生命周期,不涉及用户关注的静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析或 LLM 与这些方向的交叉。引用 100 inbox
Wenbo Guo, Zhengzi Xu, Chengwei Liu, Cheng Huang, Yong Fang, Yang Liu
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:通过构建多源数据集,系统揭示 PyPI 恶意包的行为特征、攻击向量与生命周期,并评估其持续风险。

PyPI 的便利性伴随恶意包传播风险,开发者常将恶意包伪装为正常包。本文构建自动化数据收集框架,整理出来自多源的 4,669 个恶意包文件数据集,并基于行为特征将其初步分为五类。研究发现,超过 50% 的恶意代码具有多种恶意行为,信息窃取与命令执行尤为普遍,还观察到若干新型攻击向量与反检测技术。74.81% 的恶意包通过源码安装进入终端用户项目,增加安全风险;现实调查显示大量已举报恶意包仍长期存在于全球 PyPI 镜像服务器中,超过 72% 在被发现后保留较长时间。最后刻画了 PyPI 生态中恶意代码生命周期画像,并提出缓解建议。

问题
PyPI 生态中恶意包伪装与传播严重威胁终端用户,但恶意代码的行为特征、攻击向量及生命周期缺乏系统认识。
方法
构建自动化数据收集框架,汇总多源恶意包数据集,按行为特征分类,并结合现实调查分析安装与镜像留存情况。
评估
基于 4,669 个恶意包文件进行实证分析,发现多行为、信息窃取/命令执行、新攻击向量、74.81% 源码安装进入用户项目及镜像长期留存等结果。
原文摘要(Abstract)

PyPI provides a convenient and accessible package management platform to developers, enabling them to quickly implement specific functions and improve work efficiency. However, the rapid development of the PyPI ecosystem has led to a severe problem of malicious package propagation. Malicious developers disguise malicious packages as normal, posing a significant security risk to end-users. To this end, we conducted an empirical study to understand the characteristics and current state of the malicious code lifecycle in the PyPI ecosystem. We first built an automated data collection framework and collated a multi-source malicious code dataset containing 4,669 malicious package files. We preliminarily classified these malicious code into five categories based on malicious behaviour characteristics. Our research found that over 50 % of malicious code exhibits multiple malicious behaviours, with information stealing and command execution being particularly prevalent. In addition, we observed several novel attack vectors and anti-detection techniques. Our analysis revealed that 74.81 % of all malicious packages successfully entered end-user projects through source code installation, thereby increasing security risks. A real-world investigation showed that many reported malicious packages persist in PyPI mirror servers globally, with over 72 % remaining for an extended period after being discovered. Finally, we sketched a portrait of the malicious code lifecycle in the PyPI ecosystem, effectively reflecting the characteristics of malicious code at different stages. We also present some suggested mitigations to improve the security of the Python open-source ecosystem.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{GuoXLHFL23,
  title = {An Empirical Study of Malicious Code In PyPI Ecosystem},
  author = {Wenbo Guo and Zhengzi Xu and Chengwei Liu and Cheng Huang and Yong Fang and Yang Liu},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00135}
}