Forensics-grade evidence handling ISO/IEC 27037 + NIST SP 800-86 chain of custody, hash-chained evidence DB, PQC signatures, classification + TLP markings.

The four pillars

Integrity

SHA-256 hash chain across the evidence DB. Append-only rows. Any modification cascades a chain-hash mismatch detectable by digger verify.

Authenticity

Optional PQC signature over the chain tip with a NIST FIPS-finalized algorithm (default ML-DSA-65). Binds the case state to a specific custodian.

Chain of custody

ISO/IEC 27037 + NIST SP 800-86 sidecar JSON. Records who/what/when/where/why/how for every action.

Handling markings

Classification (UNCLASSIFIED / CUI / etc.) and TLP markings stored in case metadata, propagated to exports, and respected by sharing filters.

ISO/IEC 27037:2012

The ISO standard for the identification, collection, acquisition, and preservation of digital evidence. §6 mandates that the following be recorded for evidence to be admissible:

NIST SP 800-86 adds the collection / examination / analysis / reporting lifecycle with documented integrity verification at each stage.

The chain-of-custody record

Source: digger/coc/record.py.

Created automatically when a case is opened. Lives at <case-dir>/chain_of_custody.json. Sample:

{
  "case_id": "d3a3be40-841c-43c7-9549-e31e7f464626",
  "custodian_name": "analyst",
  "custodian_role": "Analyst",
  "custodian_contact": "",
  "legal_authority": "host owner consent",
  "investigative_scope": "endpoint forensic triage",
  "target_host": "lockedin.local",
  "target_os": "macOS-15.1-arm64-arm-64bit-Mach-O",
  "time_zone": "PDT",
  "time_source": "local OS clock",
  "classification": "UNCLASSIFIED",
  "handling_caveats": [],
  "tlp": "TLP:AMBER",
  "iso_27037_compliance": true,
  "nist_800_86_compliance": true,
  "events": [
    {
      "event_type": "case_opened",
      "timestamp_utc": 1747780123.4,
      "iso_8601": "2026-05-20T22:08:43Z",
      "actor_name": "analyst",
      "actor_user": "analyst",
      "actor_host": "lockedin.local",
      "location": "Darwin 25.1.0",
      "methodology": "automated digger workflow",
      "notes": "case directory initialized",
      "tool": "digger",
      "tool_version": "0.1.0"
    },
    { "event_type": "collection_started", ... },
    { "event_type": "collection_finished", ... }
  ]
}

Recorded events

Lifecycle hooks append events automatically:

EventTriggered by
case_openedFirst write to the case directory
collection_started / collection_finishedEach digger collect run
scan_started / scan_finishedEach digger scan run
triage_started / triage_finishedEach digger triage run
report_generatedEach report rendering
case_signed / case_verifiedPQC sign / verify
case_exported / case_importedSTIX/MISP/TAXII export
case_encrypted / case_decryptedHybrid PQC encryption
evidence_transferredManual: when the case directory changes hands
case_closedEnd of investigation
manual_noteFree-form analyst annotation

You can append manual events programmatically:

from digger.coc import open_custody
from digger.coc.record import append_event

coc = open_custody("./case-1", case_id="...")
append_event("./case-1", coc, "manual_note", "Reviewed by D. Smith, no concerns.")

Tamper detection

Three independent checks layer on top of each other:

  1. Chain verificationdigger verify walks the whole DB. Mismatch cascades from the tampered row forward.
  2. PQC signaturedigger pqc verify over the chain tip. A modified chain tip won't verify against an earlier signature.
  3. CoC event log — every digger operation appends an event. Gaps and timing mismatches in the event log are themselves evidence of tampering.

Classification + handling caveats

Set per case at collection time:

digger --classification CUI \
       --tlp TLP:AMBER+STRICT \
       investigate --case-dir ./case-1

Stored in the CoC record and in case metadata. Picked up by every exporter (STIX, MISP, ATT&CK Navigator) so externally-shared bundles carry the correct marking. Findings can override per-finding TLP through the triage step.

Compliance mapping

The bundled iso_27037 framework catalog evaluates digger's own evidence handling against the standard. Run:

digger compliance assess --case-dir ./case-1 --frameworks iso_27037

It evaluates the controls that are mechanically checkable (presence of artifacts, count, time records) and flags the rest as manual for analyst sign-off (acquisition methodology, justifiability, repeatability).

Operational guidance