• Hello and welcome! Register to enjoy full access and benefits:

    • Advertise in the Marketplace section for free.
    • Get more visibility with a signature link.
    • Company/website listings.
    • Ask & answer queries.
    • Much more...

    Register here or log in if you're already a member.

  • 🎉 WHV has crossed 56000 (56k) monthly views (unique) and 285135 clicks per month, as per Google Analytics! Thank you for your support! 🎉

Shai-Hulud Malware Attack Infects 500 npm Packages and Leaks Developer Secrets on GitHub

johny899

New Member
Content Writer
Messages
974
Reaction score
3
Points
23
Balance
$1,220.8USD
I found something really interesting post today on BleepingComputer. There is a new malware called Shai-Hulud that has infected over 500 npm packages and even published developers' private information on GitHub. Pretty scary, right?

What's Happening?​

Hackers gained access to several accounts of npm package maintainers and added malicious code to many packages. So when someone installs those packages, the malware automatically runs.

Once the malware is activated, it collects sensitive information such as:
  • GitHub Tokens
  • npm Tokens
  • Cloud Keys (AWS, Google Cloud, Azure)
After collecting the information, the malware uploads it to GitHub as new public repositories where anyone can view it.

How It Works​

Shai-Hulud operates like a worm, which means it will continue to spread itself.

Once Shai-Hulud infects one package, it will attempt to infect every other package that belongs to the same developer.

It also has the following features:
  • A tool called TruffleHog to help find secrets
  • The ability to embed its code into large files so it will not be easily detected
  • A file where stolen secrets are stored, environment.json
  • The last point is particularly bad news; if the bot is unable to steal your token, it may try to remove your home directory.
This last point is particularly concerning as there could be significant ramifications from this attack.

Scale of the attack​

This attack is on an enormous scale. To date:
  • The original attack began with 187 packages that were infected, but it has since expanded to over 500 packages.
  • Approximately 350 developer accounts were affected by this attack.
  • A large number of GitHub repositories were created solely for the purpose of distributing secrets (tens of thousands).
  • Additionally, CISA has reported that cloud access keys were also stolen from users.
In conclusion, this is the worst npm attack we have seen thus far.

Things to Do Immediately​

If you have been using npm packages, follow these steps:
  • Review your package dependencies for infected versions
  • Reissue all token (GitHub, npm, Cloud) credentials
  • Implement two-factor authentication on your accounts
  • Disable CI/CD install scripts if you can
By completing these actions, you can help ensure that you do not fall victim to a supply chain attack.

My Concern​

When I first heard about this, I felt devastated because npm was such a convenient tool and I have always put my faith in third-party packages—and that made me very naive about the vulnerability of the supply chain.

In Summary​

Shai-Hulud demonstrates how easily supply-chain attacks can occur today. If you are using npm, review all of your npm accounts and packages, rotate your tokens and credentials, and take all necessary precautions to protect your information.
 
Top