SIEM threat detection lab with Splunk REST API integration, MITRE ATT&CK alert triage in Python, and live web dashboard.
AI-Powered SOC Dashboard is a security detection and alert triage lab connecting cloud monitoring with threat detection rules. It processes telemetry from an AWS EC2 instance running Ubuntu where SSH authentication logs and auditd execution logs are forwarded to a Splunk Enterprise instance. A Python triage application queries Splunk's REST API for detection hits, calculates severity scores, correlates related events, and stores alert states. A web dashboard deployed on Vercel provides a visual interface for reviewing security incidents and compliance mappings.
Live web dashboard: https://ai-powered-soc-dashboard-delta.vercel.app
- Splunk REST API Ingestion: Python service queries Splunk search endpoints over HTTPS using basic authentication and parses JSON search job results (
triage/fetch_alerts.py). - MITRE ATT&CK Detections:
T1110(SSH Brute Force): Detects 5 or more failed SSH password attempts grouped by source IP and username in Linux authentication logs. Validated against simulated attack traffic.T1078(Valid Accounts): Query logic detects successful SSH logins following 5 or more failed login attempts from the same IP address.T1059(Command and Scripting Interpreter): Query logic identifies suspicious download utility execution (wget,curl) captured in Linux auditd logs.
- Rule-Based Risk Scoring (
triage/enrich.py): Scoring is rule-based and deterministic rather than a black-box model, allowing every score to be audited:T1110:min(100, 20 + (failed_attempts * 2))T1078:min(100, 60 + prior_failed_attempts)T1059: Fixed score of75- Severity mapping: Critical (>= 85), High (>= 60), Medium (>= 35), Low (< 35).
- Alert State & Deduplication (
triage/state.py): Computes an MD5 hash of event attributes including the raw event timestamp_time(rather than ingestion time) to ensure consistent fingerprinting. Persistsseen_hashesinstate.jsonto prevent duplicate alerts across repeated or--watchruns. - Compliance Mapping (
docs/compliance-mapping.md):T1110: ISO 27001:2022 A.8.5 (Secure authentication) & NIST SP 800-53 Rev 5 AC-7 (Unsuccessful Logon Attempts).T1078: ISO 27001:2022 A.8.2 (Privileged access rights) & NIST SP 800-53 Rev 5 AC-2 (Account Management).T1059: ISO 27001:2022 A.8.16 (Monitoring activities) & NIST SP 800-53 Rev 5 AU-6 (Audit Record Review, Analysis, and Reporting).
- CI Pipeline: Automated linting with Ruff, type checking with Mypy, dependency vulnerability scanning with
pip-audit, and unit testing with Pytest.
Stack verified from requirements.txt and triage/requirements.txt.
| Layer | Technologies |
|---|---|
| Triage & API | Python 3.12, FastAPI, Uvicorn, Requests, Pydantic, python-dotenv |
| Testing & Code Quality | Pytest 9, Ruff, Mypy, pip-audit, Docker |
| SIEM & Ingestion | Splunk Enterprise REST API, Linux auditd (audit.log), SSH auth.log |
| Frontend & Hosting | Static HTML/CSS/JS dashboard, Vercel Serverless (vercel.json) |
- Python 3.12
- Splunk Enterprise instance with REST API access (port 8089)
git clone https://github.com/Mustafa-Hazard/ai-powered-soc-dashboard.git
cd ai-powered-soc-dashboardpython3 -m venv .venv
source .venv/bin/activate
pip install -r triage/requirements.txtcp triage/.env.example triage/.env
Update triage/.env with your Splunk connection details.
python3 triage/main.py
To run the automated test suite:
pytest tests/ -v
| Variable | Description | Example Placeholder |
|---|---|---|
SPLUNK_HOST |
IP address or hostname of the Splunk instance | 192.168.1.100 |
SPLUNK_PORT |
Splunk REST API port | 8089 |
SPLUNK_USER |
Splunk administrator username | admin |
SPLUNK_PASS |
Splunk administrator password | your_splunk_password |
SPLUNK_VERIFY_SSL |
Enable or disable TLS certificate verification | false |
ai-powered-soc-dashboard/
├── api/ # Vercel serverless function entrypoint
├── docs/ # Phase write-ups (Splunk setup, detection engineering, compliance)
├── tests/ # Unit tests for scoring, fetching, and enrichment
├── triage/ # Python alert triage engine
│ ├── config.py # Splunk configuration and detection queries
│ ├── enrich.py # Scoring and event correlation logic
│ ├── fetch_alerts.py # REST API client for Splunk jobs
│ ├── state.py # Alert deduplication and state saving
│ └── main.py # Entrypoint for scheduled triage runs
├── index.html # Web dashboard interface
└── vercel.json # Vercel deployment configuration
- Connected Splunk REST API queries with a Python automation pipeline to parse and score raw security logs.
- Documented clear mappings between technical MITRE ATT&CK detections and compliance frameworks (ISO 27001:2022 and NIST SP 800-53 Rev 5).
- Future improvements: add email or webhook notifications (e.g. Slack/Discord) for critical score alerts, expand auditd rules to detect persistence via cron jobs, and containerize the triage worker into a background service.
