mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2024-11-10 15:14:34 +00:00
1.3 KiB
1.3 KiB
Dependency Confusion
A dependency confusion attack or supply chain substitution attack occurs when a software installer script is tricked into pulling a malicious code file from a public repository instead of the intended file of the same name from an internal repository.
Summary
Exploit
Look for npm
, pip
, gem
packages, the methodology is the same : you register a public package with the same name of private one used by the company and then you wait for it to be used.
NPM example
- List all the packages (ie: package.json, composer.json, ...)
- Find the package missing from https://www.npmjs.com/
- Register and create a public package with the same name
- Package example : https://github.com/0xsapra/dependency-confusion-expoit