ThreatLens is a mini-SIEM / detection engineering project that simulates how modern Security Operations Centers (SOCs) ingest threat intelligence, correlate security events, apply MITRE ATT&CK mapping, score risk, escalate alerts, and export SOC-ready outputs.
This project was built to demonstrate real-world detection engineering, SOC workflows, and DFIR concepts — not just log parsing.
- Loads external IOC feeds (IP-based indicators)
- Matches indicators against security events
- Correlates events by source IP
- Detects malicious behavior (e.g., brute-force attempts)
- Counts repeated occurrences
-
Automatically maps detections to:
- Tactic
- Technique
- Technique ID (e.g., T1110 – Brute Force)
-
Calculates risk based on:
- Threat intel confidence
- Frequency of events
-
Assigns severity levels: LOW / MEDIUM / HIGH
-
Generates unique Alert IDs
-
Tracks alert status:
- NEW
- ESCALATED
-
Records first_seen and last_seen timestamps
- Automatically escalates alerts when risk increases
- Simulates Tier-1 → Tier-2 SOC workflows
- Exports alerts to timestamped JSON files
- Ready for SIEM ingestion or case management systems
ThreatLens/
│
├── intel/
│ └── threat_intel.json # Threat intelligence feed (IOCs)
│
├── logs/
│ └── Sample_auth.log # Sample authentication logs
│
├── mitre/
│ └── mitre_mapping.py # MITRE ATT&CK tactic & technique mappings
│
├── alert-manager.py # SOC alert lifecycle management
├── detector.py # Event detection logic
├── matcher.py # IOC matching engine
├── escalation_engine.py # Alert escalation rules
├── risk_engine.py # Risk scoring logic
├── exporter.py # SOC-style alert export
├── rules.py # Detection thresholds & rules
├── events.json # Parsed security events
├── requirements.txt # Dependencies (standard library only)
└── README.md
ThreatLens/
│
├── intel/
│ └── threat_intel.json # Threat intelligence feed (IOCs)
│
├── events.json # Security events
├── rules.py # MITRE ATT&CK mappings
├── risk_engine.py # Risk scoring logic
├── alert_manager.py # Alert lifecycle management
├── escalation_engine.py # Alert escalation rules
├── exporter.py # SOC-style alert export
├── matcher.py # Core detection engine
└── README.md
- Load threat intelligence (IOC feeds)
- Load security events
- Match events against IOCs
- Map detections to MITRE ATT&CK
- Calculate risk score & severity
- Create SOC-style alerts
- Escalate alerts when required
- Export alerts to JSON for SOC handoff
This project uses Python standard library only.
No external dependencies are required.
python --version
```bash
pip install -r requirements.txtpython matcher.py-
Alerts printed to the terminal
-
Exported alert file created:
alerts_YYYYMMDD_HHMMSS.json
{
"alert_id": "ALERT-9F3A1C2B",
"status": "ESCALATED",
"first_seen": "2025-01-01 12:01:00",
"last_seen": "2025-01-01 12:01:00",
"details": {
"source_ip": "185.220.101.1",
"attack_type": "Brute Force",
"risk_score": 12,
"severity": "HIGH",
"mitre": {
"tactic": "Credential Access",
"technique": "Brute Force",
"technique_id": "T1110"
}
}
}- Detection Engineering
- Threat Intelligence Analysis
- MITRE ATT&CK Framework
- SOC Alert Lifecycle Management
- Risk Scoring & Escalation
- Python backend engineering
- DFIR fundamentals
- Multiple threat intel feeds
- Alert suppression & tuning
- Case management simulation
- CLI interface
- Time-based correlation windows
Victor Egwu Cybersecurity Analyst | Detection Engineering | SOC
⚠️ This project is for educational and portfolio purposes only.