Cyber Risks · Trail of Bits Blog

Exploiting ML models with pickle file attacks: Part 2

Summary: Trail of Bits introduced Sticky Pickle, a variant of its Sleepy Pickle attack that adds a self-replicating mechanism, so a malicious payload propagates into successive versions of a compromised ML model when a user fine-tunes and re-distributes it. The technique also obfuscates the payload by compiling it into a Python code object, serializing it with the marshal library, and XOR-encoding it with a key hardcoded in a decoding stub, so scanners and analysts see only compiled bytecode instead of readable source.

Key Takeaway: A single malicious pickle file can now survive the fine-tuning and redistribution that would normally clear an exploit, and its payload changes with each reinjection, so the malicious behavior stays the same while the file signature does not.

Read the original at Trail of Bits Blog ↗