A lightweight Python project that detects suspicious domains, monitors file access activity, and sends structured alerts to Splunk via HEC. The goal is to keep everything simple, readable, and easy for anyone to run.
- Parses DNS logs (
.jsonl) - Optional VirusTotal enrichment
- Normalized JSON alert output
- Safe
--dry-runmode (no external calls)
- Real-time directory monitoring using
watchdog - Replay mode using sample data
- Outputs clean, Splunk-friendly events
- Sends alerts to Splunk HEC
- Uses secure environment variables (no secrets in repo)
- Includes a safe sample config
.
├── suspicious_domain_detector.py
├── file_access_monitor.py
├── splunk_sender.py
│
├── config/
│ └── sample_config.json
│
├── data/
│ └── sample_dns.jsonl
│
├── logs/ # ignored
├── requirements.txt
└── README.md
# optional virtual environment
python -m venv .venv
# activate
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# install dependencies
pip install -r requirements.txtSet these before sending anything to Splunk:
export SPLUNK_HEC_URL="https://your-splunk-hec-endpoint"
export SPLUNK_HEC_TOKEN="your-token"Windows PowerShell:
setx SPLUNK_HEC_URL "https://your-splunk-hec-endpoint"
setx SPLUNK_HEC_TOKEN "your-token"python suspicious_domain_detector.py --input data/sample_dns.jsonl --dry-run
python file_access_monitor.py --path .
python file_access_monitor.py --replay data/sample_events.jsonl
python splunk_sender.py --test
pandas
requests
watchdog
python-dotenv
Built to demonstrate:
- clear Python code
- simple detection logic
- Splunk HEC integration
- a clean project structure
Focused, minimal, and easy to review.