無聲主機監控
本文說明 Google Security Operations 無聲主機監控 (SHM) 的方法,可協助您找出環境中無聲的主機。
無聲主機可以發出信號,表示可能停止收集器。
使用居家安全監控的偵測規則
建議您為 SHM 設定偵測規則。
這個方法會監控 UDM 欄位 (例如 hostname
、ip
或 mac
),並在指定時間範圍內未收到預期值時觸發快訊。
SHM 的偵測規則範例
本節提供 SHM 的偵測規則範例,您可以根據特定需求使用或調整這些規則。舉例來說,您可以修改時間範圍、使用其他欄位 (例如 ip
),或以其他方式分割規則。
依主機名稱偵測無聲主機
以下範例會透過 hostname
偵測無聲主機:
- 掃描 20 分鐘的視窗。
- 使用
ip
、hostname
和mac
追蹤主機。 - 如果主機在過去 10 分鐘內未收到任何事件,但過去 20 分鐘內並非靜音,系統就會發出快訊。
rule shm_using_hostname {
meta:
events:
$event.metadata.event_timestamp.seconds > timestamp.current_seconds() - 1200
// $identifier_hash = hash.sha256(strings.concat($event.principal.ip[0], $event.principal.hostname, $event.principal.mac[0]))
$silent_hostname = $event.principal.hostname
match:
$silent_hostname over 10m
outcome:
$max_event_time = max($event.metadata.event_timestamp.seconds)
$max_diff = timestamp.current_seconds() - $max_event_time
condition:
$event and $max_diff > 600
}
使用擷取標籤偵測無聲收集器
以下是 SHM 的偵測規則範例:
- 掃描 20 分鐘的視窗。
- 使用
ingestion_source
擷取標籤識別無聲片段。 - 找出指定時區 (本例為 Asia/Calcutta) 中,過去 10 分鐘沒有靜音,但過去 20 分鐘有靜音的值。
rule shm_using_ingestion_label {
meta:
events:
$event.metadata.event_timestamp.seconds > timestamp.current_seconds() - 1200
$event.metadata.ingestion_labels.key = "ingestion_source"
$silent_ingestion_source = $event.metadata.ingestion_labels.value
match:
$silent_ingestion_source over 20m
outcome:
$max_time_seconds = max($event.metadata.event_timestamp.seconds)
$max_diff_seconds = timestamp.current_seconds() - $max_time_seconds
$max_timestamp = timestamp.get_timestamp($max_time_seconds, "SECOND", "Asia/Calcutta")
$current_timestamp = timestamp.get_timestamp(timestamp.current_seconds(), "SECOND", "Asia/Calcutta")
condition:
$event and $max_diff_seconds > 600
}
搭配使用 Google Cloud Monitoring 與 SHM 的擷取標籤
這個方法會使用 Google Cloud Monitoring,根據 SHM 的擷取標籤監控記錄擷取率。
本節說明如何使用 Bindplane 設定這個方法,包括下列步驟:
設定套用 SHM 擷取標籤的記錄管道後,您就可以為每個收集器設定 Google Cloud Monitoring 快訊,在擷取率低於指定門檻時發出快訊。您可以設定將快訊傳送至 Google SecOps 以外的各種位置,並將快訊整合至工作流程。
這個方法的優點:
- 監控擷取時間,而非事件時間。
- 運用 Cloud Monitoring 的進階快訊功能。
這個方法的缺點:
- 必須在 Google SecOps 以外另外設定。
- 受限於擷取標籤數量。
透過 Google Cloud Monitoring 為 SHM 設定 Bindplane
如要透過 Google Cloud Monitoring 為 SHM 設定 Bindplane,請先滿足下列先決條件:
- 已部署的 Bindplane 伺服器,並已設定 Google SecOps 標準化 處理器。
- Google SecOps 標準化處理器已設定為新增支援的
log_type
和擷取標籤 (例如ingestion_source
)。
如要透過 Google Cloud Monitoring 設定 Bindplane for SHM,請完成下列步驟:
- 在每個記錄項目中,將收集器伺服器的主機名稱做為屬性傳送。
- 在「記錄」分頁中,依序選取「處理器」>「新增處理器」>「複製欄位」。
- 設定「複製欄位」處理器:
- 輸入資源的簡短說明。
- 選擇
Logs
遙測類型。 - 將
Copy From
欄位設為Resources
。 - 將
Resource field
欄位設為host.name
。 - 將
Copy To field
欄位設為Attributes
。 - 設定
Attributes Field
欄位,例如chronicle_ingestion_label["ingestion_source"]
。
設定 SHM 的 Google Cloud Monitoring 門檻
根據預期的擷取率定義門檻。較低的門檻會偵測收集器中斷情形,較高的門檻則會偵測上游記錄間隙。
設定 SHM 的 Google Cloud Monitoring 門檻後,建議您監控「Chronicle Collector」>「Ingestion」>「Total Ingestion Log Count」指標。如需詳細的範例設定操作說明,請參閱「設定範例政策,偵測未啟動的 Google SecOps 收集代理程式」。
使用 Google SecOps 資訊主頁進行 SHM
使用 Google SecOps 資訊主頁,查看已停止回報的監控主機每日計數。
這個方法很適合用來查看每日的高階總覽,但不支援快訊,且結果最多會有 6 小時的延遲。
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。