Latest / Decrypted: The UK Cyber Briefing / The Rust supply chain attack that memory safety didn't stop, and the advisory Microsoft retracted
Transcript
- 0:03This is Decrypted. Saturday, the twenty-second of August.
- 0:07The Rust supply chain attack that memory safety didn't stop, and the advisory Microsoft retracted.
- 0:15Crates dot io, the official registry for the Rust programming language, spent Thursday hosting a backdoor.
- 0:23It was built on nothing more than a decade of trust in one maintainer's account.
- 0:28Researchers at Wiz have tied the attack to North Korea's Sapphire Sleet group.
- 0:34These are the same operators linked to this year's poisoning of the Axios and Mastra open source projects.
- 0:41And the lesson lands squarely on UK teams who picked Rust precisely because it was supposed to be the safe ch
- 0:49oice.
- 0:54On 20 August, someone with access to the maintainer account behind arrayref pushed a new version.
- 1:02Arrayref is a small utility crate that converts byte arrays.
- 1:08It turns up in roughly three-quarters of all Rust environments.
- 1:12Two related crates from the same account, internment and append-only-vec, followed twenty minutes later.
- 1:20All three quietly added one new dependency called proc-macro1.
- 1:26That's a typosquat of the genuinely popular proc-macro2.
- 1:30According to Wiz, it was the first dependency arrayref had taken on in its entire ten-year history.
- 1:37That dependency carried a build script.
- 1:40That's the bit of Rust tooling that runs automatically, with full user privileges, before your code even comp
- 1:47iles. It reassembled a command-and-control address from fragments.
- 1:52Then it downloaded a payload that harvested browser credentials, fingerprinted the machine and installed itse
- 1:59lf to survive a reboot. All before the developer had written a line of their own code that day.
- 2:05Wiz's infrastructure analysis is the basis for the North Korea attribution.
- 2:11It matched beacon paths and T L S certificates against known Sapphire Sleet campaigns.
- 2:18The Rust Security Response Team pulled the packages and locked the account.
- 2:23But Wiz's advice for anyone who built against them in the meantime is blunt.
- 2:28Treat the machine as compromised.
- 2:30And finally. Memory safety was never the control that mattered here.
- 2:35Here's the Secure by Design lesson.
- 2:38Rust's famous safety guarantees, the ones N C S C has spent years encouraging UK organisations to adopt, prot
- 2:47ect against a completely different class of bug.
- 2:49They stop a programmer writing memory corruption.
- 2:53They do nothing to stop a build script fetching and running arbitrary code the moment cargo build fires.
- 2:59The actual design failure is that most build pipelines still let dependency code execute unsandboxed and wit
- 3:07h network access. The assumption is that a maintainer account is a proxy for trust.
- 3:13It isn't. And it hasn't been for years.
- 3:16So if you're moving codebases to Rust for its safety properties, pair that move with sandboxed, network-rest
- 3:23ricted build environments and pinned dependency versions.
- 3:26Don't treat the language choice as the whole of the job.
- 3:29That was Decrypted. The written version and every source are linked in the show notes.
- 3:35Thanks for listening.