[EN]
The Turkish (TR) version is below.
Transforming threat hunting from a manual task into a continuous engineering pipeline.
This repository treats detection engineering as code. Sigma rules are versioned, validated against curated attack/benign fixtures, and automatically compiled into SIEM-ready queries through GitHub Actions.
- Write vendor-agnostic Sigma rules under
/rules/sigma/. - Validate those rules against positive and negative fixtures under
/tests/dataset/. - Run syntax checks with Sigma CLI.
- Build Splunk SPL and Elasticsearch Lucene outputs into
/build/. - Upload generated artifacts from CI for downstream SIEM use.
The validation workflow is driven by /tests/validation_cases.json and executed by python tools/validate_datasets.py.
- Positive fixtures ensure each rule fires on the intended attack sample.
- Negative fixtures ensure the same rule does not fire on curated benign activity.
- The dataset folder includes Mordor-style logs and lightweight lab fixtures formatted as Sysmon-like JSON/JSONL for deterministic CI validation.
- Enriched fixtures such as
mordor_lsass_dump.jsonandschtasks_create.jsoncontain small event sequences instead of a single alerting row, so rules are tested with realistic context.
rules/sigma/ Sigma detection rules
tests/dataset/ Positive and negative datasets
tests/validation_cases.json
tools/validate_datasets.py
tools/run_sigma_cli.py Offline-safe sigma wrapper
tools/build_sigma.py Build helper for SIEM outputs
build/ Generated artifacts
| Tactic | Technique ID | Technique Name | Sigma Rule | Status |
|---|---|---|---|---|
| Credential Access | T1003.001 |
LSASS Memory Dumping | proc_access_win_lsass_susp_access.yml |
Active |
| Execution | T1059.001 |
PowerShell Encoded Command | proc_creation_win_powershell_encoded.yml |
Active |
| Persistence | T1053.005 |
Scheduled Task/Job | proc_creation_win_schtasks_creation.yml |
Active |
| Impact | T1490 |
Inhibit System Recovery | proc_creation_win_vssadmin_delete_shadows.yml |
Active |
python tools/validate_datasets.pypip install sigma-cli
python tools/run_sigma_cli.py plugin install splunk
python tools/run_sigma_cli.py plugin install elasticsearch
python tools/run_sigma_cli.py plugin install sysmontools/run_sigma_cli.py is used instead of calling sigma directly so the project can run in restricted environments without depending on user-profile cache paths or live MITRE metadata downloads.
python tools/run_sigma_cli.py check rules/sigma/python tools/build_sigma.pyGenerated files:
build/splunk/windows_detections.splbuild/elastic/windows_detections.txt
build/ is intentionally generated and not committed to git.
The GitHub Actions pipeline in /.github/workflows/sigma_pipeline.yml performs:
- Fixture validation
- Sigma syntax/lint checks
- Splunk and Elasticsearch builds
- Artifact upload
[TR]
Threat hunting sürecini manuel iş yükünden sürekli çalışan bir mühendislik pipeline’ına dönüştürmek.
Bu repo detection engineering sürecini kod gibi ele alır. Sigma kuralları versiyonlanır, saldırı ve benign fixture’lar üzerinde doğrulanır, ardından GitHub Actions ile SIEM’e hazır sorgulara dönüştürülür.
- Vendor-agnostic Sigma kuralları
/rules/sigma/altında tutulur. - Kurallar
/tests/dataset/altındaki pozitif ve negatif fixture’lara karşı test edilir. - Sigma CLI ile syntax/lint kontrolü yapılır.
- Splunk SPL ve Elasticsearch Lucene çıktıları
/build/altına üretilir. - CI çıktıları artifact olarak yüklenir ve SIEM entegrasyonu için hazır hale gelir.
Doğrulama akışı /tests/validation_cases.json ile tanımlanır ve python tools/validate_datasets.py ile çalıştırılır.
- Pozitif fixture’lar her kuralın hedeflenen saldırı örneğinde tetiklendiğini doğrular.
- Negatif fixture’lar aynı kuralın benign aktivitede tetiklenmediğini doğrular.
- Dataset klasörü, deterministik CI doğrulaması için Mordor tarzı loglar ve Sysmon benzeri JSON/JSONL formatında hafif lab fixture’ları içerir.
mordor_lsass_dump.jsonveschtasks_create.jsongibi zenginleştirilmiş fixture’lar tek event yerine küçük bir event akışı içerir; böylece kurallar daha gerçekçi bağlamda test edilir.
rules/sigma/ Sigma kuralları
tests/dataset/ Pozitif ve negatif datasetler
tests/validation_cases.json
tools/validate_datasets.py
tools/run_sigma_cli.py Offline uyumlu sigma wrapper'ı
tools/build_sigma.py SIEM build helper'ı
build/ Üretilen artifact'ler
| Taktik | Teknik ID | Teknik Adı | Sigma Kuralı | Durum |
|---|---|---|---|---|
| Credential Access | T1003.001 |
LSASS Memory Dumping | proc_access_win_lsass_susp_access.yml |
Aktif |
| Execution | T1059.001 |
PowerShell Encoded Command | proc_creation_win_powershell_encoded.yml |
Aktif |
| Persistence | T1053.005 |
Scheduled Task/Job | proc_creation_win_schtasks_creation.yml |
Aktif |
| Impact | T1490 |
Inhibit System Recovery | proc_creation_win_vssadmin_delete_shadows.yml |
Aktif |
python tools/validate_datasets.pypip install sigma-cli
python tools/run_sigma_cli.py plugin install splunk
python tools/run_sigma_cli.py plugin install elasticsearch
python tools/run_sigma_cli.py plugin install sysmonsigma komutunu doğrudan çağırmak yerine tools/run_sigma_cli.py kullanılıyor; bunun nedeni kısıtlı ortamlarda kullanıcı profilindeki cache dizinlerine veya canlı MITRE metadata indirmelerine bağımlı kalmamak.
python tools/run_sigma_cli.py check rules/sigma/python tools/build_sigma.pyÜretilen dosyalar:
build/splunk/windows_detections.splbuild/elastic/windows_detections.txt
build/ klasörü bilinçli olarak generate edilir ve git’e commit edilmez.
/.github/workflows/sigma_pipeline.yml aşağıdaki adımları çalıştırır:
- Fixture validation
- Sigma syntax/lint kontrolü
- Splunk ve Elasticsearch build
- Artifact upload