<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Detection-Rule on Tarragon</title><link>https://tarrragon.github.io/blog/tags/detection-rule/</link><description>Recent content in Detection-Rule on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Mon, 18 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/detection-rule/index.xml" rel="self" type="application/rss+xml"/><item><title>Splunk → Elastic Security Detection Rule Migration：6 段 phased playbook 跟 5 大踩雷</title><link>https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/splunk/migrate-to-elastic-security/</link><pubDate>Mon, 18 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/splunk/migrate-to-elastic-security/</guid><description>&lt;blockquote>
&lt;p>本文是跨 vendor migration playbook、cross-link 到 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/splunk/" data-link-title="Splunk" data-link-desc="業界 SIEM 標準、forwarder &amp;#43; indexer &amp;#43; search head 架構、SPL 為核心查詢語言、ingestion-based 計費跟偵測覆蓋率的 trade-off">Splunk&lt;/a>（source）跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/elastic-security/" data-link-title="Elastic Security" data-link-desc="Elastic Stack 上的 SIEM &amp;#43; EDR &amp;#43; Cloud Security 套件、OSS 起源、KQL/EQL/Lucene/ES|QL 多查詢語言、resource-based pricing">Elastic Security&lt;/a>（target）兩個 vendor overview。Migration playbook 跟 &lt;a href="https://tarrragon.github.io/blog/posts/vendor-%E6%B7%B1%E5%BA%A6%E6%8A%80%E8%A1%93%E6%96%87%E7%AB%A0%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84%E5%90%8C-vendor-%E7%B3%BB%E5%88%97%E7%9A%84%E9%96%8B%E5%A0%B4%E8%BC%AA%E6%9B%BF%E9%A9%97%E8%AD%89/" data-link-title="Vendor 深度技術文章方法論的演化紀錄：同 vendor 系列的開場輪替驗證" data-link-desc="vendor overview 飽和後要寫單一功能深度文章、需要選題與結構依據時回來。這套方法論的驗證來源與 cadence variant 在高風險場景（同 vendor sub-tool 系列）的實證。">vendor deep article methodology&lt;/a> 的 6-section flow 不同 — 是 &lt;em>phased process&lt;/em>（audit → translation → parallel run → cutover → cleanup）、強調 &lt;em>時間軸&lt;/em> 跟 &lt;em>回退邊界&lt;/em>。&lt;/p>&lt;/blockquote>
&lt;h2 id="為什麼遷cost--multi-vendor--cloud-native-三條-driver">為什麼遷：cost / multi-vendor / cloud-native 三條 driver&lt;/h2>
&lt;p>Splunk → Elastic 遷移在 2022+ 變主流選項、driver 通常三條疊加：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Driver&lt;/th>
 &lt;th>觸發場景&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Cost&lt;/strong>&lt;/td>
 &lt;td>Splunk per-GB ingest pricing 在 5+ TB/day 規模累積到無法接受、Elastic fixed-tier pricing 可省 50-70%&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Multi-vendor&lt;/strong>&lt;/td>
 &lt;td>想避免 SIEM lock-in、跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/google-security-operations/" data-link-title="Google Security Operations" data-link-desc="Google 雲原生 SIEM &amp;#43; SOAR &amp;#43; Mandiant threat intel 三合一（前 Chronicle）、UDM &amp;#43; YARA-L、fixed-price by data tier、PB-scale 友善">Sentinel&lt;/a> / &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/datadog-security/" data-link-title="Datadog Security" data-link-desc="Datadog observability platform 上的 security suite：Cloud SIEM &amp;#43; CSPM &amp;#43; CWS &amp;#43; AAP &amp;#43; Sensitive Data Scanner、跟 observability 同 plane">Datadog Security&lt;/a> 同時跑形成 portfolio&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Cloud-native&lt;/strong>&lt;/td>
 &lt;td>已用 Elasticsearch / Kibana 做 application observability、想統一 stack 走 Elastic Cloud / ECK&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>反向 driver（Elastic → Splunk）也存在但少數 — 主要是 &lt;em>合規 / 政府客戶要 Splunk Cloud GovCloud&lt;/em>、或 &lt;em>Splunk Premium ES 的 RBA + UEBA 成熟度仍領先&lt;/em>。本文聚焦 Splunk → Elastic、反向流程結構相同但 &lt;em>schema 對位方向相反&lt;/em>。&lt;/p>
&lt;h2 id="結構phased-migration-不是-6-section-deep-article">結構：phased migration 不是 6-section deep article&lt;/h2>
&lt;p>跟 single-feature deep article（&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/vendors/splunk/risk-based-alerting/" data-link-title="Splunk Risk-Based Alerting：從 alert per rule 到 score-aggregated notable" data-link-desc="Splunk Enterprise Security 的 RBA 方法論：risk score / modifier / notable 三層 model、ES 配置 step-by-step、tuning playbook（false positive / score inflation / threshold drift / decay）、capacity 成本、跟 SOAR &amp;#43; case management 整合">Splunk RBA&lt;/a>、Vault dynamic credential）不同、migration playbook 的核心是 &lt;em>time-sequenced phase&lt;/em> + &lt;em>回退邊界&lt;/em>。6 段 phase：&lt;/p></description><content:encoded><![CDATA[<blockquote>
<p>本文是跨 vendor migration playbook、cross-link 到 <a href="/blog/backend/07-security-data-protection/vendors/splunk/" data-link-title="Splunk" data-link-desc="業界 SIEM 標準、forwarder &#43; indexer &#43; search head 架構、SPL 為核心查詢語言、ingestion-based 計費跟偵測覆蓋率的 trade-off">Splunk</a>（source）跟 <a href="/blog/backend/07-security-data-protection/vendors/elastic-security/" data-link-title="Elastic Security" data-link-desc="Elastic Stack 上的 SIEM &#43; EDR &#43; Cloud Security 套件、OSS 起源、KQL/EQL/Lucene/ES|QL 多查詢語言、resource-based pricing">Elastic Security</a>（target）兩個 vendor overview。Migration playbook 跟 <a href="/blog/posts/vendor-%E6%B7%B1%E5%BA%A6%E6%8A%80%E8%A1%93%E6%96%87%E7%AB%A0%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84%E5%90%8C-vendor-%E7%B3%BB%E5%88%97%E7%9A%84%E9%96%8B%E5%A0%B4%E8%BC%AA%E6%9B%BF%E9%A9%97%E8%AD%89/" data-link-title="Vendor 深度技術文章方法論的演化紀錄：同 vendor 系列的開場輪替驗證" data-link-desc="vendor overview 飽和後要寫單一功能深度文章、需要選題與結構依據時回來。這套方法論的驗證來源與 cadence variant 在高風險場景（同 vendor sub-tool 系列）的實證。">vendor deep article methodology</a> 的 6-section flow 不同 — 是 <em>phased process</em>（audit → translation → parallel run → cutover → cleanup）、強調 <em>時間軸</em> 跟 <em>回退邊界</em>。</p></blockquote>
<h2 id="為什麼遷cost--multi-vendor--cloud-native-三條-driver">為什麼遷：cost / multi-vendor / cloud-native 三條 driver</h2>
<p>Splunk → Elastic 遷移在 2022+ 變主流選項、driver 通常三條疊加：</p>
<table>
  <thead>
      <tr>
          <th>Driver</th>
          <th>觸發場景</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><strong>Cost</strong></td>
          <td>Splunk per-GB ingest pricing 在 5+ TB/day 規模累積到無法接受、Elastic fixed-tier pricing 可省 50-70%</td>
      </tr>
      <tr>
          <td><strong>Multi-vendor</strong></td>
          <td>想避免 SIEM lock-in、跟 <a href="/blog/backend/07-security-data-protection/vendors/google-security-operations/" data-link-title="Google Security Operations" data-link-desc="Google 雲原生 SIEM &#43; SOAR &#43; Mandiant threat intel 三合一（前 Chronicle）、UDM &#43; YARA-L、fixed-price by data tier、PB-scale 友善">Sentinel</a> / <a href="/blog/backend/07-security-data-protection/vendors/datadog-security/" data-link-title="Datadog Security" data-link-desc="Datadog observability platform 上的 security suite：Cloud SIEM &#43; CSPM &#43; CWS &#43; AAP &#43; Sensitive Data Scanner、跟 observability 同 plane">Datadog Security</a> 同時跑形成 portfolio</td>
      </tr>
      <tr>
          <td><strong>Cloud-native</strong></td>
          <td>已用 Elasticsearch / Kibana 做 application observability、想統一 stack 走 Elastic Cloud / ECK</td>
      </tr>
  </tbody>
