Overview
Chronos-DFIR’s Case Management System (Etapa 2 roadmap) provides a structured workflow for multi-file investigations. Cases organize evidence files, analysis results, journal entries, IOCs, and narrative documentation in a single DuckDB database.Case Management Architecture
Database Schema
All case data is stored in a single DuckDB file (chronos_cases.duckdb) with 7 tables:
Design Principles
Offline-First
Offline-First
No external dependencies: DuckDB is an embedded database (no server process)Portable: Single
.duckdb file contains entire investigation databaseBackup-friendly: Copy chronos_cases.duckdb to backup or share with teamThread-Safe
Thread-Safe
Write lock (
threading.Lock()) ensures concurrent write operations don’t corrupt databaseConcurrent reads OK: Multiple analysis processes can read case data simultaneouslyImplementation (engine/case_db.py line 25):Backward Compatible
Backward Compatible
Without case open: Interface behaves identically to current single-file modeWith case open: Additional UI elements (sidebar, journal, phase selector) become visibleFile uploads: Can still upload standalone files (stored as single-file “cases” with auto-generated names)
Case Workflow
Creating a Case
Define Case Metadata
API Endpoint: Response:Implementation (
POST /api/casesRequest:engine/case_router.py line 68):Create Investigation Phases
API Endpoint: Response:
POST /api/cases/{case_id}/phasesExample phases:- Initial Triage — Quick timeline review, IOC extraction
- Malware Analysis — Reverse engineering, YARA scanning
- Lateral Movement Tracing — Network logs, authentication events
- Impact Assessment — File encryption scope, data exfiltration
- Remediation — IOC blocking, system restoration
Upload Evidence Files
Current upload flow modified to accept
case_id and phase_id parameters.Enhanced endpoint: POST /upload?case_id=xxx&phase_id=yyyProcessing:- File ingested normally (parsed to CSV in
upload/directory) - Chain of custody recorded:
- SHA256 hash computed during streaming upload
- File metadata saved to
case_filestable
- Automatic analysis:
- Sigma/YARA rules evaluated
- Forensic report generated
- Results saved to
analysis_resultstable
engine/case_db.py line 298):Multi-File Timeline
Goal: Combine events from multiple files into a unified timeline.Journal & Notes
Adding Journal Entries
API Endpoint:POST /api/cases/{case_id}/journal
Entry Types:
note— General observation or reminderfinding— Important discovery (e.g., “Identified initial access via phishing email”)hypothesis— Investigative theory to testai_insight— AI-generated analysis or suggestion (future feature)
Retrieving Journal
API Endpoint:GET /api/cases/{case_id}/journal
Response:
Journal UI (Roadmap)
Planned features (Etapa 3):Timeline-Integrated Notes
Click any row in the timeline grid → “Add Note” context menuResult: Journal entry linked to specific event (via timestamp + row ID)
Phase-Specific Journal View
Sidebar shows journal entries filtered to current phaseNavigation: Click phase → view only notes from that investigation stage
Markdown Support
Journal content supports:
- Headers, lists, code blocks
- Links to external resources
- Embedded screenshots (Base64-encoded)
IOC Management
Upserting IOCs
API Endpoint:POST /api/cases/{case_id}/iocs (custom endpoint - not yet in case_router.py)
Upsert logic (engine/case_db.py line 455):
- If IOC already exists (same
ioc_type+ioc_value), updatelast_seenandcontext - Otherwise, insert new IOC
Retrieving IOCs
API Endpoint:GET /api/cases/{case_id}/iocs
Response:
IOC Types
Supported types:ip— IPv4/IPv6 addressesdomain— DNS domains and subdomainshash— MD5, SHA1, SHA256, SHA512email— Email addressesurl— Full URLsfilename— Malicious filenamesregistry— Registry key pathsmutex— Malware mutex namesuser— Compromised user accountscertificate— SSL certificate thumbprints
Cross-File IOC Correlation
Use case: IP address appears in multiple evidence files across different phases. Query:Case Narrative
Auto-Generated Narrative
Goal: Produce an executive summary of the investigation in Markdown format. API Endpoint:PUT /api/cases/{case_id}/narrative
Request:
Narrative Structure (Recommended)
AI-Generated Narrative (Roadmap)
Etapa 6 feature: Automatic narrative generation from:- Journal entries
- Sigma/YARA detections
- IOC lists
- Timeline statistics
- Aggregate all case data (files, journal, IOCs, analysis results)
- Generate structured prompt for LLM (via MCP Server)
- LLM produces Markdown narrative
- Analyst reviews and edits
- Save to
case_narrativetable
Case Export
Export Format: .chronos-case
Roadmap feature (Etapa 6): Bundle entire investigation as portable archive.
Contents:
- Share investigation with external team (law enforcement, IR vendor)
- Archive completed cases for compliance
- Load case into another Chronos-DFIR instance
API Reference Summary
Case CRUD
| Endpoint | Method | Description |
|---|---|---|
/api/cases | POST | Create new case |
/api/cases | GET | List all cases |
/api/cases/{case_id} | GET | Get case details + phases |
/api/cases/{case_id} | PUT | Update case metadata |
/api/cases/{case_id} | DELETE | Archive case (soft delete) |
Phases
| Endpoint | Method | Description |
|---|---|---|
/api/cases/{case_id}/phases | POST | Create phase |
/api/cases/{case_id}/phases | GET | List phases for case |
/api/cases/{case_id}/phases/{phase_id} | PUT | Update phase |
Files
| Endpoint | Method | Description |
|---|---|---|
/api/cases/{case_id}/files | GET | List files in case |
/api/cases/{case_id}/files?phase_id={id} | GET | List files in specific phase |
Journal
| Endpoint | Method | Description |
|---|---|---|
/api/cases/{case_id}/journal | POST | Add journal entry |
/api/cases/{case_id}/journal | GET | Get journal entries |
/api/cases/{case_id}/journal?phase_id={id} | GET | Get entries for phase |
IOCs
| Endpoint | Method | Description |
|---|---|---|
/api/cases/{case_id}/iocs | GET | Get all IOCs for case |
/api/cases/{case_id}/iocs?phase_id={id} | GET | Get IOCs for phase |
Narrative
| Endpoint | Method | Description |
|---|---|---|
/api/cases/{case_id}/narrative | GET | Get case narrative |
/api/cases/{case_id}/narrative | PUT | Save/update narrative |
Testing Case Management APIs
Using cURL
Create a case:Using Python
Roadmap Integration Timeline
From README.md (line 306):| Etapa | Status | Description |
|---|---|---|
| Etapa 2 | PENDING | Case DB + Router (CRUD complete, needs activation) |
| Etapa 3 | PENDING | Frontend Sidebar + Journal UI |
| Etapa 4 | PENDING | Multi-File + Cross-Correlation |
| Etapa 5 | PENDING | MCP Server + AI Chat |
| Etapa 6 | PENDING | Auto-Narrative + .chronos-case export |
- Install DuckDB:
pip install duckdb - Mount case router in
app.py:app.include_router(case_router) - Create integration tests (pytest + httpx)
- Verify CRUD operations against real database
Next Steps
Evidence Ingestion
Learn how to ingest multi-format forensic artifacts for case investigations
Detection Rules
Understand how Sigma and YARA detections integrate with case analysis
Filtering & Searching
Navigate large multi-file timelines with advanced filtering techniques