An 89 KB model with no training data aims to sit inside an SSD and undo ransomware
ssd-ransomware-guard compiles 363,520 ternary weights from file-format rules, then rewinds the drive's block map on an attack. So far it has only met emulated drives.
ssd-ransomware-guard is a design for a very small attention model that would run in an SSD controller’s own memory, watch writes go by, and roll the drive back when it decides the writer is ransomware. Two things caught our eye: the weights were never trained, and the undo relies on a quirk of flash that is usually a nuisance.
How it works
The quirk first. In the README’s words, “Data on an SSD is never overwritten in place.” When ransomware encrypts a file, the ciphertext lands on fresh flash pages and the originals linger until garbage collection reclaims them. The drive keeps a map from logical blocks to physical pages. If you stop garbage collection in time and point the map back at the old pages, the files return.
The model decides when. Every 128 NVMe block writes become one window, encoded from the old and new page headers, entropy and repeat-structure bits from the page body, how local the block addresses are, and how old the overwritten data was.
The network has 363,520 weights, each -1, 0, or +1, stored at two bits apiece for 88.75 KB. The README says they were compiled directly from 128 file-header grammars, transition gates, 4-head causal attention, and stride filters, with zero training. It does not explain the compiler further, though the repo has a compiler/ directory. Inference is integer-only C with no floats and no malloc, and the author reports 4.0 ms per decision in 189.02 KB of RAM.
A suspect window turns YELLOW and its pages are pinned against garbage collection. A RED verdict engages a write-once lockdown, blocks TRIM and wipe commands, and rewinds the map.
What has been tested
All results are the author’s own.
| Suite | Result reported |
|---|---|
| 9 live attack runs (ransomware, wiper, evasion) on QEMU NVMe with ext4 | 0 bytes lost, 24 of 24 file hashes intact |
| 3 live benign workloads plus 6 traces | 0 false lockdowns |
| Power cut mid-attack, 85 percent full simulator | 1,500 of 1,500 files recovered |
| Solver checks | 7 of 7 Z3 queries UNSAT |
Read the scope before the headline. Everything ran in QEMU, a flash simulator, or a C benchmark. No physical drive has been involved, so “in SSD SRAM” is a target, not a result. Only ext4 is covered; the README says NTFS, XFS, and a Cosmos+ OpenSSD board are queued next. It does not list what the seven solver queries prove, and nine attack runs is a small sample for a claim of zero loss.
Try it yourself
The repo is MIT licensed, by GitHub user brianbell-x, with four commits dated November 15 and 16.
pip install -e .
make weights c_lib test smt
make eval redteam
The live suite wants Linux or WSL2, and sudo make redteam-qemu runs the QEMU red-team cases.
We have not built or run any of it; this is based on the README and the commit history.