|
1 | | -# 🛡️ Detection-as-Code (DaC) Factory: Sigma Pack for Windows Security |
| 1 | +# Detection-as-Code (DaC) Factory: Sigma Pack for Windows Security |
| 2 | + |
| 3 | +*🇹🇷 Türkçe versiyonu aşağıdadır. / Turkish version is below.* |
2 | 4 |
|
3 | 5 | > **Transforming threat hunting from a manual task into a continuous engineering pipeline.** |
4 | 6 |
|
5 | | -## 🚀 Proje Vizyonu (Ruleset Philosophy) |
| 7 | +## Project Vision (Ruleset Philosophy) |
| 8 | +Modern Security Operations Centers (SOC) must move beyond managing rule creation and testing processes manually. This project is built upon the "Detection-as-Code" (DaC) philosophy to transform traditional SIEM query writing into a **Software Engineering (CI/CD)** discipline. |
| 9 | + |
| 10 | +Our goal is to write platform-agnostic Sigma rules, automatically validate them against industry-standard **Mordor APT simulation logs**, and convert them into Splunk (SPL) and Elasticsearch (Lucene/KQL) formats within seconds via GitHub Actions. |
| 11 | + |
| 12 | +## System Architecture (Pipeline Automation) |
| 13 | + |
| 14 | +1. **Code:** New Cyber Threat Intelligence (CTI) is written in YAML format (Sigma). |
| 15 | +2. **Commit:** The code is pushed to GitHub. |
| 16 | +3. **CI/CD (GitHub Actions):** |
| 17 | + - YAML syntax checking (Linting). |
| 18 | + - Logical validation. |
| 19 | + - Rules are automatically compiled into the `/build` directory for **Splunk** and **Elasticsearch** (Build). |
| 20 | +4. **Deploy:** The generated queries are ready to be integrated into SIEM systems. |
| 21 | + |
| 22 | +## MITRE ATT&CK Coverage Matrix |
| 23 | + |
| 24 | +The tactics and techniques covered by our current detection rules are mapped below: |
| 25 | + |
| 26 | +| Tactic | Technique ID | Technique Name | Sigma Rule | Status | |
| 27 | +| :--- | :--- | :--- | :--- | :---: | |
| 28 | +| **Credential Access** | `T1003.001` | LSASS Memory Dumping | `proc_access_win_lsass_susp_access.yml` | Active | |
| 29 | +| **Execution** | `T1059.001` | PowerShell | `proc_creation_win_powershell_encoded.yml` | Active | |
| 30 | +| **Persistence** | `T1053.005` | Scheduled Task/Job | `proc_creation_win_schtasks_creation.yml` | Active | |
| 31 | +| **Impact** | `T1490` | Inhibit System Recovery (Ransomware) | `proc_creation_win_vssadmin_delete_shadows.yml` | Active | |
| 32 | + |
| 33 | +## Validation with Golden Dataset |
| 34 | +To avoid reinventing the wheel and to ensure industry-standard calibration, the **OTRF Mordor** open-source dataset is utilized in this project. Our rules pass through rigorous Security QA checks using real-world (APT29, etc.) simulation logs located in the `/tests/dataset/` directory. |
| 35 | + |
| 36 | +## How to Run Locally? |
| 37 | + |
| 38 | +To test the project in your own environment or to manually generate SIEM queries: |
| 39 | + |
| 40 | +```bash |
| 41 | +# Install dependencies |
| 42 | +pip install sigma-cli |
| 43 | +sigma plugin install splunk elasticsearch sysmon |
| 44 | + |
| 45 | +# Convert all rules to Splunk SPL |
| 46 | +sigma convert -t splunk -p sysmon rules/sigma/ |
| 47 | + |
| 48 | +# Convert to Elasticsearch (Lucene) |
| 49 | +sigma convert -t lucene -p sysmon rules/sigma/ |
| 50 | +``` |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +# Proje Vizyonu (Ruleset Philosophy) 🇹🇷 |
6 | 55 | Modern Güvenlik Operasyon Merkezleri (SOC), kural yazımını ve test süreçlerini manuel olarak yönetmenin ötesine geçmelidir. Bu proje, geleneksel SIEM sorgu yazarlığını bir **Yazılım Mühendisliği (CI/CD)** disiplinine dönüştürmek amacıyla "Detection-as-Code" (DaC) felsefesiyle inşa edilmiştir. |
7 | 56 |
|
8 | 57 | Amacımız; platform bağımsız (vendor-agnostic) Sigma kuralları yazmak, bu kuralları sektör standardı olan **Mordor APT simülasyon logları** ile otomatik olarak test etmek ve GitHub Actions aracılığıyla saniyeler içinde Splunk (SPL) ve Elasticsearch (Lucene/KQL) dillerine dönüştürmektir. |
9 | 58 |
|
10 | | -## 🏗️ Sistem Mimarisi (Pipeline Otomasyonu) |
| 59 | +## Sistem Mimarisi (Pipeline Otomasyonu) |
11 | 60 |
|
12 | 61 | 1. **Code:** Yeni tehdit istihbaratı (CTI) YAML formatında (Sigma) yazılır. |
13 | 62 | 2. **Commit:** Kod GitHub'a pushlanır. |
14 | | -3. **CI/CD (GitHub Actions):** - YAML syntax kontrolü yapılır (Linting). |
| 63 | +3. **CI/CD (GitHub Actions):** |
| 64 | + - YAML syntax kontrolü yapılır (Linting). |
15 | 65 | - Mantıksal doğrulama gerçekleştirilir. |
16 | 66 | - Kurallar otomatik olarak `/build` klasörüne **Splunk** ve **Elasticsearch** dilleri için derlenir (Build). |
17 | 67 | 4. **Deploy:** Üretilen sorgular SIEM sistemlerine entegre edilmeye hazırdır. |
18 | 68 |
|
19 | | -## 🎯 MITRE ATT&CK Kapsam Matrisi (Coverage Matrix) |
| 69 | +## MITRE ATT&CK Kapsam Matrisi |
20 | 70 |
|
21 | 71 | Mevcut tespit kurallarımızın kapsadığı taktik ve teknikler aşağıda haritalandırılmıştır: |
22 | 72 |
|
23 | | -| Tactic | Technique ID | Technique Name | Sigma Rule | Status | |
| 73 | +| Taktik (Tactic) | Teknik ID | Teknik Adı | Sigma Kuralı | Durum | |
24 | 74 | | :--- | :--- | :--- | :--- | :---: | |
25 | | -| **Credential Access** | `T1003.001` | LSASS Memory Dumping | `proc_access_win_lsass_susp_access.yml` | 🟢 Active | |
26 | | -| **Execution** | `T1059.001` | PowerShell | `proc_creation_win_powershell_encoded.yml` | 🟢 Active | |
27 | | -| **Persistence** | `T1053.005` | Scheduled Task/Job | `proc_creation_win_schtasks_creation.yml` | 🟢 Active | |
28 | | -| **Impact** | `T1490` | Inhibit System Recovery (Ransomware) | `proc_creation_win_vssadmin_delete_shadows.yml` | 🟢 Active | |
| 75 | +| **Credential Access** | `T1003.001` | LSASS Memory Dumping | `proc_access_win_lsass_susp_access.yml` | Aktif | |
| 76 | +| **Execution** | `T1059.001` | PowerShell | `proc_creation_win_powershell_encoded.yml` | Aktif | |
| 77 | +| **Persistence** | `T1053.005` | Scheduled Task/Job | `proc_creation_win_schtasks_creation.yml` | Aktif | |
| 78 | +| **Impact** | `T1490` | Inhibit System Recovery (Ransomware) | `proc_creation_win_vssadmin_delete_shadows.yml` | Aktif | |
29 | 79 |
|
30 | | -## 🧪 Altın Veri Seti (Golden Dataset) İle Doğrulama |
| 80 | +## Altın Veri Seti (Golden Dataset) İle Doğrulama |
31 | 81 | Bu projede tekerleği yeniden icat etmemek ve endüstri standartlarında kalibrasyon sağlamak için **OTRF Mordor** açık kaynak veri seti kullanılmıştır. Kurallarımız, `/tests/dataset/` dizinindeki gerçek dünya (APT29 vb.) simülasyonlarına ait loglar üzerinde kalite kontrolünden (Security QA) geçmektedir. |
32 | 82 |
|
33 | | -## 🛠️ Nasıl Çalıştırılır? |
| 83 | +## Nasıl Çalıştırılır? |
34 | 84 |
|
35 | 85 | Projeyi kendi ortamınızda test etmek veya SIEM sorgularını üretmek için: |
36 | 86 |
|
|
0 commit comments