SecurityRonin/chromium-storage-forensic

GitHub: SecurityRonin/chromium-storage-forensic

Rust 实现的 Chromium 存储取证工具集,直接解析磁盘文件以解码 Simple Cache、IndexedDB 和 Local Storage 数据。

Stars: 0 | Forks: 0

# chromium-storage-forensic [![Crates.io: cache](https://img.shields.io/crates/v/chromium-storage-cache.svg?label=chromium-storage-cache)](https://crates.io/crates/chromium-storage-cache) [![Crates.io: indexeddb](https://img.shields.io/crates/v/chromium-storage-indexeddb.svg?label=chromium-storage-indexeddb)](https://crates.io/crates/chromium-storage-indexeddb) [![Crates.io: localstorage](https://img.shields.io/crates/v/chromium-storage-localstorage.svg?label=chromium-storage-localstorage)](https://crates.io/crates/chromium-storage-localstorage) [![Docs.rs](https://img.shields.io/docsrs/chromium-storage-cache?label=docs.rs)](https://docs.rs/chromium-storage-cache) [![Rust 1.80+](https://img.shields.io/badge/rust-1.80%2B-blue.svg)](https://www.rust-lang.org) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) [![Sponsor](https://img.shields.io/badge/sponsor-h4x0r-ea4aaa)](https://github.com/sponsors/h4x0r) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/SecurityRonin/chromium-storage-forensic/actions/workflows/ci.yml) [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) [![fuzzed](https://img.shields.io/badge/fuzzed-libFuzzer-orange.svg)](fuzz/) [![Security audit](https://img.shields.io/badge/security-cargo--deny-success.svg)](deny.toml) **直接读取磁盘字节,无需浏览器,即可全面解析 Chromium 配置文件在其三个 LevelDB/Simple-Cache 存储后端中留下的所有痕迹——包括 origin 提供的缓存页面、站点存储的 JavaScript 对象,以及它保留的 DOM 键值对。** 三个专注且无 panic 的读取器,专为检验人员在查看 `History` 和 `Cookies` 后所需深入分析的存储数据而设计: | Crate | 读取 | 输出 | |---|---|---| | [`chromium-storage-cache`](chromium-storage-cache/) | `Cache/Cache_Data/_0` Simple Cache 条目文件 | URL、HTTP 状态 + headers、body、请求/响应时间、key SHA-256 | | [`chromium-storage-indexeddb`](chromium-storage-indexeddb/) | `IndexedDB/.indexeddb.leveldb/` | 每条记录的 `(database, objectStore, key, decoded V8 value)` | | [`chromium-storage-localstorage`](chromium-storage-localstorage/) | `Local Storage/leveldb/` | 按 origin 的 `META`(WebKit-µs 时间戳)+ 带类型前缀的键值对 | ## 概览 ``` // Decode a site's localStorage — origins, keys, values, and tombstones. for rec in chromium_storage_localstorage::read_dir("Local Storage/leveldb".as_ref())? { println!("{rec:?}"); } // Decode an IndexedDB store into (database, objectStore, key, value) records. for rec in chromium_storage_indexeddb::read_dir("IndexedDB/site.indexeddb.leveldb".as_ref())? { println!("{} / {} / {:?} = {:?}", rec.database.unwrap_or_default(), rec.object_store.unwrap_or_default(), rec.key, rec.value); } // Decode one Simple Cache entry file: the URL it cached and the response. let e = chromium_storage_cache::parse_entry(&std::fs::read("abc123_0")?)?; println!("{} -> {:?}\n{} bytes body", e.url, e.status_line, e.body.len()); ``` ## 如何融入工具生态 每个读取器都直接解析原始字节,因此可以解码在活动状态下 `Get()` 会隐藏的已删除/被取代的记录。基于 LevelDB 的读取器构建于 [`leveldb-core`](../leveldb-forensic)(可提取 tombstones 和序列号);IndexedDB 的值通过 [`blob-decoder`](../../utility/blob-decoder) 的 V8/Blink structured-clone 反序列化器进行解码;所有格式常量(Simple Cache 魔数、IndexedDB key-coding、Local Storage schema)均来自 KNOWLEDGE 的叶子节点 [`forensicnomicon-core`](../../knowledge/forensicnomicon)。 ## 信任,但需验证 - **经过 Fuzz 测试。** 每个读取器都有一个 libFuzzer 目标(`parse_cache`、`decode_indexeddb`、`decode_localstorage`)来驱动其处理不可信字节的入口点;每个目标在数百万次执行中均运行良好。参见 [`fuzz/`](fuzz/)。 - **通过 lint 保证无 panic。** `unsafe_code = forbid`;在生产环境中拒绝使用 `unwrap_used`/`expect_used`;每个整数字段的读取都经过带边界检查的 [`safe-read`](../../utility/safe-read) 前置接口。 - **基于真实 Chrome 输出进行验证。** 正确性不仅通过模拟数据检验,还通过驱动 headless Google Chrome 生成实际存储并回读已知写入操作来进行检查。参见 [`docs/validation.md`](docs/validation.md)。 [隐私政策](https://securityronin.github.io/chromium-storage-forensic/privacy/) · [服务条款](https://securityronin.github.io/chromium-storage-forensic/terms/) · © 2026 Security Ronin Ltd
标签:Chromium, LevelDB, Rust, 可视化界面, 数字取证, 数据解析, 浏览器痕迹提取, 网络流量审计, 自动化脚本, 通知系统