</table>
<p>反向 driver（Elastic → Splunk）也存在但少數 — 主要是 <em>合規 / 政府客戶要 Splunk Cloud GovCloud</em>、或 <em>Splunk Premium ES 的 RBA + UEBA 成熟度仍領先</em>。本文聚焦 Splunk → Elastic、反向流程結構相同但 <em>schema 對位方向相反</em>。</p>
<h2 id="結構phased-migration-不是-6-section-deep-article">結構：phased migration 不是 6-section deep article</h2>
<p>跟 single-feature deep article（<a href="/blog/backend/07-security-data-protection/vendors/splunk/risk-based-alerting/" data-link-title="Splunk Risk-Based Alerting：從 alert per rule 到 score-aggregated notable" data-link-desc="Splunk Enterprise Security 的 RBA 方法論：risk score / modifier / notable 三層 model、ES 配置 step-by-step、tuning playbook（false positive / score inflation / threshold drift / decay）、capacity 成本、跟 SOAR &#43; case management 整合">Splunk RBA</a>、Vault dynamic credential）不同、migration playbook 的核心是 <em>time-sequenced phase</em> + <em>回退邊界</em>。6 段 phase：</p>
<table>
  <thead>
      <tr>
          <th>Phase</th>
          <th>內容</th>
          <th>預估時長</th>
          <th>回退邊界</th>
          <th></th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><strong>Phase 0：rule audit</strong></td>
          <td>盤點 Splunk 端 rule、量化 precision / FP rate / alert volume</td>
          <td>1-2 週</td>
          <td>不影響 production</td>
          <td></td>
      </tr>
      <tr>
          <td><strong>Phase 1：schema 對位</strong></td>
          <td>SPL ↔ KQL / ES</td>
          <td>QL、CIM ↔ ECS、index ↔ data view 對應規格</td>
          <td>1-2 週</td>
          <td>不影響 production</td>
      </tr>
      <tr>
          <td><strong>Phase 2：translation</strong></td>
          <td>rule 一條條轉、AI-assisted + 人工 verify</td>
          <td>4-12 週</td>
          <td>翻譯失敗的 rule 退回 manual / 標 deferred</td>
          <td></td>
      </tr>
      <tr>
          <td><strong>Phase 3：parallel run</strong></td>
          <td>兩 SIEM 同時跑、alert 兩邊產出、累積 confidence</td>
          <td>4-8 週</td>
          <td>切回單 Splunk、Elastic 端關 alert</td>
          <td></td>
      </tr>
      <tr>
          <td><strong>Phase 4：cutover</strong></td>
          <td>alert routing 切到 Elastic、Splunk 仍 ingest 但不送 alert</td>
          <td>1 週</td>
          <td>routing 切回 Splunk、半小時內可逆</td>
          <td></td>
      </tr>
      <tr>
          <td><strong>Phase 5：cleanup</strong></td>
          <td>Splunk ingest 停、歷史資料 archive 到 S3、license decommission</td>
          <td>2-4 週</td>
          <td><strong>不可逆</strong> — 過早走會失去歷史查詢能力</td>
          <td></td>
      </tr>
  </tbody>
</table>
<p>整個遷移週期 4-9 個月、跟 single deep article 1-2 小時完全不同 scale。</p>
<h2 id="phase-0rule-audit-建-baseline">Phase 0：rule audit 建 baseline</h2>
<p>遷移前必須先知道 <em>current state</em>：</p>





<pre tabindex="0"><code class="language-spl" data-lang="spl">-- Splunk rule 盤點
| rest /servicesNS/-/-/saved/searches
  splunk_server=local search=&#34;alert&#34;
| where disabled=0
| eval rule_age=now()-strptime(updated, &#34;%Y-%m-%dT%H:%M:%S&#34;)
| stats count, avg(rule_age) by app, owner</code></pre><p>每條 rule 量化四個指標：</p>
<table>
  <thead>
      <tr>
          <th>指標</th>
          <th>怎麼算</th>
          <th>用途</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Alert volume / day</td>
          <td><code>index=_audit action=alert_fired rule_name=X</code> 過 30 天</td>
          <td>高 volume 先翻、cutover 期間影響大</td>
      </tr>
      <tr>
          <td>Precision (TP / total)</td>
          <td>SOC review 過去 30 天 alert、標 TP / FP / unknown</td>
          <td>低 precision 先翻（藉機 fix、不是直接複製問題）</td>
      </tr>
      <tr>
          <td>Detection coverage</td>
          <td>對應 MITRE ATT&amp;CK technique</td>
          <td>確認 Elastic 端有對應 coverage、不能漏 tactic</td>
      </tr>
      <tr>
          <td>Owner / 維護狀態</td>
          <td>rule 的 owner team + 最後 update 時間</td>
          <td>Owner 失聯的 rule 翻譯成本爆、考慮直接退役</td>
      </tr>
  </tbody>
</table>
<p><strong>Audit 階段的關鍵決策：哪些 rule 不翻譯</strong> — production 通常 30-50% rule 是 legacy / dead code / 已 deprecated；遷移是 <em>清理機會</em>、不是「全部複製過去」。</p>
<h2 id="phase-1schema-對位">Phase 1：Schema 對位</h2>
<p>Splunk 跟 Elastic 的 data model 沒有 1:1 mapping、必須先建對位 spec：</p>
<table>
  <thead>
      <tr>
          <th>Splunk concept</th>
          <th>Elastic 對應</th>
          <th>對位難度</th>
          <th></th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>SPL search language</td>
          <td>KQL（簡單）/ ES</td>
          <td>QL（複雜 query、PG 14+ piped）</td>
          <td>中、語法差距大但概念對齊</td>
      </tr>
      <tr>
          <td>Index</td>
          <td>Data view（read）/ data stream（write）</td>
          <td>低、概念相同</td>
          <td></td>
      </tr>
      <tr>
          <td>CIM data model</td>
          <td>Elastic Common Schema (ECS)</td>
          <td>中、欄位命名差、有對照表（CIM→ECS open source）</td>
          <td></td>
      </tr>
      <tr>
          <td>Macros</td>
          <td>Runtime fields / transforms / ingest pipeline</td>
          <td>高、Splunk macro 是 SPL fragment、Elastic 沒對等概念</td>
          <td></td>
      </tr>
      <tr>
          <td>Lookups</td>
          <td>Enrich processors / lookup index</td>
          <td>中、邏輯對等但 lifecycle 管法不同</td>
          <td></td>
      </tr>
      <tr>
          <td>Correlation search</td>
          <td>Detection rule（KQL / EQL / Threshold / ML）</td>
          <td>中、Splunk 一條 search、Elastic 拆 rule type</td>
          <td></td>
      </tr>
      <tr>
          <td>Summary index</td>
          <td>Transform / rollup</td>
          <td>高、Splunk <code>tstats</code> summary index 概念複雜</td>
          <td></td>
      </tr>
      <tr>
          <td>Notable event</td>
          <td>Alert + signal（Security app）</td>
          <td>低、Elastic 7.x+ 已成熟</td>
          <td></td>
      </tr>
      <tr>
          <td>Saved search</td>
          <td>Saved query</td>
          <td>低</td>
          <td></td>
      </tr>
      <tr>
          <td>Dashboard</td>
          <td>Kibana dashboard</td>
          <td>中、Splunk XML/SimpleXML 跟 Kibana JSON 不可直接轉</td>
          <td></td>
      </tr>
  </tbody>
</table>
<p><strong>Field mapping 是最大坑</strong>：Splunk 自由 schema（<code>extract</code> runtime）vs Elastic 強 type ECS。Splunk 端 <code>src_ip</code> 可能是 string；Elastic 端必須 <code>source.ip</code> 是 <code>ip</code> type — 任何 ingest pipeline 都要先把 raw event 轉成 ECS 結構。</p>
<h2 id="phase-2translation-pipeline">Phase 2：Translation pipeline</h2>
<p>實務 translation 用 <em>3-tier hybrid</em>：</p>
<h3 id="tier-1-vendor-toolcover-30-50">Tier 1: vendor tool（cover 30-50%）</h3>
<p>Elastic 官方提供 <code>splunk-to-elastic</code> migration assistant（SaaS / on-prem）— 對 <em>簡單 SPL search</em> 自動轉 KQL；cover ratio 視 SPL 複雜度而定。</p>
<h3 id="tier-2-llm-assistedcover-30-40">Tier 2: LLM-assisted（cover 30-40%）</h3>
<p>對 <em>中等複雜</em> SPL（含 stats / eval / where）、用 Claude / GPT 翻譯：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">prompt template:
</span></span><span class="line"><span class="ln">2</span><span class="cl">&#34;Convert this Splunk SPL to Elastic ES|QL. Preserve detection logic. List any
</span></span><span class="line"><span class="ln">3</span><span class="cl">unmappable functions.
</span></span><span class="line"><span class="ln">4</span><span class="cl">
</span></span><span class="line"><span class="ln">5</span><span class="cl">SPL:
</span></span><span class="line"><span class="ln">6</span><span class="cl">index=auth action=login user=* | bucket _time span=5m
</span></span><span class="line"><span class="ln">7</span><span class="cl">| stats count by user, src_ip, _time | where count &gt; 10&#34;</span></span></code></pre></div><p>LLM output 必須 <em>人工 verify</em>：</p>
<ul>
<li>對相同樣本資料跑 SPL vs ES|QL、output 對齊</li>
<li>FP rate 不能 <em>惡化</em></li>
<li>Threshold / window 對等（5m window 跟 5m window 對應）</li>
</ul>
<h3 id="tier-3-manualcover-10-30">Tier 3: manual（cover 10-30%）</h3>
<p>剩下的是：</p>
<ul>
<li>含 macro 跨 SPL fragment 的 rule（macro 必須先展開或 inline）</li>
<li>含 summary index 跟 tstats 的高效能 rule</li>
<li>用 <code>transaction</code> / <code>streamstats</code> 的 stateful query</li>
</ul>
<p>這類 rule 翻譯成 KQL 邏輯後、通常 <em>效能差 5-20x</em>（Splunk summary index 是 precomputed、KQL 是 runtime）；要評估 <em>改用 Elastic transform</em> 或 <em>接受效能下降</em>。</p>
<h2 id="phase-3parallel-run">Phase 3：Parallel run</h2>
<p>雙 SIEM 同時跑是 <em>最重要的 confidence-building 階段</em>：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">                 ┌─→ Splunk ──→ alert ──┐
</span></span><span class="line"><span class="ln">2</span><span class="cl">data source ─┤                          ├─→ alert dedup ──→ SOAR / SOC
</span></span><span class="line"><span class="ln">3</span><span class="cl">                 └─→ Elastic ──→ alert ─┘</span></span></code></pre></div><p>Dedup 策略：</p>
<ul>
<li><strong>Key</strong>：<code>rule_name + event_id + timestamp_5min_bucket</code></li>
<li><strong>Window</strong>：5-10 分鐘（兩端有不同處理 latency）</li>
<li><strong>Routing</strong>：dedup 後送 SOAR、SOC 看「來自哪個 SIEM」標籤</li>
</ul>
<p>跑 4-8 週累積：</p>
<table>
  <thead>
      <tr>
          <th>指標</th>
          <th>期望</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Alert coverage 一致性</td>
          <td>Elastic 抓到 Splunk 的 95%+ 對應 alert</td>
      </tr>
      <tr>
          <td>FP rate 不惡化</td>
          <td>Elastic FP / Splunk FP ≤ 1.2（允許 20% 浮動）</td>
      </tr>
      <tr>
          <td>Detection latency 對等</td>
          <td>Elastic 端 alert 時間在 Splunk 端 ± 5 分鐘內</td>
      </tr>
      <tr>
          <td>Volume / day</td>
          <td>Alert 總數兩端對齊（10% 內）</td>
      </tr>
  </tbody>
</table>
<p>不對齊的 rule 退回 Phase 2 重新 translation；累積到 95%+ 對齊才能進 Phase 4。</p>
<h2 id="phase-4cutover--routing-切換">Phase 4：Cutover — routing 切換</h2>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">Before cutover:
</span></span><span class="line"><span class="ln">2</span><span class="cl">  Splunk → SOAR (active routing)
</span></span><span class="line"><span class="ln">3</span><span class="cl">  Elastic → SOAR (parallel, marked test)
</span></span><span class="line"><span class="ln">4</span><span class="cl">
</span></span><span class="line"><span class="ln">5</span><span class="cl">After cutover:
</span></span><span class="line"><span class="ln">6</span><span class="cl">  Splunk → ingest 持續 / alert disabled
</span></span><span class="line"><span class="ln">7</span><span class="cl">  Elastic → SOAR (active routing)</span></span></code></pre></div><p>Cutover 期間：</p>
<ol>
<li>PagerDuty / Opsgenie 端 <em>先建 Elastic integration</em>、不立刻 disable Splunk</li>
<li>切換 dedup key 的 routing priority — 同一 alert 優先取 Elastic 那條</li>
<li><strong>保留 Splunk ingest</strong> — 不立刻停、提供 fallback 半小時</li>
<li>SOC 24h 監視、無異常進入 Phase 5</li>
</ol>
<p>回退邊界：cutover 失敗（Elastic 端 alert 大量遺漏 / 延遲）→ routing 切回 Splunk、Elastic 端 alert 再標 test、回 Phase 3。回退時間 30 分鐘內。</p>
<h2 id="phase-5cleanup--不可逆階段">Phase 5：Cleanup — 不可逆階段</h2>
<p>Splunk ingest 停、license decommission、歷史資料 archive：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1"># 1. 歷史 archive 到 S3（Splunk DDAS / Smart Store / 第三方）</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">splunk <span class="nb">export</span> ... <span class="p">|</span> aws s3 cp - s3://splunk-archive/
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="c1"># 2. 確認 archive 可查（cold storage retrieve test）</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="c1"># 3. Splunk indexer disable / Splunk Cloud subscription downgrade</span></span></span></code></pre></div><p><strong>不可逆邊界</strong>：Splunk license 退掉、historical query 必須走 S3 + 重 ingest 才能跑、SLA 從即時變天級。決策關鍵：</p>
<ul>
<li>法規 retention（GDPR / SOX / HIPAA）多久</li>
<li>Incident response 需要 historical query 的頻率</li>
<li>翻譯後的歷史資料 indexable in Elastic？多數情況 ECS 跟 CIM 結構差太大、historical 不直接可查</li>
</ul>
<p>實務 default：Splunk Cloud 保留最低 tier 1 年、Elastic 接新資料；1 年後再評估 archive 策略。</p>
<h2 id="production-故障演練">Production 故障演練</h2>
<h3 id="case-1macro-跨-spl-沒對應-kql-function">Case 1：Macro 跨 SPL 沒對應 KQL function</h3>
<p><strong>徵兆</strong>：translation tool 把 macro <code>\</code>my_internal_lookup(&hellip;)`` 標 unmappable、人工翻譯後發現 macro 含 3 個巢狀 macro、共 80 行 SPL 邏輯；KQL 端拆成 5 個 runtime field + 2 個 ingest processor 才對等。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>Audit 階段</strong> 用 <code>splunk btool savedsearches list | grep &lt;macro&gt;</code> 找所有 macro 使用點、估翻譯成本</li>
<li><strong>Inline 策略</strong>：macro 在 5 處以下、直接 inline 到 detection rule、不重建 KQL macro</li>
<li><strong>Ingest processor 策略</strong>：macro 是 <em>資料轉換</em> 邏輯、放 Elastic ingest pipeline、不放 detection rule</li>
<li><strong>退役策略</strong>：macro 已 deprecated、不翻譯、把使用的 rule 一起退役</li>
</ol>
<h3 id="case-2time-zone-parsing-差異">Case 2：Time zone parsing 差異</h3>
<p><strong>徵兆</strong>：parallel run 階段、Splunk 跟 Elastic 對同一個 raw event 解出的 <code>_time</code> 差 8 小時；dedup key 沒對齊、雙 alert 都觸發。</p>
<p><strong>根因</strong>：Splunk <code>_time</code> 是 epoch、time zone 由 <code>props.conf</code> 端決定；Elastic ingest pipeline 用 <code>date</code> processor、time zone 預設 UTC。raw event 有 <code>Asia/Taipei</code> timestamp、Splunk 解 UTC、Elastic 解 local。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>Ingest pipeline 統一</strong>：所有 raw event 在 ingest 時轉 UTC、不依賴 source-side time zone</li>
<li><strong>dedup 容忍 window</strong>：dedup window 拉到 30 分鐘、cover time zone 漂移</li>
<li><strong>schema 對位 spec 明示時區處理</strong>：Phase 1 spec 要列「所有時間戳統一 UTC」</li>
</ol>
<h3 id="case-3summary-index-翻譯效能爆">Case 3：Summary index 翻譯效能爆</h3>
<p><strong>徵兆</strong>：Splunk 端 <code>tstats count from datamodel=Authentication where _time&gt;=-7d</code> 跑 2 秒、翻譯成 KQL 後 Elastic 跑 45 秒；SOC dashboard 端 timeout。</p>
<p><strong>根因</strong>：Splunk summary index 是 <em>precomputed</em>（小時 / 天聚合預先算好）、<code>tstats</code> 直接讀 summary；KQL 直接跑 search 是 <em>raw event scan</em>、效能差數量級。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>Elastic Transform</strong>：Elastic 端建 <em>continuous transform</em>、把 raw event 預先 aggregate 到 transform index、KQL 查 transform index、效能對等</li>
<li><strong>Rollup index</strong>（Elastic legacy）：給 metric-style data 用、deprecated 但仍可</li>
<li><strong>接受 latency</strong>：dashboard query 可接受 30s、不必精準對等 Splunk</li>
</ol>
<h3 id="case-4cutover-期間-pagerduty-dedup-key-衝突">Case 4：Cutover 期間 PagerDuty dedup key 衝突</h3>
<p><strong>徵兆</strong>：cutover 後 24h、SOC 收到雙倍 alert；PagerDuty 兩條 incident 各標 <code>splunk</code> 跟 <code>elastic</code> source、實際是同一事件。</p>
<p><strong>根因</strong>：PagerDuty 的 dedup key 用 <code>rule_name + alert_id</code>、Splunk alert_id 跟 Elastic signal_id 命名空間不同、PagerDuty 視為兩個獨立 incident。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>預先設計 dedup key</strong>：用 <code>rule_name + event_hash</code>、不用 SIEM 內部 ID</li>
<li><strong>PagerDuty routing rule</strong>：cutover 期間 disable Splunk source routing、不要靠 dedup</li>
<li><strong>Phase 3 parallel run 期間就測試 dedup</strong>：不要拖到 cutover 才發現</li>
</ol>
<h3 id="case-5過早-decommission-splunk歷史-incident-無法回溯">Case 5：過早 decommission Splunk、歷史 incident 無法回溯</h3>
<p><strong>徵兆</strong>：cutover 後 6 個月、發生 incident、需要回查 12 個月前的 auth log；Splunk 已 decom、Elastic 端歷史資料缺、S3 archive 無索引、4 小時找不到 evidence。</p>
<p><strong>根因</strong>：Cleanup phase 過早走、沒先做 <em>historical query rehearsal</em>；S3 archive 沒可用的索引層。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>預防</strong>：Phase 5 前跑 <em>5 個 historical query drill</em>、驗證 incident response 時能用</li>
<li><strong>架構</strong>：S3 archive 配 Elastic frozen tier（searchable snapshot）、6 個月 retrieve latency 接受</li>
<li><strong>法規對齊</strong>：Cleanup 時間表必須跟 compliance retention requirement 對齊、不只是 cost-driven</li>
</ol>
<h2 id="capacity--cost-對照">Capacity / cost 對照</h2>
<table>
  <thead>
      <tr>
          <th>維度</th>
          <th>Splunk Enterprise / Cloud</th>
          <th>Elastic Security</th>
          <th>取捨</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Pricing model</td>
          <td>per-GB ingest（昂貴 in scale）</td>
          <td>fixed tier / data tier / per-resource</td>
          <td>Elastic 5+ TB/day 規模便宜 50-70%</td>
      </tr>
      <tr>
          <td>Ingest performance</td>
          <td>強、Splunk forwarder 成熟</td>
          <td>強、Elastic Agent / Filebeat</td>
          <td>略接近、Splunk 對 unstructured raw 略優</td>
      </tr>
      <tr>
          <td>Search performance</td>
          <td>強、SPL + summary index</td>
          <td>中、KQL runtime + transform</td>
          <td>Splunk 對複雜 query 仍領先</td>
      </tr>
      <tr>
          <td>Detection content</td>
          <td>ES content + SOC content</td>
          <td>Elastic Security 内建 detection rule + 開源</td>
          <td>兩端都有、Elastic 對 cloud-native 較強</td>
      </tr>
      <tr>
          <td>UEBA / ML</td>
          <td>ES Premium UEBA、成熟</td>
          <td>Elastic ML + 7.x+ rule type</td>
          <td>Splunk 領先、Elastic 追趕中</td>
      </tr>
      <tr>
          <td>Cloud-native</td>
          <td>Splunk Cloud（managed but proprietary）</td>
          <td>Elastic Cloud / ECK on K8s</td>
          <td>Elastic 更 K8s-friendly</td>
      </tr>
      <tr>
          <td>Lock-in</td>
          <td>高（SPL / 自家 forwarder / ES app）</td>
          <td>中（open-source core + commercial extension）</td>
          <td>Elastic 較易遷出（理論上）</td>
      </tr>
      <tr>
          <td>Total cost (5y, 10TB/day)</td>
          <td>$5-15M USD</td>
          <td>$1.5-5M USD</td>
          <td>5-3 倍差</td>
      </tr>
  </tbody>
</table>
<h2 id="整合--下一步">整合 / 下一步</h2>
<h3 id="跟-soar-整合">跟 SOAR 整合</h3>
<p><a href="/blog/backend/08-incident-response/vendors/pagerduty/" data-link-title="PagerDuty" data-link-desc="On-call / alerting 主流 SaaS、IR 平台演化">PagerDuty</a> / Tines / Splunk SOAR：</p>
<ul>
<li>cutover 期間 SOAR playbook 仍用 Splunk-shaped event、Phase 5 後改 Elastic-shaped</li>
<li>Playbook 內 SPL query 必須改寫 KQL / ES|QL、可 hybrid（短期保留 SOAR 端原 SPL 邏輯）</li>
</ul>
<h3 id="跟-case-management-整合">跟 case management 整合</h3>
<p>Jira / ServiceNow / Elastic Cases：</p>
<ul>
<li>Splunk notable → Jira ticket 用 link field 帶 <code>splunk_url</code></li>
<li>Elastic alert → Jira 用 <code>elastic_url</code></li>
<li>兩個 URL field 期間同時存在、Phase 5 後 archive</li>
</ul>
<h3 id="反向遷移elastic--splunk">反向遷移（Elastic → Splunk）</h3>
<p>結構 mirror 對稱、phase 仍 6 段、但 schema 對位方向相反：</p>
<ul>
<li>KQL → SPL 翻譯（vendor tool 對等度低、ES|QL → SPL 更困難）</li>
<li>ECS → CIM 對位</li>
<li>多數企業 <em>不會</em> 反向遷、reverse migration 多半是合規驅動（特定客戶要 Splunk）</li>
</ul>
<h3 id="下一步議題">下一步議題</h3>
<ul>
<li><strong>Multi-vendor SIEM portfolio</strong>：不選一家、Splunk + Elastic + Sentinel 同時跑、routing 邏輯按 cost / use case 切</li>
<li><strong>AI-native detection</strong>：兩家都在發展、translation 流程可能再次重來</li>
<li><strong>Compliance migration constraints</strong>：金融 / 政府客戶 SIEM migration 需通過 audit、phase 時間表會被拉長</li>
</ul>
<h2 id="相關連結">相關連結</h2>
<ul>
<li>Source vendor：<a href="/blog/backend/07-security-data-protection/vendors/splunk/" data-link-title="Splunk" data-link-desc="業界 SIEM 標準、forwarder &#43; indexer &#43; search head 架構、SPL 為核心查詢語言、ingestion-based 計費跟偵測覆蓋率的 trade-off">Splunk</a></li>
<li>Target vendor：<a href="/blog/backend/07-security-data-protection/vendors/elastic-security/" data-link-title="Elastic Security" data-link-desc="Elastic Stack 上的 SIEM &#43; EDR &#43; Cloud Security 套件、OSS 起源、KQL/EQL/Lucene/ES|QL 多查詢語言、resource-based pricing">Elastic Security</a></li>
<li>上游 chapter：<a href="/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理</a></li>
<li>平行 deep article：<a href="/blog/backend/07-security-data-protection/vendors/splunk/risk-based-alerting/" data-link-title="Splunk Risk-Based Alerting：從 alert per rule 到 score-aggregated notable" data-link-desc="Splunk Enterprise Security 的 RBA 方法論：risk score / modifier / notable 三層 model、ES 配置 step-by-step、tuning playbook（false positive / score inflation / threshold drift / decay）、capacity 成本、跟 SOAR &#43; case management 整合">Splunk RBA</a></li>
<li>Methodology：<a href="/blog/posts/vendor-%E6%B7%B1%E5%BA%A6%E6%8A%80%E8%A1%93%E6%96%87%E7%AB%A0%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84%E5%90%8C-vendor-%E7%B3%BB%E5%88%97%E7%9A%84%E9%96%8B%E5%A0%B4%E8%BC%AA%E6%9B%BF%E9%A9%97%E8%AD%89/" data-link-title="Vendor 深度技術文章方法論的演化紀錄：同 vendor 系列的開場輪替驗證" data-link-desc="vendor overview 飽和後要寫單一功能深度文章、需要選題與結構依據時回來。這套方法論的驗證來源與 cadence variant 在高風險場景（同 vendor sub-tool 系列）的實證。">Vendor 深度技術文章的寫作方法論</a></li>
</ul>
]]></content:encoded></item><item><title>7.B5 Detection Engineering Lifecycle</title><link>https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/detection-engineering-lifecycle/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/detection-engineering-lifecycle/</guid><description>&lt;p>本篇的責任是建立偵測規則生命週期。讀者讀完後，能把一條 detection rule 從來源定義、驗證、調校、上線、退場整理成可維護流程。&lt;/p>
&lt;h2 id="核心論點">核心論點&lt;/h2>
&lt;p>Detection engineering lifecycle 的核心概念是把規則當資產管理。規則資產包含來源、邏輯、測試、誤報處理、owner、驗收門檻與退場條件。&lt;/p>
&lt;h2 id="讀者入口">讀者入口&lt;/h2>
&lt;p>本篇適合銜接 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/detection-to-response-routing/" data-link-title="7.B2 從偵測到回應的路由" data-link-desc="建立資安偵測訊號如何轉成 triage、severity、升級與 incident workflow 的大綱">7.B2 從偵測到回應的路由&lt;/a>、&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理&lt;/a> 與 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/sigma-detection-rule-lifecycle/" data-link-title="Sigma：偵測規則生命週期素材" data-link-desc="把 Sigma detection format 轉成偵測規則欄位、誤報治理與維護流程素材">Sigma：偵測規則生命週期素材&lt;/a>。&lt;/p>
&lt;h2 id="生命周期欄位">生命周期欄位&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>欄位&lt;/th>
 &lt;th>責任&lt;/th>
 &lt;th>常見來源&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Rule source&lt;/td>
 &lt;td>描述規則來自哪個威脅假設與資料源&lt;/td>
 &lt;td>Sigma、事件復盤、演練結果&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Detection logic&lt;/td>
 &lt;td>定義條件、例外、聚合方式&lt;/td>
 &lt;td>rule repository、query package&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Validation evidence&lt;/td>
 &lt;td>證明規則可命中目標情境&lt;/td>
 &lt;td>測試事件、回放資料、對照 log&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Tuning decision&lt;/td>
 &lt;td>收斂誤報與漏報&lt;/td>
 &lt;td>triage 結果、分析註記、例外記錄&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Release condition&lt;/td>
 &lt;td>定義規則上線條件&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/release-gate/" data-link-title="Release Gate" data-link-desc="說明變更在正式釋出前如何通過或阻擋">release gate&lt;/a>、變更審查&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Retirement condition&lt;/td>
 &lt;td>定義規則退場條件&lt;/td>
 &lt;td>覆蓋重疊、威脅變化、資料源變動&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>生命周期欄位的核心是讓規則維護可以追溯。每次規則更新都能回查它解哪個風險、用哪個證據驗證、為何做這次調整。&lt;/p>
