A cactus coup at the goldrush saloon: swindling machine learning caches via wagon train
Where
Track 1
CactusCon 12
Duration
57 min
Shows how attackers can hide malware in machine learning models shared on Hugging Face and run it inside ML environments.
Summary
Adrian Wood and Mary Walker present a red team view of machine learning models as a software supply chain attack vector. They explain why ML environments are attractive targets: they hold large volumes of business data, rarely run endpoint detection, and their daily activity looks routine. The talk covers how look-alike organisation names on a public model repository can be claimed, and how a model file can carry code that runs whenever the model loads while its predictions stay accurate.
The middle section walks through building such a model with a Keras Lambda layer that fetches and runs a second-stage implant, and how saving the model under a different file format can get around recent restrictions. Once inside, the presenters describe common findings in shared notebooks, such as exposed API keys for data warehouses, and tools for mapping MLOps services and altering model behaviour. Mary then describes a research project that assessed thousands of model files on Hugging Face, finding very little embedded code and only one sample of actual malware, and how the code layers were extracted and disassembled.
The closing part covers defence: scanning models at ingestion, YARA rules over extracted code, H5 viewers for forensics, and the need for incident responders to learn what normal looks like in ML environments. Sandboxing at scale is judged impractical, so behavioural analysis of suspect models is suggested instead. The speakers note that the offensive code is already published, with defensive code to follow.
Related talks
Breaking Ground·13 min
Noah Grosh
Shows how small edits to a malware file's features can lower an ML detector's malicious score without changing behavior.
Talks·50 min
Brett Hawkins · Chris Thompson
Shows how stolen cloud tokens let attackers steal models from MLOps platforms, and how to detect that activity.
Ground Truth·35 min
Suha Sabi Hussain
Shows how input-handling bugs in ML model file parsers can be chained into backdoors that carry through into deployed pipelines.


