How dfirvault/forensiq works
What this project is (type + purpose)
ForensIQ is a Windows-only, Python/Streamlit-based DFIR log analysis application that uses an external LLM service (Ollama) plus a local vector store (ChromaDB) / embeddings stack (sentence-transformers / HuggingFace) to accelerate and structure forensic investigations.
From the README + deps list, it’s best understood as a single-process “desktop web app”:
• UI: Streamlit web UI running locally on the analyst’s workstation
• Core: Python analysis pipeline (parsing, chunking, retrieval, prompting, summarization)
• External service: Ollama (local or remote) hosting the LLM model (e.g., qwen-long)
• Storage: local files for uploads + output artifacts; likely a local Chroma persistence dir for embeddings
What the file tree tells you about the architecture
Top-level:
• ForensIQ.py — effectively the entire application (UI + orchestration + pipeline) in one file.
• ForensIQLauncher.bat — Windows launcher wrapper (starts Streamlit).
• ModelFile — Ollama model definition used to create an optimized model (ollama create qwen-long -f Modelfile).
• test.csv, test_evtx_data.csv — sample data / fixtures.
• LICENSE, README.md — standard.
README-derived components & tech stack to capture
Explicit dependencies imply key sub-systems:
• Streamlit: UI, file uploader, user inputs (Ollama IP/model selection), results rendering
• pandas: CSV/tabular ingestion + transformations
• python-evtx: EVTX log parsing (Windows Event Logs)
• langchain / langchain-community / langchain-ollama / langchain-huggingface: prompt orchestration + connectors (Ollama LLM, HF embeddings)
• sentence-transformers: embedding model runtime
• chromadb: vector DB for retrieval (RAG), likely local persistent store
Runtime topology:
• Analyst runs Streamlit on Windows
• App reads user-provided files/folders
• App parses logs into structured records
• App chunks / embeds and stores in Chroma
• App retrieves relevant chunks and sends prompts to Ollama LLM
• App generates outputs: JSON/CSV + logs
Windows Workstation
• Streamlit UI (ForensIQ.py)
• Core Orchestrator / Controller (inside ForensIQ.py)
Ingestion Layer
• File uploader / folder scanner
• File type detection & queueing (CSV, EVTX, “other logs”)
Parsing & Normalization Layer
• EVTX parser (python-evtx)
• CSV parser (pandas)
• Normalizer (schema alignment, timestamps, fields)
Indexing / RAG Prep
• Chunking / document builder
• Embeddings generator (SentenceTransformers / HF)
Vector Store
• ChromaDB (local)
LLM Service
• Ollama server (local or remote host)
• Model: qwen-long created from ModelFile
Analysis / Reasoning
• LangChain prompt templates + chains
• Retrieval step: Chroma → context
• LLM inference: context + question → findings
Outputs
• JSON reports
• CSV summaries
• App logs / audit trail
• (Optional) local output directory
Also include:
User → Streamlit UI
• “Upload logs / select folder, set Ollama IP/model, start analysis”
Streamlit UI → Ingestion
• “File(s) / folder path”
Ingestion → Parsing
• “Raw file bytes / paths”
Parsing → Normalization
• “Structured events/rows”
Normalization → Chunking/Docs
• “Documents / event batches”
Chunking → Embeddings
• “Text chunks”
Embeddings → ChromaDB
• “Vectors + metadata (host, user, event id, timestamp…)”
Streamlit UI (query/action) → Retrieval (ChromaDB)
• “Search query / investigation task”
ChromaDB → LangChain Orchestrator
• “Top-k relevant chunks”
LangChain Orchestrator → Ollama LLM
• “Prompt with retrieved context”
Ollama LLM → LangChain Orchestrator
• “Findings / narrative / structured response”
Orchestrator → Outputs
• “JSON/CSV report + logs”
Additionally show the network boundary:
• If Ollama is remote: UI/Orchestrator → (HTTP) → Ollama Host
• If local: same-machine call
• Streamlit (UI)
• pandas (CSV)
• python-evtx (EVTX)
• LangChain (orchestration)
• sentence-transformers / HuggingFace embeddings
• ChromaDB
• Ollama + qwen-long model (from ModelFile)