&lt;h2 id="規則來源治理">規則來源治理&lt;/h2>
&lt;p>規則來源治理的責任是讓規則與威脅假設對齊。來源可來自公開框架、事件教訓、演練情境與稽核要求，並需要在建立時寫清楚 threat hypothesis 與 data dependency。&lt;/p>
&lt;h2 id="驗證節奏">驗證節奏&lt;/h2>
&lt;p>驗證節奏的責任是確保規則在上線前後都保持有效。建議至少建立三層驗證：&lt;/p>
&lt;ol>
&lt;li>邏輯驗證：條件可讀、可測、可重現。&lt;/li>
&lt;li>資料驗證：log schema 與欄位品質可支撐判讀。&lt;/li>
&lt;li>情境驗證：在事件回放或 game day 中能命中目標行為。&lt;/li>
&lt;/ol>
&lt;h2 id="調校策略">調校策略&lt;/h2>
&lt;p>調校策略的責任是把 alert 噪音轉成可判讀訊號。調校時同步記錄 false positive 情境、排除條件、影響範圍與回退方式，並和 &lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/incident-severity/" data-link-title="Incident Severity" data-link-desc="說明事故分級如何把產品影響轉成對應處置節奏">incident severity&lt;/a> 對齊分級節奏。&lt;/p>
&lt;h2 id="上線與退場">上線與退場&lt;/h2>
&lt;p>上線與退場的責任是讓規則變更進入受控流程。上線前需確認 evidence、owner 與回退路徑；退場時要確認替代規則、覆蓋遷移與歷史證據保留。&lt;/p>
&lt;h2 id="與事故流程的交接">與事故流程的交接&lt;/h2>
&lt;p>與事故流程交接的責任是把規則命中轉成回應路由。規則命中後應直接輸出 triage 問題、owner、升級條件與 &lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/runbook/" data-link-title="Runbook" data-link-desc="說明 runbook 如何把事故判斷與操作步驟標準化">runbook&lt;/a> 路由，讓 08 模組可以快速接手。&lt;/p>
&lt;h2 id="判讀訊號與路由">判讀訊號與路由&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>判讀訊號&lt;/th>
 &lt;th>代表需求&lt;/th>
 &lt;th>下一步路由&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>規則持續觸發但分析結論分散&lt;/td>
 &lt;td>需要調校紀錄與 triage 問題&lt;/td>
 &lt;td>7.B5 → 7.B2&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>規則上線後缺少驗證證據&lt;/td>
 &lt;td>需要補 validation evidence&lt;/td>
 &lt;td>7.B5 → 7.B3&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>相同風險出現多條重複規則&lt;/td>
 &lt;td>需要整理來源與退場條件&lt;/td>
 &lt;td>7.B5 → 7.B1&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>規則變更未進入放行流程&lt;/td>
 &lt;td>需要 release condition&lt;/td>
 &lt;td>7.B5 → 05&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>事故後規則未更新&lt;/td>
 &lt;td>需要 write-back 閉環&lt;/td>
 &lt;td>7.B5 → 7.24&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>判讀表格的作用是把規則問題轉成維護任務。每一列都能直接對應到 owner 與下一步交接章節。&lt;/p>
