Skip to content
VBYTEQUEST7Public

About

Educational 4-Layer Mini SIEM & Agentic AI SOC Analyst built from university coursework and open-source security concepts. Features Sigma-style correlation, IsolationForest ML, VirusTotal/AbuseIPDB intel, MITRE ATT&CK mapping, and local Ollama XAI triage. For learning & defensive research only.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic AI Mini SIEM & SOC Workbench (v3.0)

Python Agentic AI Ollama Threat Intel MITRE

An end-to-end, local-first Agentic AI Security Operations Center (SOC) & 4-Layer Mini SIEM platform. It combines Sigma-style correlation rules, unsupervised Machine Learning (IsolationForest), VirusTotal & AbuseIPDB Threat Intelligence, and an autonomous 5-step Local LLM SOC Analyst (Ollama) with Explainable AI (XAI) reasoning and defanged multi-format incident reporting.


Core Capabilities Walkthrough

  1. Setting up Ollama & the Local LLM (setup_ollama.py): Automated daemon health check, optional model auto-pull (qwen2.5:1.5b), and English JSON inference benchmark—100% local with zero data leakage.
  2. Starting the Agentic AI SOC Analyst (run_soc.py / llm_worker.py): Launches an autonomous 5-step investigation agent backed by a SQLite WAL VIP Priority Queue (priority=100 on analyst click, priority=200 on Re-run).
  3. Feeding Security Logs into the System:
    • Continuous Simulators: 5 live generators (web, auth, network, endpoint, threat_intel).
    • Web UI Log Feeder: Paste raw multi-line logs, upload .log/.txt/.json files, or trigger 1-Click Attack Scenarios (Multi-Stage APT Kill-Chain, SSH Brute-Force, Mimikatz LSASS Dump, Port Scan).
    • CLI Log Feeder (log_feeder.py): Ingest external log files or scenarios directly from the terminal.
  4. AI-Assisted Incident Investigation: Context-aware incident synthesis plus an interactive Ask AI SOC Lead chat assistant.
  5. IOC & Threat Analysis: Automatic extraction of IPv4 addresses, URLs, domains, and SHA-256/MD5 hashes from raw telemetry, plus an on-demand IOC Threat Scanner tab.
  6. VirusTotal & AbuseIPDB Integration (threat_intel_service.py): Hybrid architecture supporting real VirusTotal v3 & AbuseIPDB v2 API keys (via .env) with SQLite TTL caching (ioc_intel_cache) and automatic realistic offline simulation fallback when running without keys.
  7. MITRE ATT&CK Mapping (mitre_kb.py): Deterministic + contextual mapping to validated MITRE ATT&CK Tactics & Technique IDs (T1190, T1110.001, T1046, T1003.001, T1059.001, T1547.001, T1048) with clickable links to attack.mitre.org.
  8. Severity & Confidence Analysis: Transparent 0–100% AI Confidence meter computed from signature strength, VT/AbuseIPDB verdicts, event burst volume, and cross-layer correlation, automatically escalating severity when warranted.
  9. Defanging Malicious Indicators (defang.py): Converts live indicators (185.190.140[.]22, hxxp://malware-download-site[.]com) across the UI and exported reports to prevent accidental clicks during sharing.
  10. Generating Structured Investigation Reports: One-click export to Printable Executive HTML / Save-as-PDF, Markdown (.md), and SOAR-ready JSON (.json).
  11. Understanding Why the AI Reached Its Conclusions (Explainable AI / XAI): Dedicated panel displaying evidence-backed decision factors, confidence score weights, and the 5-Step Autonomous Agent Execution Trace with per-step latency (ms).

System Architecture

flowchart TD
    subgraph Ingest["1. Telemetry Sources & Log Feeding"]
        SIM["5 Live Simulators<br/>(Web, SSH, NetFlow, Endpoint, IOCs)"]
        FEED["Manual Log Ingestion<br/>Web Paste / File Upload / log_feeder.py"]
    end

    subgraph Norm["2. Normalization & Storage (SQLite WAL)"]
        AGG["log_aggregator.py<br/>URL-Decoded Parsing & O(1) IOC Enrichment"]
        DB[("siem.db<br/>normalized_events | alerts | ai_jobs | ioc_intel_cache")]
    end

    subgraph Detect["3. Detection & 5-Step Agentic AI SOC Analyst"]
        TA["Tier A: YAML Correlation Rules<br/>(Threshold + Time-Window + Cooldown Dedup)"]
        TB["Tier B: Online IsolationForest<br/>(Zero-SQL 10s RAM Sliding Window)"]
        AGENT["Tier C: Agentic AI Analyst (llm_worker.py)<br/>Step 1: IOC Extractor & Defanger<br/>Step 2: VirusTotal & AbuseIPDB Lookup<br/>Step 3: Cross-Source Kill-Chain Correlation<br/>Step 4: MITRE ATT&CK & Confidence Scoring<br/>Step 5: Ollama LLM Synthesis & XAI Trace"]
    end

    subgraph Workbench["4. Real-Time SOC Workbench (Flask + Socket.IO)"]
        UI["SOC Dashboard (http://127.0.0.1:5000)<br/>• Live Triage, XAI Reasoning & Safe Defang Toggle<br/>• IOC Threat Scanner & Log Ingest Studio<br/>• Export: Printable PDF/HTML, Markdown, JSON"]
    end

    SIM & FEED --> AGG --> DB
    DB --> TA & TB --> DB
    DB <-->|"VIP Priority Queue"| AGENT
    TA & TB & AGENT -. "WebSocket Push" .-> UI
    UI <--> DB
Loading

Quick Start Guide

Step 1: Install Python Dependencies

pip install -r requirements.txt

Step 2: Set Up & Verify Ollama Local LLM

Install Ollama, start ollama serve, and run the built-in setup verifier:

python setup_ollama.py --auto-pull

Step 3: (Optional) Configure VirusTotal & AbuseIPDB Keys

Copy .env.example to .env and add your free API keys. (If omitted, the platform automatically runs in Hybrid Simulated Threat Intel mode so every feature works offline out of the box).

cp .env.example .env

Step 4: Start the Full Agentic SOC Stack

# Start Core SIEM + Agentic AI Worker + Web Dashboard + 5 Traffic Simulators
python run_soc.py

# Or start Core SIEM + Agentic AI + Dashboard only (feed logs manually via Web UI or CLI)
python run_soc.py --no-simulators

Open http://127.0.0.1:5000 in your browser.

Step 5: Feed Custom Logs via CLI (Optional)

# Inject a multi-stage APT kill-chain scenario
python log_feeder.py --scenario apt_killchain

# Or ingest an external log file
python log_feeder.py --file path/to/security_events.log

Project Files Overview

File Role
setup_ollama.py Verifies Ollama connectivity, pulls qwen2.5:1.5b, and benchmarks English JSON output
run_soc.py Unified supervisor managing all core SIEM processes and simulators
config.py / .env.example Centralized configuration, .env loader, and English-only CJK/diacritic guards
db_utils.py Concurrency-safe SQLite WAL schema, indexes, and automatic v3.0 migrations
defang.py Extracts IPv4s, URLs, domains, SHA256/MD5 hashes, and defangs malicious indicators
threat_intel_service.py Hybrid VirusTotal v3 + AbuseIPDB v2 client with SQLite TTL caching & fallback
mitre_kb.py Deterministic & keyword-driven MITRE ATT&CK v15 technique mapper
llm_worker.py 5-Step Agentic AI SOC Analyst producing narratives, confidence scores, & XAI traces
log_aggregator.py Real-time log tailer and universal multi-format log normalizer
log_feeder.py CLI & library log feeder + 4 preset attack scenario injectors
detection_engine.py Tier A YAML threshold/window correlation engine + Tier B online IsolationForest
dashboard.py & templates/index.html Real-time WebSocket SOC Workbench & multi-format report exporter (HTML/PDF, .md, .json)

About

Educational 4-Layer Mini SIEM & Agentic AI SOC Analyst built from university coursework and open-source security concepts. Features Sigma-style correlation, IsolationForest ML, VirusTotal/AbuseIPDB intel, MITRE ATT&CK mapping, and local Ollama XAI triage. For learning & defensive research only.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages