r/dfir • u/sinoziqi • 6d ago
[Open Source] starshield-forensics v0.3.8: Zero-dependency Python Chromium LevelDB .log carver, zero-PII precheck & CRC32C frame quarantine (google/dfindexeddb#92)
Hi everyone,
I’m sharing starshield-forensics (v0.3.8, MIT License), an offline, read-only Python >= 3.10 standard-library toolkit (0 third-party runtime dependencies, 0 network calls) built for deterministic Chromium IndexedDB / Web Storage uncompacted write-ahead log (.log) carving, pre-engagement compaction triage, PNG/JPEG structural container inspection, financial IOC checksum validation, and privacy-by-default stdio MCP integration (starshield mcp).
(Note on current scope up front: v0.3.8 applies to LevelDB-backed Chromium stores—including existing IndexedDB directories and current Local Storage; newly created IndexedDB stores using Chromium's Chrome 150+ SQLite backend have no LevelDB .log frames. Within LevelDB stores, v0.3.8 covers uncompacted .log WAL frames only and does not decompress Snappy-compressed .ldb SSTables or non-JSON Blink StructuredClone primitives yet—.ldb Snappy support is deferred to v0.4.)
If you have uv installed, you can run the built-in synthetic clean-room showcase immediately without installing anything into your global environment:
(Also available via pip install starshield-forensics, brew install Ziqi/tap/starshield-forensics, or as a reproducible single-file zipapp starshield.pyz for air-gapped forensic VMs.)
Why build a specialized .log carver alongside dfindexeddb / ccl_chromium_reader?
During pre-action incident triage (for example, evaluating whether soft-deleted web messenger or B2B portal records still survive in local Chromium storage before a full lab acquisition), we kept running into three practical gaps:
- Zero-PII Compaction Feasibility Gate (
starshield precheck): Before transferring multi-gigabyte browser profiles, responders often just need a deterministicGO/PARTIAL/NO_GO_COMPACTED_OR_UNSUPPORTEDmanifest showing whether uncompacted.logWAL frames exist or if records have already compacted into.ldbSSTables (checked via footer magic0xdb4775248b80fb57)—with ephemeralHMAC-SHA256pseudonymization enabled by default so filenames, raw hashes, and plaintext never leak into shared terminal logs unless--unredactedis explicitly passed in an offline lab. - Distinguishing Intact Frames from Accidental Corruption via Masked Castagnoli
CRC32C(google/dfindexeddb#92): While cross-checking 482 synthetic clean-room test vectors (v0.3.7validation archive Zenodo10.5281/zenodo.24156262, alongside our separate 24-caseStarShield-Bench-24benchmark;v0.3.8does not change.logframe parsing, checksums, or reassembly) againstdfindexeddb(20260210) andPillow(13.0.0), we noted a checksum-policy difference indfindexeddb'sPhysicalRecord.FromDecoder: it decodes the 32-bit header checksum without recomputing LevelDB's masked Castagnoli CRC32C (0x82F63B78+0xA282EAD8) over the payload. Truncated frames or invalid record types still raise parser errors, but when accidental storage corruption (a bit flip, torn write, or bad block) leaves the corrupted bytes structurally parseable (e.g., synthetic vectorS1-V05),dfindexeddbemits the altered record alongside intact ones.- Recorded at https://github.com/google/dfindexeddb/issues/92 (opened on 2026-11-14 by the author; no maintainer reply yet): emitting structurally valid records while preserving header fields is one defensible forensic default, whereas
starshield-forensicsadopts a stricter policy—logging the physical header byte offset and both checksums incorrupted_frames, dropping the damaged payload, and continuing (or resynchronising at the next 32,768-byte boundary if a corrupted length overflows its block) so examiners can inspect flagged offsets directly in a hex editor. (Important caveat: CRC32C is non-cryptographic—it detects accidental storage corruption, not deliberate tampering where an actor recomputes the frame checksum.)
- Recorded at https://github.com/google/dfindexeddb/issues/92 (opened on 2026-11-14 by the author; no maintainer reply yet): emitting structurally valid records while preserving header fields is one defensible forensic default, whereas
- Explicit Epistemic Tiers & In-House Validation Record: Every JSON output item is tagged
OBSERVED,DERIVED,INFERRED, orUNKNOWN. Our reproducible 482-vector in-house validation record (patterned onISO/IEC 17025:2017clause 7.2.2 concepts; not assessed by the UK Forensic Science Regulator and not accreditation forFSA – DIG 100) is documented here:- Cross-Check Summary: https://github.com/Ziqi/starshield-forensics/blob/v0.3.8/VALIDATION_REPORT_FSR_ISO17025.md
Honest Scope & Current Limitations (v0.3.8)
To save everyone time evaluating fit:
- LevelDB
.logWAL only — does NOT decompress Snappy-compressed.ldbSSTables, decode non-JSON BlinkStructuredClonebinary primitives, or parse Chrome 150+ SQLite-backed IndexedDB stores (.ldbSnappy +StructuredCloneplanned forv0.4—for compacted.ldbtables today, usedfindexeddborccl_chromium_reader;starshield precheckexplicitly flags.ldb-only folders asNO_GO_COMPACTED_OR_UNSUPPORTED; Zstandard in current Chromium applies to SQLite IndexedDB values rather than LevelDB.ldbblocks). - CRC32C detects accidental corruption, not deliberate forgery: If an adversary edits a
.logfile and recomputes the masked CRC32C header checksum, frame verification passes. - Image inspection (
inspect-image) is strictly structural, not pixel-level "forgery detection": It validates RFC 2083 PNG chunk CRC32s, bounded-decompressesiCCP(acsp) headers (<= 16 MiBzip-bomb cap), and reassembles multi-chunk JPEGAPP2/APP13(8BIM) markers alongside mandatory benign OS-screenshot/resave caveats.
Supply-Chain & Reproducibility Posture
- OpenSSF Best Practices Silver (
#16602) · OpenSSF Scorecard8.0/10· SLSA Level 3 & PyPI PEP 740 attestations · Zenodo Concept DOI10.5281/zenodo.24145804 - Docs & Sample Workpaper: https://ziqi.github.io/starshield/
Very interested in feedback from practitioners on edge-case Chromium WAL schemas or multi-block corruption patterns you’ve encountered in the wild!