&lt;h2 id="必連章節">必連章節&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/detection-to-response-routing/" data-link-title="7.B2 從偵測到回應的路由" data-link-desc="建立資安偵測訊號如何轉成 triage、severity、升級與 incident workflow 的大綱">7.B2 從偵測到回應的路由&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/security-control-validation/" data-link-title="7.B3 資安控制驗證" data-link-desc="建立資安控制面如何用證據、演練與 release gate 驗證的大綱">7.B3 資安控制驗證&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/" data-link-title="7.BM1 藍隊專業來源卡" data-link-desc="整理藍隊可引用的專業來源，明確標示可支撐論點與引用限制">7.BM1 藍隊專業來源卡&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="完稿判準">完稿判準&lt;/h2>
&lt;p>完稿時要讓讀者能為一條偵測規則設計完整生命週期。輸出至少包含來源、邏輯、驗證證據、調校策略、上線條件、退場條件與回寫位置。&lt;/p></description><content:encoded><![CDATA[<p>本篇的責任是建立偵測規則生命週期。讀者讀完後，能把一條 detection rule 從來源定義、驗證、調校、上線、退場整理成可維護流程。</p>
<h2 id="核心論點">核心論點</h2>
<p>Detection engineering lifecycle 的核心概念是把規則當資產管理。規則資產包含來源、邏輯、測試、誤報處理、owner、驗收門檻與退場條件。</p>
<h2 id="讀者入口">讀者入口</h2>
<p>本篇適合銜接 <a href="/blog/backend/07-security-data-protection/blue-team/detection-to-response-routing/" data-link-title="7.B2 從偵測到回應的路由" data-link-desc="建立資安偵測訊號如何轉成 triage、severity、升級與 incident workflow 的大綱">7.B2 從偵測到回應的路由</a>、<a href="/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理</a> 與 <a href="/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/sigma-detection-rule-lifecycle/" data-link-title="Sigma：偵測規則生命週期素材" data-link-desc="把 Sigma detection format 轉成偵測規則欄位、誤報治理與維護流程素材">Sigma：偵測規則生命週期素材</a>。</p>
<h2 id="生命周期欄位">生命周期欄位</h2>
<table>
  <thead>
      <tr>
          <th>欄位</th>
          <th>責任</th>
          <th>常見來源</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Rule source</td>
          <td>描述規則來自哪個威脅假設與資料源</td>
          <td>Sigma、事件復盤、演練結果</td>
      </tr>
      <tr>
          <td>Detection logic</td>
          <td>定義條件、例外、聚合方式</td>
          <td>rule repository、query package</td>
      </tr>
      <tr>
          <td>Validation evidence</td>
          <td>證明規則可命中目標情境</td>
          <td>測試事件、回放資料、對照 log</td>
      </tr>
      <tr>
          <td>Tuning decision</td>
          <td>收斂誤報與漏報</td>
          <td>triage 結果、分析註記、例外記錄</td>
      </tr>
      <tr>
          <td>Release condition</td>
          <td>定義規則上線條件</td>
          <td><a href="/blog/backend/knowledge-cards/release-gate/" data-link-title="Release Gate" data-link-desc="說明變更在正式釋出前如何通過或阻擋">release gate</a>、變更審查</td>
      </tr>
      <tr>
          <td>Retirement condition</td>
          <td>定義規則退場條件</td>
          <td>覆蓋重疊、威脅變化、資料源變動</td>
      </tr>
  </tbody>
</table>
<p>生命周期欄位的核心是讓規則維護可以追溯。每次規則更新都能回查它解哪個風險、用哪個證據驗證、為何做這次調整。</p>
<h2 id="規則來源治理">規則來源治理</h2>
<p>規則來源治理的責任是讓規則與威脅假設對齊。來源可來自公開框架、事件教訓、演練情境與稽核要求，並需要在建立時寫清楚 threat hypothesis 與 data dependency。</p>
<h2 id="驗證節奏">驗證節奏</h2>
<p>驗證節奏的責任是確保規則在上線前後都保持有效。建議至少建立三層驗證：</p>
<ol>
<li>邏輯驗證：條件可讀、可測、可重現。</li>
<li>資料驗證：log schema 與欄位品質可支撐判讀。</li>
<li>情境驗證：在事件回放或 game day 中能命中目標行為。</li>
</ol>
<h2 id="調校策略">調校策略</h2>
<p>調校策略的責任是把 alert 噪音轉成可判讀訊號。調校時同步記錄 false positive 情境、排除條件、影響範圍與回退方式，並和 <a href="/blog/backend/knowledge-cards/incident-severity/" data-link-title="Incident Severity" data-link-desc="說明事故分級如何把產品影響轉成對應處置節奏">incident severity</a> 對齊分級節奏。</p>
<h2 id="上線與退場">上線與退場</h2>
<p>上線與退場的責任是讓規則變更進入受控流程。上線前需確認 evidence、owner 與回退路徑；退場時要確認替代規則、覆蓋遷移與歷史證據保留。</p>
<h2 id="與事故流程的交接">與事故流程的交接</h2>
<p>與事故流程交接的責任是把規則命中轉成回應路由。規則命中後應直接輸出 triage 問題、owner、升級條件與 <a href="/blog/backend/knowledge-cards/runbook/" data-link-title="Runbook" data-link-desc="說明 runbook 如何把事故判斷與操作步驟標準化">runbook</a> 路由，讓 08 模組可以快速接手。</p>
<h2 id="判讀訊號與路由">判讀訊號與路由</h2>
<table>
  <thead>
      <tr>
          <th>判讀訊號</th>
          <th>代表需求</th>
          <th>下一步路由</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>規則持續觸發但分析結論分散</td>
          <td>需要調校紀錄與 triage 問題</td>
          <td>7.B5 → 7.B2</td>
      </tr>
      <tr>
          <td>規則上線後缺少驗證證據</td>
          <td>需要補 validation evidence</td>
          <td>7.B5 → 7.B3</td>
      </tr>
      <tr>
          <td>相同風險出現多條重複規則</td>
          <td>需要整理來源與退場條件</td>
          <td>7.B5 → 7.B1</td>
      </tr>
      <tr>
          <td>規則變更未進入放行流程</td>
          <td>需要 release condition</td>
          <td>7.B5 → 05</td>
      </tr>
      <tr>
          <td>事故後規則未更新</td>
          <td>需要 write-back 閉環</td>
          <td>7.B5 → 7.24</td>
      </tr>
  </tbody>
</table>
<p>判讀表格的作用是把規則問題轉成維護任務。每一列都能直接對應到 owner 與下一步交接章節。</p>
<h2 id="必連章節">必連章節</h2>
<ul>
<li><a href="/blog/backend/07-security-data-protection/blue-team/detection-to-response-routing/" data-link-title="7.B2 從偵測到回應的路由" data-link-desc="建立資安偵測訊號如何轉成 triage、severity、升級與 incident workflow 的大綱">7.B2 從偵測到回應的路由</a></li>
<li><a href="/blog/backend/07-security-data-protection/blue-team/security-control-validation/" data-link-title="7.B3 資安控制驗證" data-link-desc="建立資安控制面如何用證據、演練與 release gate 驗證的大綱">7.B3 資安控制驗證</a></li>
<li><a href="/blog/backend/07-security-data-protection/detection-coverage-and-signal-governance/" data-link-title="7.13 偵測覆蓋率與訊號治理" data-link-desc="定義偵測覆蓋、訊號品質與誤報成本的治理問題">7.13 偵測覆蓋率與訊號治理</a></li>
<li><a href="/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/" data-link-title="7.BM1 藍隊專業來源卡" data-link-desc="整理藍隊可引用的專業來源，明確標示可支撐論點與引用限制">7.BM1 藍隊專業來源卡</a></li>
</ul>
<h2 id="完稿判準">完稿判準</h2>
<p>完稿時要讓讀者能為一條偵測規則設計完整生命週期。輸出至少包含來源、邏輯、驗證證據、調校策略、上線條件、退場條件與回寫位置。</p>
]]></content:encoded></item><item><title>Sigma：偵測規則生命週期素材</title><link>https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/sigma-detection-rule-lifecycle/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/backend/07-security-data-protection/blue-team/materials/professional-sources/sigma-detection-rule-lifecycle/</guid><description>&lt;p>Sigma 的素材責任是提供跨 SIEM 的偵測規則描述語言。Sigma rules 使用 YAML 描述 logsource、detection、condition、falsepositives 與 level，適合支撐 detection-as-code 與規則維護流程。&lt;/p>
&lt;h2 id="來源定位">來源定位&lt;/h2>
&lt;p>&lt;a href="https://sigmahq.io/docs/basics/rules.html">Sigma Rules documentation&lt;/a> 適合支撐「偵測規則需要明確資料源、條件、誤報說明與等級」的論點。&lt;a href="https://sigmahq.io/docs/basics/conditions.html">Sigma Conditions documentation&lt;/a> 則適合支撐「偵測邏輯需要可讀的 AND/OR/NOT 與 filter 表達」。&lt;/p>
&lt;h2 id="可引用論點">可引用論點&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>可引用論點&lt;/th>
 &lt;th>藍隊轉譯&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>規則需要 logsource&lt;/td>
 &lt;td>7.B2 的 signal 要標明來源系統&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>規則需要 condition&lt;/td>
 &lt;td>偵測邏輯要可 review、可測試&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>規則需要 falsepositives&lt;/td>
 &lt;td>誤報情境要進 triage 與調校流程&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>規則需要 level&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/backend/knowledge-cards/incident-severity/" data-link-title="Incident Severity" data-link-desc="說明事故分級如何把產品影響轉成對應處置節奏">severity&lt;/a> 與 escalation 可接到 08&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="後端服務轉譯">後端服務轉譯&lt;/h2>
