Developer working on sofa showing software supply chain attacks on open source

Sophisticated Attackers Are Increasing in the Software Supply Chain

The escalating threat to open-source package registries

Open-source software (OSS) has long been hailed for its collaborative nature, transparency, and rapid innovation. But as its prominence grows, so too does the allure for malicious actors. Recent events underscore a pressing issue: the significant surge in sophistication of attacks targeting open-source package registries such as npm, RubyGems, PyPI, and others.

A look back: The early attacks

Attacks on open-source repositories were once rudimentary, even clumsy. Bad actors were mostly opportunistic, injecting common credential and token stealers into packages. Their hope was that an unsuspecting developer would inadvertently integrate these compromised packages into their applications, providing attackers a gateway to sensitive information.

Evolution of malicious tactics

Fast forward to the present day, and the landscape has drastically changed. At the end of Q2 2023, my team at Phylum was the first to uncover a series of meticulously orchestrated attacks on npm. These attacks were later attributed to North Korean state-affiliated actors by Github. These attacks continued into Q3, with campaigns against PyPI and additional attacks against npm. These are not isolated hackers or small groups but well-funded entities with resources and intent to cause considerable disruption.

In a series of unusual publications, packages were found to contain intricate malware designed not just to steal credentials but to siphon off entire company source codes and secrets. What’s even more concerning is the stealthy nature of these attacks. For instance, a package named “emails-helper” on npm was discovered to be a façade for an intricate attack involved Base64-encoded and encrypted binaries. This scheme, designed with great sophistication, utilized DNS TXT records to fetch encryption keys from a remote server, ultimately deploying potent penetration testing tools.

Software supply chain: The new battleground

These incidents underscore a broader trend. The software supply chain is becoming the new battleground. As we reported in our Q3 2023 Evolution of Software Supply Chain Security Report, the team analyzed approximately 179M files across 2.5M package publications in just one quarter. The vastness of this ecosystem, combined with its interconnected nature, makes it a prime target.

And it’s not just about npm. Other ecosystems, including PyPI, RubyGems, Nuget, Golang, Cargo, and Maven, are also in the crosshairs. With each package publication, there’s an opportunity for a malicious actor to slip through, making real-time monitoring and analysis crucial.

The road ahead: Safeguarding the open-source ecosystem

For the open-source community and stakeholders, these revelations are a clarion call. Trust, once a cornerstone of open-source, is now under scrutiny. Developers need to exercise caution, vetting each package, no matter how reputable the source might seem.

New technologies offer ways to contextualize, categorize and prioritize risks in the open-source ecosystem, but technology alone won’t suffice. There’s a need for community-driven initiatives, tighter security protocols, and a renewed emphasis on education. Vendors, package mangers, industry groups and organizations that build applications will need to work closely together to stay ahead of attackers as they mount more and more sophisticated attacks.

In conclusion, as the open-source ecosystem continues its upward trajectory, stakeholders must remain vigilant, understanding that with great power comes great responsibility. The very ethos of open-source—collaboration, transparency, and innovation—must be shielded from those who seek to exploit it.