# sarvegna/automated-anti-forensics-detection-system architecture

> Architecture diagram of the GitHub repository sarvegna/automated-anti-forensics-detection-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sarvegna/automated-anti-forensics-detection-system
- Repository: https://github.com/sarvegna/automated-anti-forensics-detection-system

## Overview

This is a Streamlit digital-forensics and anti-forensics investigation tool. An investigator supplies an evidence file by browser upload or local path; the app hands it to a central router for evidence validation, hashing, identification, and applicable artifact analyses. Results are scored and assembled into findings for display, reporting, and investigation history. The graph preserves the documented analysis branches, including event logs, browser databases, memory, NTFS, hidden files, and YARA. Some router dispatch and reporting details are unsampled, so those relationships are shown only where supported or marked unverified.

Main entry points: [`core/analysis_router.py`](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/analysis_router.py) (Analysis router), [`app/streamlit_app.py`](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/app/streamlit_app.py) (Streamlit app), [`core/evidence_object.py`](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evidence_object.py) (Evidence object), [`core/browser_db_analysis.py`](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/browser_db_analysis.py) (Browser database analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Investigation interface"]
  node_streamlit["Streamlit app<br/>[streamlit_app.py]"]
end

subgraph group_intake["Evidence intake"]
  node_router["Analysis router<br/>[analysis_router.py]"]
  node_evidence["Evidence object<br/>[evidence_object.py]"]
  node_validation["File validation<br/>[validation.py]"]
  node_integrity["SHA-256 integrity<br/>[integrity.py]"]
  node_identifier["Artifact identification"]
end

subgraph group_analysis["Artifact analysis"]
  node_timestamps["Timestamp analysis"]
  node_hidden["Hidden-file checks"]
  node_yara["YARA scanning<br/>[yara_analysis.py]"]
  node_evtx["EVTX reader<br/>[evtx_reader.py]"]
  node_eventlog["Event-log analysis"]
  node_browserdb["Browser database analysis"]
  node_browserhistory["Browser history analysis"]
  node_memory["Memory analysis<br/>[memory_analysis.py]"]
  node_ntfs["NTFS analysis<br/>[ntfs_analysis.py]"]
  node_gaps["Timeline gap detection<br/>[gap_detection.py]"]
end

subgraph group_results["Findings and risk"]
  node_risk["Risk scoring<br/>[risk_scoring.py]"]
  node_findings["Findings<br/>[findings.py]"]
end

subgraph group_persistence["Reporting and records"]
  node_reporting["Report generation<br/>[reporting.py]"]
  node_storage[("Investigation history and audit log<br/>[storage.py]")]
end

node_investigator(("Investigator"))

node_investigator -->|"submits evidence"| node_streamlit
node_streamlit -.->|"initiates analysis"| node_router
node_router -->|"creates evidence"| node_evidence
node_evidence -->|"validates file"| node_validation
node_evidence -->|"hashes evidence"| node_integrity
node_router -->|"identifies artifact"| node_identifier
node_identifier -->|"checks NTFS volume"| node_ntfs
node_router -->|"analyzes timestamps"| node_timestamps
node_router -->|"checks hidden files"| node_hidden
node_router -->|"runs YARA"| node_yara
node_router -->|"reads EVTX"| node_evtx
node_router -->|"analyzes events"| node_eventlog
node_eventlog -->|"detects timeline gaps"| node_gaps
node_router -->|"analyzes browser database"| node_browserdb
node_browserdb -->|"analyzes visits"| node_browserhistory
node_browserhistory -->|"detects timeline gaps"| node_gaps
node_router -->|"analyzes memory"| node_memory
node_router -->|"analyzes NTFS"| node_ntfs
node_router -->|"scores results"| node_risk
node_router -->|"builds findings"| node_findings
node_browserdb -->|"creates findings"| node_findings
node_streamlit -->|"saves investigation"| node_storage
node_streamlit -.->|"generates reports"| node_reporting

click node_streamlit "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/app/streamlit_app.py"
click node_router "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/analysis_router.py"
click node_evidence "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evidence_object.py"
click node_validation "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/validation.py"
click node_integrity "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/integrity.py"
click node_identifier "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evidence_identifier.py"
click node_timestamps "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/timestamp_analysis.py"
click node_hidden "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/hidden_file_detection.py"
click node_yara "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/yara_analysis.py"
click node_evtx "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evtx_reader.py"
click node_eventlog "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/eventlog_analysis.py"
click node_browserdb "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/browser_db_analysis.py"
click node_browserhistory "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/browser_analysis.py"
click node_memory "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/memory_analysis.py"
click node_ntfs "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/ntfs_analysis.py"
click node_gaps "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/gap_detection.py"
click node_risk "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/risk_scoring.py"
click node_findings "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/findings.py"
click node_reporting "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/reporting.py"
click node_storage "https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/storage.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit toneBlue
class node_router,node_evidence,node_validation,node_integrity,node_identifier toneAmber
class node_timestamps,node_hidden,node_yara,node_evtx,node_eventlog,node_browserdb,node_browserhistory,node_memory,node_ntfs,node_gaps toneMint
class node_risk,node_findings toneRose
class node_reporting,node_storage,node_investigator toneIndigo
```

## Components

### Investigation interface

- [Streamlit app](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/app/streamlit_app.py): `app/streamlit_app.py`

### Evidence intake

- [Analysis router](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/analysis_router.py): `core/analysis_router.py`
- [Evidence object](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evidence_object.py): `core/evidence_object.py`
- [File validation](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/validation.py): `core/validation.py`
- [SHA-256 integrity](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/integrity.py): `core/integrity.py`
- [Artifact identification](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evidence_identifier.py): `core/evidence_identifier.py`

### Artifact analysis

- [Timestamp analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/timestamp_analysis.py): `core/timestamp_analysis.py`
- [Hidden-file checks](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/hidden_file_detection.py): `core/hidden_file_detection.py`
- [YARA scanning](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/yara_analysis.py): `core/yara_analysis.py`
- [EVTX reader](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/evtx_reader.py): `core/evtx_reader.py`
- [Event-log analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/eventlog_analysis.py): `core/eventlog_analysis.py`
- [Browser database analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/browser_db_analysis.py): `core/browser_db_analysis.py`
- [Browser history analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/browser_analysis.py): `core/browser_analysis.py`
- [Memory analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/memory_analysis.py): `core/memory_analysis.py`
- [NTFS analysis](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/ntfs_analysis.py): `core/ntfs_analysis.py`
- [Timeline gap detection](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/gap_detection.py): `core/gap_detection.py`

### Findings and risk

- [Risk scoring](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/risk_scoring.py): `core/risk_scoring.py`
- [Findings](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/findings.py): `core/findings.py`

### Reporting and records

- [Report generation](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/reporting.py): `core/reporting.py`
- [Investigation history and audit log](https://github.com/sarvegna/automated-anti-forensics-detection-system/blob/main/core/storage.py): `core/storage.py`

### Other components

- **Investigator**

## Connections

- Investigator → Streamlit app: submits evidence (evidence: `app/streamlit_app.py`)
- Streamlit app → Analysis router: initiates analysis (evidence: `app/streamlit_app.py`)
- Analysis router → Evidence object: creates evidence (evidence: `core/analysis_router.py`)
- Evidence object → File validation: validates file (evidence: `core/evidence_object.py`)
- Evidence object → SHA-256 integrity: hashes evidence (evidence: `core/evidence_object.py`)
- Analysis router → Artifact identification: identifies artifact (evidence: `core/analysis_router.py`)
- Artifact identification → NTFS analysis: checks NTFS volume (evidence: `core/evidence_identifier.py`)
- Analysis router → Timestamp analysis: analyzes timestamps (evidence: `core/analysis_router.py`)
- Analysis router → Hidden-file checks: checks hidden files (evidence: `core/analysis_router.py`)
- Analysis router → YARA scanning: runs YARA (evidence: `core/analysis_router.py`)
- Analysis router → EVTX reader: reads EVTX (evidence: `core/analysis_router.py`)
- Analysis router → Event-log analysis: analyzes events (evidence: `core/analysis_router.py`)
- Event-log analysis → Timeline gap detection: detects timeline gaps (evidence: `core/eventlog_analysis.py`)
- Analysis router → Browser database analysis: analyzes browser database (evidence: `core/analysis_router.py`)
- Browser database analysis → Browser history analysis: analyzes visits (evidence: `core/browser_db_analysis.py`)
- Browser history analysis → Timeline gap detection: detects timeline gaps (evidence: `core/browser_analysis.py`)
- Analysis router → Memory analysis: analyzes memory (evidence: `core/analysis_router.py`)
- Analysis router → NTFS analysis: analyzes NTFS (evidence: `core/analysis_router.py`)
- Analysis router → Risk scoring: scores results (evidence: `core/analysis_router.py`)
- Analysis router → Findings: builds findings (evidence: `core/analysis_router.py`)
- Browser database analysis → Findings: creates findings (evidence: `core/browser_db_analysis.py`)
- Streamlit app → Investigation history and audit log: saves investigation (evidence: `app/streamlit_app.py`)
- Streamlit app → Report generation: generates reports (evidence: `app/streamlit_app.py`)
