SpellBound: Defending Against Package Typosquatting

03/06/2020
by   Matthew Taylor, et al.
1

Package managers for software repositories based on a single programming language are very common. Examples include npm (JavaScript), and PyPI (Python). These tools encourage code reuse, making it trivial for developers to import external packages. Unfortunately, repositories' size and the ease with which packages can be published facilitates the practice of typosquatting: the uploading of a package with name similar to that of a highly popular package, typically with the aim of capturing some of the popular package's installs. Typosquatting has serious negative implications, resulting in developers importing malicious packages, or – as we show – code clones which do not incorporate recent security updates. In order to tackle this problem, we present SpellBound, a tool for identifying and reporting potentially erroneous imports to developers. SpellBound implements a novel typosquatting detection technique, based on an in-depth analysis of npm and PyPI. Our technique leverages a model of lexical similarity between names, and further incorporates the notion of package popularity. This approach flags cases where unknown/scarcely used packages would be installed in place of popular ones with similar names, before installation occurs. We evaluated SpellBound on both npm and PyPI, with encouraging results: SpellBound flags typosquatting cases while generating limited warnings (0.5 (only 2.5 confirm known cases of typosquatting and discover one high-profile, unknown case of typosquatting that resulted in a package takedown by the npm security team.

READ FULL TEXT

page 4

page 6

research
03/06/2019

Security Issues in Language-based Sofware Ecosystems

Language-based ecosystems (LBE), i.e., software ecosystems based on a si...
research
09/04/2017

Code Staging in GNU Guix

GNU Guix is a " functional " package manager that builds upon earlier wo...
research
07/21/2021

Towards Using Package Centrality Trend to Identify Packages in Decline

Due to its increasing complexity, today's software systems are frequentl...
research
09/25/2021

AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia

No single Automatic Differentiation (AD) system is the optimal choice fo...
research
08/21/2021

A Survey on Common Threats in npm and PyPi Registries

Software engineers regularly use JavaScript and Python for both front-en...
research
02/11/2021

I Know What You Imported Last Summer: A study of security threats in thePython ecosystem

The popularity of Python has risen rapidly over the past 15 years. It is...
research
02/04/2020

Measuring and Preventing Supply Chain Attacks on Package Managers

Package managers have become a vital part of the modern software develop...

Please sign up or login with your details

Forgot password? Click here to reset