# sameerfakhoury/forenzmap architecture

> Architecture diagram of the GitHub repository sameerfakhoury/forenzmap, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sameerfakhoury/forenzmap
- Repository: https://github.com/sameerfakhoury/forenzmap

## Overview

##### Project Type and Purpose
- ForenZmap is a command-line tool focused on extracting, parsing, and visualizing key Windows registry data (from SYSTEM.hiv and SOFTWARE.hiv files) for forensic analysis.
- Its primary functionality is to parse 14 significant registry keys, decode time-related values, and present the results as a mind map in an HTML report.

##### Key Components
a. Main Application Entry Point:
- Main script (ForenZmap.py) that initializes the tool and handles user inputs.
b. Core Modules (located in _ForenZmap_Code):
- Module for Application logic: _ForenZmap_Application.py
- Banner and UI handling: _ForenZmap_Banner.py and _ForenZmap_Interface.py
- Specific registries or keys parsers such as ComputerName, ConnectionsHistory, Policies, ProfileList, ShellFolders, Winlogon, and others.
- Mind Map Generation: _ForenZmap_MindMap.py (which later feeds into the HTML report creation).
- Modules handling data extraction, analyses, and possibly decoding (e.g., TimeZoneInformation, CurrentVersion).
c. Dependency Management and External Libraries:
- The requirements.txt indicates that any external dependencies (like libraries for parsing or HTML generation) should also be acknowledged.
d. Input/Output and User Interaction:
- Input: User-supplied paths to the hives.
- Output: HTML report with a mind map visualization.
e. Supporting Components:
- Modules such as _ForenZmap_Run.py, _ForenZmap_Select.py which may control the flow of execution.
- Additional modules (e.g., _ForenZmap_Exclusions.py, _ForenZmap_NetworkCards.py) that are likely dedicated to specific data extraction routines.

##### Technological and Architectural Choices
- The project follows a modular design where each Python file encapsulates a portion of the forensic data extraction or visualization process.
- Although it’s a CLI tool, there is an implicit separation of the user interface (output banners and input prompts) from the core parsing and processing logic.
- The design also reflects a layered approach:
- User Interface Layer: Handles inputs, outputs, and initial instructions.
- Application/Control Layer: Coordinates the operation between reading input files, invoking various parsing modules, and managing the overall workflow.
- Data/Processing Layer: Contains the actual business logic for parsing registry data, performing extractions, and generating the visualization (both the mind map and the HTML report).

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["User Input (SYSTEM.hiv, SOFTWARE.hiv)"]:::input
    B["Main Application (ForenZmap.py)"]:::core

    subgraph "User Interface Components"
        C["Banner & UI (ForenZmap_Banner)"]:::ui
        D["User Interaction (ForenZmap_Interface)"]:::ui
    end

    subgraph "Flow Control Modules"
        E["Run Control (ForenZmap_Run)"]:::control
        F["Selection Control (ForenZmap_Select)"]:::control
    end

    subgraph "Parsing Modules"
        G["Application Logic (ForenZmap_Application)"]:::parser
        H["ComputerName Parser"]:::parser
        I["ConnectionsHistory Parser"]:::parser
        J["CurrentVersion Parser"]:::parser
        K["Policies Parser"]:::parser
        L["ProfileList Parser"]:::parser
        M["ShellFolders Parser"]:::parser
        N["Winlogon Parser"]:::parser
        O["Exclusions Module"]:::parser
        P["NetworkCards Module"]:::parser
        Q["TimeZoneInformation Module"]:::parser
        R["Parsed Data"]:::parser
    end

    S["Data Aggregation & Processing"]:::core
    T["Visualization (MindMap Generation & HTML Report)"]:::viz
    U["External Dependencies (requirements.txt)"]:::external

    %% Flow Connections
    A --> B
    B --> C
    B --> D

    C --> E
    D --> F

    E --> G
    F --> G

    %% Trigger individual parsing modules from Application Logic
    G --> H
    G --> I
    G --> J
    G --> K
    G --> L
    G --> M
    G --> N
    G --> O
    G --> P
    G --> Q

    %% All parser modules converge to a consolidated data node
    H --> R
    I --> R
    J --> R
    K --> R
    L --> R
    M --> R
    N --> R
    O --> R
    P --> R
    Q --> R
    G --> R

    R --> S
    S --> T
    U --- T

    %% Styles
    classDef input fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef core fill:#FDEBD0,stroke:#873600,stroke-width:2px;
    classDef ui fill:#D5F5E3,stroke:#117864,stroke-width:2px;
    classDef control fill:#FCF3CF,stroke:#B7950B,stroke-width:2px;
    classDef parser fill:#FADBD8,stroke:#C0392B,stroke-width:2px;
    classDef viz fill:#D6EAF8,stroke:#2874A6,stroke-width:2px;
    classDef external fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;

    %% Click Events
    click B "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap.py"
    click C "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Banner.py"
    click D "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Interface.py"
    click G "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Application.py"
    click H "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_ComputerName.py"
    click I "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_ConnectionsHistory.py"
    click J "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_CurrentVersion.py"
    click K "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Policies.py"
    click L "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_ProfileList.py"
    click M "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_ShellFolders.py"
    click N "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Winlogon.py"
    click O "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Exclusions.py"
    click P "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_NetworkCards.py"
    click Q "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_TimeZoneInformation.py"
    click T "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_MindMap.py"
    click E "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Run.py"
    click F "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/_ForenZmap_Code/_ForenZmap_Select.py"
    click U "https://github.com/sameerfakhoury/forenzmap/blob/main/ForenZmap/requirements.txt"
```
