收集 Suricata Eve 記錄

支援以下發布途徑:

本文說明如何在 Google Security Operations 中查看 SURICATA_EVE 記錄。

下圖為部署架構圖,顯示如何設定 SURICATA_EVE 和 Logstash,以便將記錄傳送至 Google 安全作業團隊。

部署架構

  1. Suricata 會將資料儲存至 eve.json 檔案。
  2. Logstash 會監控 eve.json 檔案,並將新的記錄轉送至 syslog 伺服器。syslog 伺服器可以是相同 VM 或不同 VM 上的轉送器。
  3. syslog 伺服器會使用 Google Security Operations 轉送器,透過特定通訊埠監聽新記錄。
  4. Google Security Operations 轉送器會將記錄轉送至 Google Security Operations 執行個體。

事前準備

  • 請確認您已使用 Identity and Access Management (IAM) 為機構和資源設定存取權控管。如要進一步瞭解存取權控管,請參閱「使用 IAM 對機構進行存取權控管」。

  • 請確認部署架構中的所有系統都已設定為世界標準時間。

  1. 建立內部網路負載平衡器

  2. 設定封包鏡像

  3. 安裝 Suricata,並確認警示已儲存至 eve.json 檔案。請記下 eve.json 檔案的位置。

  4. 在 Suricata 伺服器上安裝 Logstash

  5. 編輯 Logstash 設定檔 (/etc/logstash/conf.d/logstash.conf):

    a. 加入下列程式碼︰

    • SYSLOG_SERVER 變更為 syslog 伺服器的位置。
    • 請確認通訊埠號碼 (在本例中為 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 安全作業轉送器與 Syslog 伺服器位於不同的系統上,請使用 Syslog 伺服器的 IP 位址。

    • 如果 Google Security Operations 轉送器與 syslog 伺服器位於相同系統中,請使用內部 IP 位址。

您可以使用其他記錄轉送器解決方案,例如 rsyslog,並設定移除 syslog 標頭。

擷取 SURICATA_EVE 記錄

請按照「將記錄匯入 Google Cloud 至 Google Security Operations」中的說明操作。

如果您在擷取 SURICATA_EVE 記錄時遇到問題,請與 Google Security Operations 支援團隊聯絡

如要進一步瞭解 Google Security Operations 的資料擷取方式,請參閱「將資料擷取至 Google Security Operations 總覽」。

還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。