The popularity of Python has risen rapidly over the past 15 years. It is a major language in some of the most exciting technologies today. This popularity has led to a large ecosystem of third-party packages available via the pip package registry which hosts more than 200,000 packages. These third-party packages can be reused by simply importing the package after installing using package managers like pip. The ease of reuse of third-party software comes with security risks putting millions of users in danger. In this project, we study the ecosystem to analyze this threat. The mature ecosystem of Python has multiple weak spots that we highlight in our project. First, we demonstrate how trivial it is to exploit the Python ecosystem. Then, we systematically analyze dependencies amongst packages, maintainers, and publicly reported security issues. Most attacks are possible only if users install malicious packages. We thus try to analyze and evaluate different methods used by attackers to force incorrect downloads. We quantify your ideas by estimating the potential threat that can be caused by exploiting a popular Python package. We also discuss methods used in the industry to defend against such attacks
翻译:Python的受欢迎程度在过去15年中迅速提高,这是当今一些最令人兴奋的技术中的一种主要语言。这种受欢迎程度导致通过拥有20万多个包的pip 软件登记册提供第三方包的大型生态系统。这些第三方软件包可以在安装像pip这样的软件包管理员之后简单地进口软件包来再利用。第三方软件的容易再利用带来安全风险,使数百万用户面临危险。在这个项目中,我们研究生态系统来分析这一威胁。Python的成熟生态系统有许多弱点,我们在项目中强调这些弱点。首先,我们证明利用Python生态系统是多么微不足道。然后,我们系统地分析包、维护者和公开报道的安全问题之间的依赖性。大多数攻击只有在用户安装恶意软件包时才有可能。因此,我们试图分析和评估攻击者用来强迫错误下载的不同方法。我们通过估计利用流行的Python软件包可能带来的潜在威胁来量化你的想法。我们还讨论工业中用来防范这种攻击的方法。