&lt;p>後端服務引用這張卡時，重點是把 detection rule 當成生命週期資產。每條規則都需要來源、觸發條件、測試事件、誤報說明、調校紀錄、owner 與退場條件。&lt;/p>
&lt;h2 id="引用限制">引用限制&lt;/h2>
&lt;p>Sigma 適合支撐規則格式與維護欄位，實際查詢語法、資料品質與 alert 噪音要依 SIEM、log schema 與服務流量特性調校。&lt;/p></description><content:encoded><![CDATA[<p>Sigma 的素材責任是提供跨 SIEM 的偵測規則描述語言。Sigma rules 使用 YAML 描述 logsource、detection、condition、falsepositives 與 level，適合支撐 detection-as-code 與規則維護流程。</p>
<h2 id="來源定位">來源定位</h2>
<p><a href="https://sigmahq.io/docs/basics/rules.html">Sigma Rules documentation</a> 適合支撐「偵測規則需要明確資料源、條件、誤報說明與等級」的論點。<a href="https://sigmahq.io/docs/basics/conditions.html">Sigma Conditions documentation</a> 則適合支撐「偵測邏輯需要可讀的 AND/OR/NOT 與 filter 表達」。</p>
<h2 id="可引用論點">可引用論點</h2>
<table>
  <thead>
      <tr>
          <th>可引用論點</th>
          <th>藍隊轉譯</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>規則需要 logsource</td>
          <td>7.B2 的 signal 要標明來源系統</td>
      </tr>
      <tr>
          <td>規則需要 condition</td>
          <td>偵測邏輯要可 review、可測試</td>
      </tr>
      <tr>
          <td>規則需要 falsepositives</td>
          <td>誤報情境要進 triage 與調校流程</td>
      </tr>
      <tr>
          <td>規則需要 level</td>
          <td><a href="/blog/backend/knowledge-cards/incident-severity/" data-link-title="Incident Severity" data-link-desc="說明事故分級如何把產品影響轉成對應處置節奏">severity</a> 與 escalation 可接到 08</td>
      </tr>
  </tbody>
</table>
<h2 id="後端服務轉譯">後端服務轉譯</h2>
<p>後端服務引用這張卡時，重點是把 detection rule 當成生命週期資產。每條規則都需要來源、觸發條件、測試事件、誤報說明、調校紀錄、owner 與退場條件。</p>
<h2 id="引用限制">引用限制</h2>
<p>Sigma 適合支撐規則格式與維護欄位，實際查詢語法、資料品質與 alert 噪音要依 SIEM、log schema 與服務流量特性調校。</p>
]]></content:encoded></item></channel></rss>