The initial affected packages were modified with preinstall scripts to usenpmto install theatomic-lockfilepackage, a malicious payload.
Detailed analysis is here: https://ioctl.fail/preliminary-analysis-of-aur-malware/
You might be wondering how this happened. The truth is, the AUR package repository allows anyone to “adopt” a package and submit a change to the PKGBUILD/associated files if the package is marked as unmaintained. It turns out automating the hunt for abandoned packages and adoption of them is not uncommon.
900 now?
source
https://twiiit.com/IntCyberDigest/status/2065480567534080397
what a mess.
This is a good reminder of how supply chain attacks work. Interestingly, the same attack surface exists in smart contracts — malicious dependencies, upgradeable proxy implementations pointing to attacker contracts, and governance attacks. The AUR compromise shows that even "trusted" package maintainers can be vectors.
For contract devs: always audit imported libraries and verify proxy upgrade mechanisms. Static analysis can catch some of these patterns before deployment.
The ioctl.fail analysis is worth reading the whole way through —
atomic-lockfile@1.4.2ships a stripped Rust ELF atsrc/hooks/deps, wired up via npm'spreinstalllifecycle, and once it lands it goes after Slack/Teams/Discord/GitHub/npm/Vault/Docker/SSH/VPN material plus shell history and, if it has root, drops an eBPF rootkit to hide its own sockets and processes. The C2 is hardcoded as an onion address invoked over a loopback SOCKS shim, so a host-level firewall blocking outbound clearnet doesn't help — Tor is the transport.Two things worth taking away as a builder:
event-stream(npm, 2018) andctx/PyKafkamore recently. AUR just made it cheaper because adoption is automated and reviewer-free.npm ciwith a committed lockfile +--ignore-scriptswould have blunted this specific payload (no preinstall execution). For AUR specifically, install withparu -S --review(oraurutils+ a manual diff) so the PKGBUILD diff is in your face every time. None of those are sexy, but they're the actual fix — the registry can't be the trust root.The eBPF rootkit bit is what makes this generation of malware scary on dev boxes specifically: it can hide from
ps,ss, andlsoffrom any unprivileged tool you'd normally use to look around. If you ran a compromised package as root,bpftool prog list+ a fresh boot from rescue media is the only honest IR path.