This is a republish from the CyberBites newsletter as it is related to application security and open source supply chain.
This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit appsecunlocked.substack.com
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Hi everyone, this is Edwin Kwan from Cyberbytes. Now this is an out-of-band update because I want to share a story with you. This is a cautionary tale on supply chain attacks, and it's a recent encounter that I've just experienced with a compromised NPM library. So just yesterday, I received a LinkedIn message about an interesting job opportunity, complete with a link to a job ad. Before clicking, I took a look at the URL to make sure it was legitimate, something we all do in this line of work.
SPEAKER_00The website appeared normal enough, but then something caught my eye. An overlay popped up, prompting me to connect my crypto wallet. Now, this was a bit odd. I didn't expect a job bot to be asking for crypto credentials. So my OSCP offensive security training kicked in. I grabbed some screenshots, recorded my session, and started investigating. Digging a little deeper, I discovered the site used an NPM library called Lottie Player.
SPEAKER_00It's a popular animation plugin, and it was pulling the latest version directly from NPM. As I looked into the GitHub repository, I noticed recent issues with others reporting similar suspicious behavior. Turns out versions 2.0.5, 2.0.6 and 2.0.7, all released within an hour of each other, were all infected by what looks like a crypto-drainer.
SPEAKER_00This was clearly a supply chain attack, potentially affecting thousands of websites. I shared my findings with that person. For a moment, I wondered if this was some elaborate interview test. But today, this morning, more information surfaced, confirming a rare incident. According to an article from The Register, a privileged developer's session tokens were compromised, allowing the attacker to push malicious code to the NPM repository.
SPEAKER_00The affected versions were promptly removed, but the rapid response didn't change the fact that many users had already been exposed. Implications were huge. It's a popular library and it has about 94,000 weekly downloads. Any organization using the latest version could unknowingly compromise their user. A quick showdown search revealed that around 3,000 websites had likely pulled this
SPEAKER_00infected library version. And for those that couldn't reproduce the issue later, it might look like a non-incident, even though users were indeed affected. In one case, a user reported losing 10 bitcoins, which is around $722,000. Reflecting on this, I realized it wasn't just about crypto wallets. If that overlay had instead requested login credentials for email,
SPEAKER_00social media accounts, or banking, the potential fallout could have been far worse. Many organizations wouldn't even realize that individuals had been compromised via their website. Okay, so here are some key lessons to learn and recommendations. First, pin your dependencies. Avoid using add latest versions in production. Pinning dependencies means you know exactly which version is running on your site
SPEAKER_00and can thoroughly assess each new update. Second, consider local hosting for critical libraries. Serving libraries locally adds an extra layer of control over what's running on your systems. You avoid the risk of suddenly pulling in compromised code. Three, vulnerability management in the supply chain. I've been talking about this a lot. Third party code brings functionality and speed, but it also introduces risks.
SPEAKER_00Regularly review and audit third party dependencies and monitor for vulnerabilities impacting your software supply chain. This experience underscores a key lesson. Modern applications are often exempted from external code, libraries, and services, many of which are developed and maintained by strangers. Our software supply chain are more complex and interconnected than ever.
SPEAKER_00Attackers know this too and exploit these connections to inject malicious code into our websites and applications. So let's stay vigilant and remember that security isn't just about protecting our code, but also about safeguarding the third-party code we choose to trust. This is Edwin Puan from Cyberbytes. I'd love to hear your thoughts on this. Message me and stay safe out there.
Welcome to the last article in this series on Training & Awareness. We're going to finish off the season by looking ahead to the future of security training and awareness. Over the past eleven episodes, we've covered...
In this article we're looking at a challenge that's become increasingly critical: security training for remote teams. We'll explore how to build and maintain a strong security culture when your team is distributed...
In this article we'll be talking about cloud security awareness and exploring why traditional security thinking falls apart in the cloud, and how to build a new security mindset for the cloud era. THE CLOUD SECURITY...
Welcome to AppSec Unlocked. In this article we’ll look into Secure Development Lifecycle training, or SDL. We're going to explore how to build security into every phase of your development process - from initial...
Welcome to AppSec Unlocked. In this article we'll be diving deep into what many consider the most persistent security threat: social engineering. We'll explore why humans are often called the weakest link in security -...