News

Grayhat pollutes npm, PyPI with thousands of fake supply chain dependencies

A gray hat hacker has published over 7,000 dependency confusion packages to npm and PyPI repositories and continues to do so in real-time.

In the style of a vigilante, the actor is persistently publishing fake dependencies using names of real, popular components with more packages pouring in by the second as seen on PyPI.

When I had reported this on the Sonatype blog yesterday, at the time, the actor had managed to spam both repos with around 5,000 packages.

Timeline showing series of events involving dependency confusion packages
(co-created with Derek Weeks, VP, Sonatype)

But, what can be observed now is a cycle of the actor persistently uploading the dependency confusion packages, with PyPI repeatedly taking them down in a “whack a mole” approach.

Most if not all of these packages have the text, “RemindSupplyChainRisks: the purpose is to make everyone pay attention to software supply chain attacks, because the risks are too great.”

These copycat packages, based off of Alex Birsan’s original ethical research packages, make an HTTP request to a Tokyo-based IP 101.32.99.28, and send the name of the copycat package in the same request to the IP.

Dependency confusion software supply chain attacks are dangerous in that they require no action on the victim’s part to get infected.

Unless specific changes are made to the development tools’ configuration to prevent the scenario of private dependencies being pulled from public open source repositories, the dependency confusion problem is likely to impact even the most secure systems.

While the actor claims to engage in the craft of flooding the repositories to demonstrate the risks to software supply chains arising from dependency confusion attacks, their way may not be all that ethical.

Fair usage policies put forth by npm and PyPI explicitly forbid unreasonably squatting names on these open-source repositories.

It is for that reason both npm and PyPI have been taking down the dependency hijacking copycats that can be seen being published on a daily basis.

As a reminder, if your project uses private, internally created npm, PyPI, RubyGems or NuGet dependencies, it would be a good idea to register their names on the open source repositories before an attacker does.

Additionally, dependency confusion checker scripts (example) and appropriate routing rules should be adopted by your repository manager products to safeguard against the dependency injection.

Ax Sharma

Ax Sharma is a Security Researcher and Tech Reporter. His works and expert analyses have frequently been featured by leading media outlets including the BBC, Business Insider, Fortune, TechCrunch, TechRepublic, The Register, WIRED, among others. Ax's expertise lies in vulnerability research, malware analysis and reverse engineering, open source software and scams investigations. He's an active community member of British Association of Journalists (BAJ) and Canadian Association of Journalists (CAJ).

Recent Posts

Sea Turtle Cyber Espionage Campaign Targets Telecommunication and IT Companies in the Netherlands

Telecommunication, media, internet service providers (ISPs), information technology (IT)-service providers, and Kurdish websites in the…

4 months ago

Rogue WordPress plugin: Threat hunters uncover credit card skimming campaign targeting e-commerce sites

Rogue WordPress Plugin Found to Steal Credit Card Information in Magecart Campaign Threat hunters have…

4 months ago

Albanian Parliament and telco ‘One Albania’ suffer cyber attacks

The Assembly of the Republic of Albania and telecom company One Albania have recently fallen…

4 months ago

Carbanak Banking Malware Resurfaces with Updated Tactics in Ransomware Attacks

The banking malware Carbanak has resurfaced with updated tactics, incorporating attack vendors and techniques to…

4 months ago

Theme park giant Parques Reunidos hit by a ransomware cyber attack

One of the world's largest theme park operators, Parques Reunidos has disclosed a cybersecurity incident.…

1 year ago

Phishing kit screenshots your email domain on the fly to appear real

Phishing kit used by multiple hacked sites generates a log in page on the fly…

1 year ago

This website uses cookies.