Co-founder @ Phylum here (<a href="https://phylum.io" rel="nofollow noreferrer">https://phylum.io</a>). We've been actively scanning dependencies across most open source package registries (e.g., npm, PyPI, Crates.io, etc.) for a few years now. Quite successfully, I might add, with recent findings targeting financial institutions [1], North Korean state actors [2], and some of the first malware staging to be seen on Crates.io [3].<p>The fact that an attacker was able to pull this off against a _secure_ hardware device is shocking but not surprising. The mechanism by which they did it is interesting and fairly insidious. Unlike a lot of other attacks that will publish the malware to the registry, this one pulls the payload from a CDN. So, static analysis of the loader (i.e., the intermediary package on npm) is unlikely to yield sufficiently interesting results. Solely focusing on the obfuscation angle is also not of particular use since quite a bit of packages are obfuscated on npm (like, a surprising amount of it. In Q3 2023 we saw over 5,000 _new_ packages shipped with some form of obfuscation).<p>Nonetheless, our automated platform pinged us this morning about some changes to this package and our research team has been digging into it to determine the impacts.<p>With that said, we've produced (and open sourced!) several tools that aim to help with software supply chain style attacks:<p>1. Birdcage is a cross-platform embeddable sandbox [4]<p>2. Our CLI is extensible and integrates Birdcage so you can do things like `phylum npm install...` or `phylum pip install...` and have the package installations be sandboxed [5]<p>We've also got a variety of integrations [6] along with a threat feed of software supply chain attacks (of which the Ledger package and other APT attacks have appeared).<p>Happy to answer any questions! A collective of us are active in Discord (<a href="https://discord.gg/Fe6pr5eW6p" rel="nofollow noreferrer">https://discord.gg/Fe6pr5eW6p</a>), continuing to hunt attacks like these. If that's something that interests you, we'd love to have you!<p>1. <a href="https://blog.phylum.io/encrypted-npm-packages-found-targeting-major-financial-institution/" rel="nofollow noreferrer">https://blog.phylum.io/encrypted-npm-packages-found-targetin...</a><p>2. <a href="https://blog.phylum.io/junes-sophisticated-npm-attack-attributed-to-north-korea/" rel="nofollow noreferrer">https://blog.phylum.io/junes-sophisticated-npm-attack-attrib...</a><p>3. <a href="https://blog.phylum.io/rust-malware-staged-on-crates-io/" rel="nofollow noreferrer">https://blog.phylum.io/rust-malware-staged-on-crates-io/</a><p>4. <a href="https://github.com/phylum-dev/birdcage">https://github.com/phylum-dev/birdcage</a><p>5. <a href="https://github.com/phylum-dev/cli">https://github.com/phylum-dev/cli</a><p>6. <a href="https://docs.phylum.io/docs/integrations_overview" rel="nofollow noreferrer">https://docs.phylum.io/docs/integrations_overview</a>