收集 Suricata Eve 記錄
本文說明如何在 Google Security Operations 中查看 SURICATA_EVE 記錄。
下圖顯示部署架構,說明如何設定 SURICATA_EVE 和 Logstash,將記錄傳送至 Google Security Operations。
- Suricata 會將資料儲存至
eve.json
檔案。 - Logstash 會監控
eve.json
檔案,並將新記錄轉送至系統記錄伺服器。syslog 伺服器可以是同一部 VM 或另一部 VM 上的轉送器。 - 系統記錄伺服器會使用 Google Security Operations 轉送器,監聽特定連接埠的新記錄。
- Google Security Operations 轉送器會將記錄轉送至 Google Security Operations 執行個體。
事前準備
請確認您已使用 Identity and Access Management (IAM),為機構和資源設定存取權控管。如要進一步瞭解存取權控管,請參閱「使用 IAM 對機構進行存取權控管」一文。
請確保部署架構中的所有系統都以世界標準時間設定。
設定 Suricata 和相關軟體
建立內部網路負載平衡器。
設定封包鏡像。
安裝 Suricata,並確認警示會儲存至
eve.json
檔案。記下eve.json
檔案的位置。在 Suricata 伺服器上安裝 Logstash。
編輯 Logstash 設定檔 (
/etc/logstash/conf.d/logstash.conf
):a. 加入下列程式碼︰
- 將
SYSLOG_SERVER
變更為系統記錄伺服器的位置。 - 確認通訊埠編號 (本例為
10520
) 與 Google Security Operations 轉送器設定中的通訊埠編號一致。
input { file { path => "/var/log/suricata/eve.json" start_position => "end" sincedb_path => "/dev/null" } } output { udp { host => "SYSLOG_SERVER" port => 10520 codec => line { format => "%{message}"} } }
b. 變更
output.udp.host
IP 位址:如果 Google Security Operations 轉送器與系統記錄伺服器位於不同系統,請使用系統記錄伺服器的 IP 位址。
如果 Google Security Operations 轉送器與系統記錄伺服器位於同一系統,請使用內部 IP 位址。
- 將
您可以使用其他記錄轉送解決方案 (例如 rsyslog),並設定移除系統記錄檔標頭。
擷取 SURICATA_EVE 記錄
請按照「將記錄擷取 Google Cloud 至 Google Security Operations」中的說明操作。
如果在擷取 SURICATA_EVE 記錄時遇到問題,請與 Google Security Operations 支援團隊聯絡。
如要進一步瞭解 Google Security Operations 如何擷取資料,請參閱將資料擷取至 Google Security Operations 總覽。
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。