[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115157":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":12,"stars30d":12,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":9,"pushedAt":21,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},115157,"ssd-ransomware-guard","brianbell-x\u002Fssd-ransomware-guard","brianbell-x","An 89 KB ternary System-1 decision model in SSD SRAM for zero-byte-loss ransomware rollback.",null,"C",60,7,53,0,46.91,"MIT License",false,"main",true,[],"2026-11-16 02:38:27","2026-11-18 17:02:35","# ssd-ransomware-guard\n\n**An 89 KB ternary System-1 decision model in SSD SRAM for zero-byte-loss ransomware rollback.**\n\nData on an SSD is never overwritten in place. When a file is encrypted by ransomware, ciphertext is written to a fresh flash page while the original data is preserved on silicon until garbage collection is run.\n\nAn `89 KB` ternary `{-1, 0, +1}` System-1 model is held directly in on-chip SSD SRAM beyond the reach of OS rootkits. Every `128` writes are checked in `4.0 ms` inside `189 KB` of static C11 with zero floats, zero tokens, and zero training; on attack, garbage collection is frozen, writes are locked, and the block map (`L2P`) is flipped back to the clean flash pages.\n\n[![ssd-ransomware-guard](.\u002Fmedia\u002Fssd-ransomware-guard-poster.png)](.\u002Fmedia\u002Fssd-ransomware-guard-demo.mp4)\n\n## Evals\n\n| Suite | Workload | Result | Proof |\n| :--- | :--- | :--- | :--- |\n| **Live Linux Attacks** | `9\u002F9` QEMU NVMe `ext4` ransomware, wiper, and white-box evasion runs | **`0 B` lost**, `24\u002F24` SHA-256 intact, `e2fsck CLEAN` | [QEMU Report](.\u002Flive_testbench\u002Fresults\u002FQEMU_REDTEAM_VERIFIER_REPORT.md) |\n| **Benign Workloads** | `3\u002F3` live Linux (`git repack` + Rust build, SQLCipher, `FITRIM`) + `6\u002F6` DB\u002FOS traces | **`0` false lockdowns** | [QEMU Report](.\u002Flive_testbench\u002Fresults\u002FQEMU_REDTEAM_VERIFIER_REPORT.md), [Eval Report](.\u002Feval\u002FEVAL_REPORT.md) |\n| **Power-Loss Recovery** | Mid-attack PCIe power yank on `85%`-full CoW FTL + volatile DRAM wipe | **`1,500\u002F1,500` files recovered** from `3.79 KB` supercap log | [Eval Report](.\u002Feval\u002FEVAL_REPORT.md) |\n| **Silicon & Formal** | Freestanding C11 (`-O3`), `500`-window bit-exact parity, `Z3 QF_LIA` | **`363,520` trits (`88.75 KB`)**, `189.02 KB` SRAM, **`4.0 ms`**, **`7\u002F7` Z3 `UNSAT`** | [Eval Report](.\u002Feval\u002FEVAL_REPORT.md), [ssd_guard.c](.\u002Fc_engine\u002Fssd_guard.c), [smt_verify.py](.\u002Fverification\u002Fsmt_verify.py) |\n\n## How It Works\n\n- **128-Op Telemetry Window:** Every `128` NVMe block mutations are encoded off the `~15 usec` host write path from `64 B` old and new page headers, page-body entropy and repeat-structure bits, LBA locality, and cold-data age.\n- **Analytical Ternary Weights:** `363,520` weights in `{-1, 0, +1}` (`88.75 KB` at `2 bits\u002Ftrit`) are compiled directly from `128` file-header grammars, differential transition gates, 4-head causal attention, and stride filters with zero training.\n- **Single-Pass System-1 Judgment:** Branchless integer inference (`int8`\u002F`int16`\u002F`int32`, zero floats, zero `malloc`) is completed in `4.0 ms` inside `189.02 KB` of on-chip controller SRAM, and a calibrated containment probability is produced with zero token generation.\n- **`L2P` Block-Map Rollback:** Suspect windows are pinned against garbage collection (`YELLOW`); on confirmed attack (`RED`), hardware WORM lockdown is engaged, `TRIM` and wipe commands are blocked, and `L2P` pointers are rolled back to intact flash pages.\n\n## Quickstart\n\n```bash\npip install -e .\nmake weights c_lib test smt\nmake eval redteam            # Linux\u002FWSL2 live guest suite: sudo make redteam-qemu\n```\n\n## Repo Layout\n\n```text\nc_engine\u002F        Freestanding C11 ternary inference engine, bench, and 88.75 KB weight blob\ncompiler\u002F        128 header grammars, analytical trit compiler, Python reference, and C bridge\nftl_sim\u002F         Copy-on-Write FTL simulator, cold-epoch tracking, PLP journal, and WORM FSM\nverification\u002F    Bit-exact C11\u002FPython parity suite and 7 white-box Z3 QF_LIA proofs\neval\u002F            Tail calibration, 85%-full dirty-FTL + PLP suite, and EVAL_REPORT.md\nlive_testbench\u002F  NBD CoW server, Linux QEMU NVMe runner, e2fsck judge, and 12 red-team cases\nmedia\u002F           Live ransomware defense and rollback demo video (mp4) and poster (png)\nMakefile         Build, parity test, Z3 proof, dirty-FTL eval, and QEMU red-team targets\n```\n\n## Scope\n\nEnd-to-end containment is verified on Linux `ext4` over QEMU NVMe\u002FNBD, an `85%`-full CoW FTL simulator with PLP recovery, freestanding C11 (`GCC`\u002F`MSVC`), and `Z3 QF_LIA`; `NTFS`, `XFS`, and physical `Cosmos+ OpenSSD` Cortex-R5 targets are queued next.\n","这是一个部署在SSD主控片上SRAM中的轻量级勒索软件防护系统，通过分析NVMe写操作模式实时检测并回滚加密行为。其核心是89 KB三值（-1\u002F0\u002F+1）决策模型，完全基于静态C11实现，无浮点运算、无动态内存分配、无需训练；每128次写入在4.0 ms内完成检测，攻击确认后冻结垃圾回收、锁定写入，并将逻辑到物理映射（L2P）回退至未加密页，实现零字节数据丢失。适用于对数据完整性要求极高、需硬件级隔离防护的存储设备固件场景，如金融、医疗、工控等关键业务的嵌入式SSD防护。",2,"2026-11-24 04:50:32","CREATED_QUERY"]