starshield-forensics
Enables read-only forensic recovery and health-checking of Brave's Chromium IndexedDB / Local Storage caches, carving uncompacted LevelDB .log WriteBatch frames and reassembling UTF-8 and Blink UTF-16LE JSON records with CRC32C verification.
Supports offline triage of Discord's Electron IndexedDB / Local Storage caches, extracting and epistemically tagging soft-deleted or edited message records (e.g. deletetime, edittime) with byte-offset citations.
Provides deterministic parsing of Electron desktop application IndexedDB / Local Storage .log caches (VS Code, Slack, Teams, Discord, WhatsApp Desktop), including cross-block frame reassembly, Castagnoli CRC32C validation, and zero-PII precheck feasibility gating.
Supports offline triage of the Slack desktop app's Electron IndexedDB / Local Storage .log files, recovering message records and pre-screening compaction status (GO / PARTIAL / NO_GO) without plaintext leakage.
Supports offline recovery of WhatsApp Web / Desktop Electron cache records, carving LevelDB write-ahead logs for JSON and Blink StructuredClone records and flagging deleted or edited entries for evidentiary triage.
starshield-forensics (v0.3.11 — Offline LevelDB .log & Container Triage Toolkit)
English | 简体中文 (
README.zh-CN.md)
Offline Read-Only Chromium & Electron LevelDB
.logRecord Carver, PNG/JPEG/PDF Container Structure Inspector, Mathematical Check-Digit Verifier & StructuralMCPServerAuthor: Ziqi Xiao (
@Ziqi) · PyPI:starshield-forensics 0.3.11· Homebrew:Ziqi/tap/starshield-forensics· Concept DOI:10.5281/zenodo.24145804(currently resolves to archivedv0.3.7) · License: MIT (REUSE 3.3) · Runtime: Python >= 3.10 (stdlib only, zero network calls, zero LLM dependencies)
Focused Scope: Offline Endpoint & Evidentiary Pre-Screening
starshield-forensics is an offline, read-only binary inspection and endpoint pre-screening toolkit built with zero third-party runtime dependencies (dependencies = []) for digital forensics and incident response (DFIR) practitioners working on air-gapped jump hosts:
Corrupted or Uncompacted LevelDB
.logTriage (precheck&parse-leveldb-log): Read-only compaction diagnostics and uncompacted write-ahead log (.log) carving for Chromium browsers (Chrome,Edge,BraveLocal Storage & existing LevelDB-backed IndexedDB, WhatsApp Web, browser extensions) and Electron desktop apps (Microsoft Teams,SlackLocal Storage)—enforcing Castagnoli CRC32C (polynomial 0x82F63B78, LevelDBmask delta 0xA282EAD8) frame quarantine so damaged physical frames are separated from intact records.PNG, JPEG & PDF Container Structure Inspection (
inspect-image&inspect-pdf): Pure-stdlib structural parsing of RFC 2083 PNG chunk CRC32s (IHDR/IDAT/IEND/iCCP), ISO 10918 JPEGAPP2 ICC_PROFILE/APP13 (8BIM), and ISO 32000 PDF incremental save revisions (%%EOF/xref/startxref, bounded<= 16 MiBzlib/FlateDecode/Type /ObjStmInfo/XMP metadata, and/JavaScript/Launch/EmbeddedFilescues). Reports container structure observations only alongside mandatory benign OS-save, e-signature, and form-fill caveats—never pixel forgery or tamper authentication.Offline Identifier Check-Digit Syntax & Structural
MCPAirlock (starshield mcp+detokenize+shred-vault): Mathematical check-digit and registry syntax verification (ISO/IEC 7812Luhn, 89-countryISO 13616IBAN Mod-97, 250-territoryISO 9362SWIFT/BIC, US ABA,ISO 11649RF,ISO 17442LEI, TRON TRC-20 Base58Check, and Ethereum EIP-55) to filter OCR or transcription typos. Check-digit validation confirms mathematical syntax only; it does NOT indicate fraud or prove that a payment occurred.starshield mcpis not a natural-language prompt-injection filter—instead, its parse/triage tools withhold free-form prose by default and emit structural skeletons, paired with local CLIstarshield detokenizeandstarshield shred-vault.
All bundled fixtures in samples/ and starshield/data/—plus the seeded 24-case evaluation suite in benchmark/benchmark_suite.py (StarShield-Bench-24)—are 100% clean-room specification test vectors (GBP 18,400.00, ISO-13616 example IBANs GB82WEST12345698765432 and NO9386011117947, Luhn test string 6200000000000005). Zero real incident data or PII is included.
Related MCP server: VeriSIFT
Epistemic Tiers & Capability Boundary Matrix (v0.3.11)
Every output carries an explicit machine-readable epistemic tier:
OBSERVED: Directly present in raw input bytes, chunk headers, or JSON fields (bound to physical WAL frame offsets or chunk offsets).DERIVED: Deterministically computed from raw input via standardized algorithms (Castagnoli CRC32C, ISO/IEC 7812 Luhn, ISO-13616 Mod-97, UTC delta arithmetic).INFERRED: Contextual triage lead requiring external corroboration; never asserted as standalone proof.UNKNOWN: Explicitly outside the evidentiary boundary of local client artifacts (e.g., records compacted prior to acquisition).
Module | Capability in | Epistemic Boundary & Current Limitations |
Zero-PII Storage Feasibility Gate ( | Scans Chromium & Electron LevelDB folders or | Pre-screens compaction status prior to triage; any |
Chromium & Electron LevelDB | Parses 32 KiB physical blocks, verifies Castagnoli CRC32C ( | Does not decompress Snappy |
Exported Message JSON Triage ( | Enumerates soft-deleted ( | Cannot quantify records already compacted or evicted prior to acquisition. |
Identifier Check-Digit Syntax ( | Verifies ISO/IEC 7812 Luhn, all 89 SWIFT IBAN Registry country lengths (15–33 chars) + Mod-97, 250 ISO 3166-1 / | Confirms mathematical syntax only—never fraud or payment execution. Does not bundle proprietary Pay.UK Vocalink sort-code modulus weight tables. |
PNG, JPEG & PDF Container Structure ( | Verifies PNG | Container structure observation only + |
Zero-Dependency Structural | Exposes 7 read-only deterministic tools ( | Not a prompt-injection filter: withholds raw prose in parse/triage tools; currency amounts and 2-letter IBAN/BIC country codes remain visible in structural tokens. |
Local Session Token Vault & Shredder ( | In-RAM by default; optional | Same-host OS-permission-protected plaintext JSON lookup table (not physical isolation; Python stdlib has no native AEAD). |
Browser & Desktop Storage Target Matrix
Target Artifact / Application | Underlying Storage Format |
|
Chrome / Edge / Brave Local Storage & existing LevelDB IndexedDB | LevelDB | Supported ( |
WhatsApp Web, Microsoft Teams (Web/Electron Local Storage), Slack Local Storage, Browser Extensions ( | LevelDB | Supported ( |
Compacted LevelDB | Snappy-compressed SSTable blocks ( |
|
Chrome 156+ Newly Created IndexedDB Stores, VS Code / Cursor | SQLite B-Tree / SQLCipher / Chromium | Out of LevelDB |
Quick Tryout (uvx) & Installation (pip PEP 740 / .pyz)
# Instant zero-install clean-room showcase (fetches PyPI wheel directly, zero repo clone needed):
uvx --from starshield-forensics starshield demo
# Option A — Official PyPI package (with PEP 740 Sigstore digital attestations, zero dependencies):
pip install starshield-forensics
starshield demo
# Option A2 — macOS / Linux Homebrew Tap (isolated libexec formula, zero dependencies):
brew install Ziqi/tap/starshield-forensics && starshield demo
# Option B — Zero-install single-file zipapp (for air-gapped forensic VMs):
python3 starshield.pyz demo
python3 starshield.pyz precheck /path/to/readonly_chromium_idb_copy
# Option C — Clone & run unit/MCP tests, fuzzing harness, benchmark & self-check suite:
git clone https://github.com/Ziqi/starshield-forensics.git
cd starshield-forensics
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
PYTHONDONTWRITEBYTECODE=1 python3 -W error tests/fuzz_parsers.py --stdlib --iterations 2500
PYTHONDONTWRITEBYTECODE=1 python3 benchmark/benchmark_suite.py
PYTHONDONTWRITEBYTECODE=1 python3 scripts/verify_cross_tool_forensics.pyAI Agent Integration (starshield mcp) & Two Output Masking Modes
Mount the 7 read-only inspection tools over JSON-RPC 2.0 stdio (omit --vault-file for purely in-RAM sessions, or choose a platform-appropriate 0600 local vault path):
Linux (
tmpfsRAM disk):
{
"mcpServers": {
"starshield-forensics": {
"command": "uvx",
"args": ["--from", "starshield-forensics", "starshield", "--vault-file", "/dev/shm/starshield_vault.json", "mcp"]
}
}
}macOS (private
0700user directory — macOS has no/dev/shm):
{
"mcpServers": {
"starshield-forensics": {
"command": "uvx",
"args": ["--from", "starshield-forensics", "starshield", "--vault-file", "/Users/<you>/.starshield/vault.json", "mcp"]
}
}
}starshield-forensics implements two distinct masking modes—do not conflate them:
Mode A — Keyed Ephemeral HMAC Mode (Default CLI commands &
starshield_demo): Replaces identifiers with per-run[REDACTED_HMAC:<12-hex>]digests; CLI replaces prose with[REDACTED_CONTENT](and MCPstarshield_demoreplaces prose with[WITHHELD_IN_STRUCTURAL_MCP_MODE — free-form prose withheld by default]).{ "epistemic_tier": "OBSERVED", "schema_detected": "chatsvc", "leveldb_batch_byte_offset": 397, "leveldb_batch_sequence_number": 1002, "leveldb_sequence_number": 1002, "is_soft_deleted_in_ui": true, "sender_mri": "[REDACTED_HMAC:1b71a34908e1]", "cached_content": "[REDACTED_CONTENT]", "extracted_iocs": { "luhn_validated_cards": ["[REDACTED_HMAC:3ec5f5677098]"], "mod97_validated_ibans": ["[REDACTED_HMAC:4dad6b1cc0be]", "[REDACTED_HMAC:f21864d3e75c]"] } }Mode B — Session-Tagged Structural Skeleton Mode (
starshield mcpparse_leveldb_log/triage_json, and CLI--pseudonymize/--vault-file): Withholds free-form prose ([WITHHELD_IN_STRUCTURAL_MCP_MODE — free-form prose withheld by default]) and assigns order-preserving session tokens. Explicit visibility boundary:extracted_currency_amounts(e.g.USD 9,500.00) and 2-letter ISO country codes inside<IBAN_GB_9F3A_01>/<BIC_GB_9F3A_01>are not hidden by this airlock (starshield_validate_financial_iocsreturns bothvalidated_iocsHMAC digests andorder_preserving_iocstokens alongsidevalidation_scope_note).{ "epistemic_tier": "OBSERVED", "schema_detected": "chatsvc", "sender_mri": "<ENTITY_9F3A_01>", "cached_plaintext": "[WITHHELD_IN_STRUCTURAL_MCP_MODE — free-form prose withheld by default]", "extracted_currency_amounts": ["USD 9,500.00"], "extracted_iocs": { "mod97_validated_ibans": ["<IBAN_GB_9F3A_01>"] } }
CLI Subcommands (starshield [--unredacted] [--pseudonymize] [--vault-file PATH] [--max-mb 64] [--hmac-digest {sha256,sha384,blake2b}] [--hmac-key-file PATH] <subcommand>)
Subcommand | Input Artifact | Output JSON Summary |
| Built-in synthetic fixtures | Runs clean-room WAL, JSON, container, and check-digit showcase (Mode A HMAC) |
| Chromium folder or | Zero-PII |
| Chromium LevelDB | Physical block CRC32C status, byte-offset-bound carved records, and syntax-checked IOCs |
| Exported messaging JSON | Soft-deleted & edited records + per-record syntax-checked IOCs |
| PNG or JPEG file | Chunk/marker integrity, ICC ( |
| Local PDF file | Incremental save revisions ( |
| Timezone-aware UTC pairs | Monotonicity verification, clock-skew bounds, and edge-node frequency summary |
| Chat transcript JSON | Descriptive utterance-length & punctuation distribution ( |
| Draft with | Local CLI restoration enforcing 4-hex |
| Local | Best-effort 2-pass ( |
| JSON-RPC 2.0 | Read-only MCP server exposing 7 deterministic tools |
Cryptographic Release Verification & Bit-for-Bit Reproducibility (v0.3.11)
Each official release separates CI-rebuilt provenance from maintainer-signed PyPI distributions (starshield-forensics-0.3.11.spdx.json):
starshield.pyz(Bit-for-Bit Reproducible Zipapp): Rebuilt directly from source in GitHub Actions with isolated SLSA Build Level 3 provenance (multiple.intoto.jsonlviaslsa-framework/slsa-github-generator) and GitHub OIDC + Sigstore (FulcioX.509 +Rekor) attestations at/attestations;.whl&.tar.gz(sdistDistributions): Signed offline by the maintainer with OpenSSHEd25519(SHA256SUMS.sigverified againstKEYS.pubprior to CI publication) and published via PyPI Trusted Publisher PEP 740 digital attestations;SPDX 2.3 SBOM (
starshield-forensics-0.3.11.spdx.json): Records SHA-256 digests acrossstarshield.pyz,.whl, and.tar.gzand is Sigstore-attested in CI.
# 1. Verify Sigstore X.509 + Rekor build & SBOM attestations via GitHub CLI:
gh attestation verify starshield.pyz -R Ziqi/starshield-forensics
# 2. Verify isolated SLSA Build Level 3 provenance (.intoto.jsonl):
slsa-verifier verify-artifact starshield.pyz \
--provenance-path multiple.intoto.jsonl \
--source-uri github.com/Ziqi/starshield-forensics
# 3. Offline verification using standard OpenSSH (>=8.2p1) & SHA256SUMS:
ssh-keygen -Y verify -f KEYS.pub -I "2196305+Ziqi@users.noreply.github.com" -n file -s SHA256SUMS.sig < SHA256SUMS
shasum -a 256 -c SHA256SUMS
# 4. Rebuild starshield.pyz & SPDX 2.3 SBOM from source and verify version & digest parity:
python3 scripts/build_reproducible.py --verify
python3 scripts/generate_spdx_sbom.py --verifyGovernance, Cross-Tool Verification & Security Reporting
Cross-Tool & Specification Test Harness (
538Vectors):scripts/verify_cross_tool_forensics.py(6LevelDB WAL vectors,6PNG/JPEG container vectors, and526check-digit/registry vectors; compares against GoogledfindexeddbandPillowwhen installed via--require-external, or runs standalone self-checks without claiming external concordance)Security Insights & Licensing:
SECURITY-INSIGHTS.yml·SECURITY.md·REUSE.toml· Concept DOI:10.5281/zenodo.24145804(currently resolves to archivedv0.3.7:10.5281/zenodo.24156262)Security Assurance Case & Scope Boundaries:
SECURITY_ASSURANCE_CASE.mdPrivate Vulnerability Reporting (48h Ack SLA):
SECURITY.md· GitHub Private Vulnerability ReportingGovernance & Contribution Standards:
GOVERNANCE.md·CONTRIBUTING.md·CODE_OF_CONDUCT.mdAuthor: Ziqi Xiao (
@Ziqi) — Documentation Portal · GitHub Issues
Available Tools
7 toolsstarshield_demoRun StarShield Clean-Room Synthetic DemoBRead-onlyIdempotent
Execute StarShield's 5 deterministic offline triage engines on embedded 100% synthetic specification vectors (LevelDB 32KiB CRC32C WAL carving, PNG/JPEG ICC & 8BIM container inspection, Luhn/IBAN Mod-97/SWIFT validation, and UTC timestamp corroboration).
Inputs: no named parameters.
starshield_inspect_image_tamperInspect PNG/JPEG Container StructureARead-onlyIdempotent
CONTAINER STRUCTURE OBSERVATION ONLY (NOT TAMPER OR FORGERY DETECTION): Deterministically verify RFC 2083 PNG chunk CRC32 integrity (IHDR/IDAT/IEND/iCCP) and ISO 10918 JPEG APP2 ICC_PROFILE / APP13 Photoshop 8BIM resource blocks alongside benign OS-save caveats.
Inputs: image_path (required).
starshield_inspect_pdf_tamperInspect PDF Container Structure & Incremental Save RevisionsARead-onlyIdempotent
CONTAINER STRUCTURE OBSERVATION ONLY (NOT TAMPER OR FORGERY DETECTION): Deterministically inspect ISO 32000 PDF container structure offline for multi-revision %%EOF / xref / startxref incremental save history, Info/XMP producer metadata, and embedded action cues (/JavaScript, /Launch, /EmbeddedFiles) alongside benign e-signature, form-fill, and linearization caveats.
Inputs: pdf_path (required).
starshield_parse_leveldb_logParse LevelDB .log WAL Structural SkeletonBRead-onlyIdempotent
Carve uncompacted Chromium/Electron LevelDB .log write-ahead log records with 32 KiB Castagnoli CRC32C (polynomial 0x82F63B78, mask delta 0xA282EAD8) verification. Default masked mode withholds raw free-form prose and returns deterministic structural skeletons (offsets, soft-delete flags, visible numeric currency amounts, and session-fingerprinted <IBAN_GB_XXXX_01> / <ENTITY_XXXX_01> placeholders whose IBAN/BIC tokens expose 2-letter ISO country codes).
Inputs: log_path (required), schema_mode.
starshield_precheck_leveldbPrecheck Chromium / Electron Local LevelDB StorageARead-onlyIdempotent
Perform a read-only millisecond diagnostic and GO/PARTIAL/NO_GO_COMPACTED_OR_UNSUPPORTED feasibility check on a local Chromium browser (Chrome/Edge/Brave Local Storage & existing LevelDB-backed IndexedDB, WhatsApp Web, browser extensions) or Electron desktop app (Microsoft Teams, Slack Local Storage) directory or .log/.ldb file without leaking raw content. Distinguishes compacted .ldb SSTables and non-LevelDB SQLite stores (such as newly created Chrome 156+ IndexedDB stores, while existing LevelDB stores remain in LevelDB).
Inputs: target_path (required), schema_mode.
starshield_triage_jsonTriage Exported Messaging JSON Structural SkeletonBRead-onlyIdempotent
Enumerate soft-deleted and edited records in exported messaging JSON artifacts. Default masked mode withholds raw chat prose and emits deterministic structural skeletons with visible numeric currency amounts and session-fingerprinted <IBAN_GB_XXXX_01> / <TRC20_XXXX_01> / <ENTITY_XXXX_01> tokens (IBAN/BIC tokens expose 2-letter ISO country codes).
Inputs: json_path (required), schema_mode.
starshield_validate_financial_iocsValidate Identifier Checksums OfflineARead-onlyIdempotent
Scan text offline to extract and mathematically verify ISO/IEC 7812 Luhn card numbers, 89-country ISO 13616 IBAN Mod-97 accounts, 250-territory ISO 9362 SWIFT/BIC codes, UK Sort Code + Account pairs, US ABA Routing numbers, ISO 11649 RF Creditor References, ISO 17442 LEIs, TRON TRC-20 Base58Check, and Ethereum EIP-55 addresses. Check-digit and format validation confirms mathematical syntax only; it does NOT indicate fraud or prove that a payment occurred.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct artifact type or action: LevelDB precheck vs. WAL parsing are clearly separated by purpose (feasibility gate vs. record carving), and JSON/image/PDF/financial-IOC tools operate on non-overlapping inputs. The only soft spot is starshield_demo, which re-runs the same engines on synthetic vectors and could be mistaken for a real analysis invocation, though its description flags it clearly.
All tools share a uniform starshield_ prefix followed by a verb_noun pattern (precheck_leveldb, parse_leveldb_log, triage_json, inspect_image_tamper, validate_financial_iocs, inspect_pdf_tamper). starshield_demo drops the verb_noun form, and the _tamper suffix on the inspect_* tools semantically conflicts with their explicit 'NOT tamper detection' scope.
Seven tools is well within the ideal 3-15 range and each covers a distinct forensic surface (LevelDB precheck, WAL carving, JSON triage, image containers, PDF containers, IOC validation). No tool feels redundant or bolted on beyond the demo helper.
The surface covers LevelDB, messaging JSON, PNG/JPEG, PDF, and financial identifier validation, but notably lacks any tool to parse the non-LevelDB SQLite stores (e.g. Chrome 156+ IndexedDB) that the precheck tool explicitly recognizes. Timestamp corroboration is only reachable via the synthetic demo, and there is no report/export or findings-aggregation step, leaving dead ends after analysis.
Maintenance
Related MCP Connectors
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
55-tool cryptography MCP server: hashing, encryption, signatures, PQC, X.509, CMS and COSE.
12 Binary/Forensics MCP tools: entropy triage, ELF/PE/WASM disasm, PCAP, EXIF, SQLite, ZIP.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA governed MCP server for digital-forensics and incident-response (DFIR) work, exposing curated forensic tools (Volatility 3, Plaso, RegRipper, etc.) through a single FastMCP HTTP endpoint with bearer-token authentication and tamper-evident audit logging.MIT
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server for autonomous, spoliation-proof disk-image triage with self-correcting verification loop.MIT
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server that exposes deterministic NTFS timestomp detection tools for autonomous forensic triage, with architectural guarantees against evidence modification.MIT
- FlicenseAqualityDmaintenanceMCP server for read-only forensic analysis of evidence files using local utilities (file, ExifTool, strings, Volatility).3-