適用於 Windows 的 Google SecOps 轉寄站可執行檔

支援的國家/地區:

本文說明如何在 Microsoft Windows 上安裝及設定 Google SecOps 轉送器。

自訂設定檔

根據您在部署前提交的資訊, Google Cloud會提供 Google SecOps 轉送程式的可執行檔和選用設定檔。可執行檔只能在設定的目標主機上執行。每個可執行檔都包含網路中 Google SecOps 轉送器執行個體的專屬設定。如需變更設定,請與 Google SecOps 支援團隊聯絡。

系統需求

以下是一般建議。如需系統專屬建議,請與 Google SecOps 支援團隊聯絡。

  • Windows Server 版本:Google SecOps 轉送器支援下列 Microsoft Windows Server 版本:

    • 2008 R2

    • 2012 R2

    • 2016

  • RAM:每種收集的資料類型 1.5 GB。舉例來說,端點偵測與應變 (EDR)、DNS 和 DHCP 都是不同的資料類型。如要收集這三種資料,需要 4.5 GB 的 RAM。

  • CPU:2 個 CPU 足以處理每秒少於 10,000 個事件 (EPS) (所有資料類型加總)。如果預計轉送超過 10,000 個 EPS,則需要 4 到 6 個 CPU。

  • 磁碟:無論 Google SecOps 轉送器處理多少資料,都需要 20 GB 的磁碟空間。Google SecOps 轉送器預設不會緩衝至磁碟,但建議啟用磁碟緩衝。 您可以在設定檔中新增 write_to_disk_buffer_enabledwrite_to_disk_dir_path 參數,緩衝處理磁碟。

    例如:

    - <collector>:
         common:
             ...
             write_to_disk_buffer_enabled: true
             write_to_disk_dir_path: <var>your_path</var>
             ...
    

Google IP 位址範圍

設定 Google SecOps 轉送器設定時,您可能需要開啟 IP 位址範圍,例如設定防火牆的設定時。Google 無法提供特定 IP 位址清單。不過,您可以取得 Google IP 位址範圍

驗證防火牆設定

如果 Google SecOps 轉送器容器與網際網路之間有防火牆或經過驗證的 Proxy,則需要規則才能允許存取下列 Google Cloud 主機:

連線類型 目標位置 Port (通訊埠)
TCP malachiteingestion-pa.googleapis.com 443
TCP asia-northeast1-malachiteingestion-pa.googleapis.com 443
TCP asia-south1-malachiteingestion-pa.googleapis.com 443
TCP asia-southeast1-malachiteingestion-pa.googleapis.com 443
TCP australia-southeast1-malachiteingestion-pa.googleapis.com 443
TCP europe-malachiteingestion-pa.googleapis.com 443
TCP europe-west2-malachiteingestion-pa.googleapis.com 443
TCP europe-west3-malachiteingestion-pa.googleapis.com 443
TCP europe-west6-malachiteingestion-pa.googleapis.com 443
TCP europe-west9-malachiteingestion-pa.googleapis.com 443
TCP europe-west12-malachiteingestion-pa.googleapis.com 443
TCP me-central1-malachiteingestion-pa.googleapis.com 443
TCP me-central2-malachiteingestion-pa.googleapis.com 443
TCP me-west1-malachiteingestion-pa.googleapis.com 443
TCP northamerica-northeast2-malachiteingestion-pa.googleapis.com 443
TCP southamerica-east1-malachiteingestion-pa.googleapis.com 443
TCP accounts.google.com 443
TCP gcr.io 443
TCP cloud.google.com/artifact-registry 443
TCP oauth2.googleapis.com 443
TCP storage.googleapis.com 443

如要檢查 Google Cloud 的網路連線,請按照下列步驟操作:

  1. 以管理員權限啟動 Windows PowerShell (按一下「開始」,輸入 PowerShell,以滑鼠右鍵按一下「Windows PowerShell」,然後按一下「以管理員身分執行」)。

  2. 執行下列指令。TcpTestSucceeded 應會傳回 true。

    C:\> test-netconnection <host> -port <port>

    例如:

    C:\> test-netconnection malachiteingestion-pa.googleapis.com -port 443
    ComputerName     : malchiteingestion-pa.googleapis.com
    RemoteAddress    : 198.51.100.202
    RemotePort       : 443
    InterfaceAlias   : Ethernet
    SourceAddress    : 10.168.0.2
    TcpTestSucceeded : True
    

您也可以使用 Google SecOps 轉送器檢查網路連線:

  1. 以管理員權限啟動命令提示字元 (按一下「開始」,輸入 Command Prompt,在「命令提示字元」上按一下滑鼠右鍵,然後按一下「以系統管理員身分執行」)。

  2. 如要驗證網路連線,請使用 -test 選項執行 Google SecOps 轉送器。

    C:\> .\chronicle_forwarder.exe -test
    Verify network connection succeeded!
    

在 Windows 上安裝 Google SecOps 轉寄站

在 Windows 上,必須將 Google SecOps 轉寄站可執行檔安裝為服務。

  1. chronicle_forwarder.exe 檔案和設定檔複製到工作目錄。

  2. 以管理員權限啟動命令提示字元 (按一下「開始」,輸入 Command Prompt,在「命令提示字元」上按一下滑鼠右鍵,然後按一下「以系統管理員身分執行」)。

  3. 如要安裝服務,請前往步驟 1 中建立的工作目錄,然後執行下列指令:

    C:\> .\chronicle_forwarder.exe -install -config FILE_NAME
    

    FILE_NAME 替換為您收到的設定檔名稱。

    服務會安裝至 C:\Windows\system32\ChronicleForwarder

  4. 如要啟動服務,請執行下列指令:

    C:\> sc.exe start chronicle_forwarder
    

確認 Google SecOps 轉送器正在執行

Google SecOps 轉送器應已在通訊埠 443 開啟網路連線,您的資料應會在幾分鐘內顯示在 Google SecOps 網頁介面中。

如要確認 Google SecOps 轉送器是否正在執行,請使用下列任一方法:

  • 工作管理員:依序前往「程序」分頁標籤 >「背景程序」 >「chronicle_forwarder」

  • 資源監視器:在「網路」分頁中,chronicle_forwarder.exe 應用程式應會列在「網路活動」下方 (每當 chronicle_forwarder.exe 應用程式連線至 Google Cloud時)、TCP 連線下方,以及接聽埠下方。

查看轉送器記錄檔

Google SecOps 轉送器記錄檔會儲存在 C:\Windows\Temp 資料夾中。記錄檔開頭為「chronicle_forwarder.exe.win-forwarder」。 記錄檔提供各種資訊,包括轉送器啟動時間,以及開始將資料傳送至 Google Cloud的時間。

解除安裝 Google SecOps 轉送器

如要解除安裝 Google SecOps 轉送器服務,請完成下列步驟:

  1. 以系統管理員模式開啟命令提示字元。

  2. 停止 Google SecOps 轉送程式服務:

    SERVICE_NAME: chronicle_forwarder
    TYPE               : 10  WIN32_OWN_PROCESS
    STATE              : 4  RUNNING (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
    WIN32_EXIT_CODE    : 0  (0x0)
    SERVICE_EXIT_CODE  : 0  (0x0)
    CHECKPOINT         : 0x0
    WAIT_HINT          : 0x0
    
  3. 前往 C:\Windows\system32\ChronicleForwarder 目錄,然後解除安裝 Google SecOps 轉送器服務:C:\> .\chronicle_forwarder.exe -uninstall

升級 Google SecOps 轉送器

如要升級 Google SecOps 轉送器,同時繼續使用目前的設定檔,請完成下列步驟:

  1. 以系統管理員模式開啟命令提示字元。

  2. 將設定檔從 C:\Windows\system32\ChronicleForwarder 目錄複製到其他目錄。

  3. 停止 Google SecOps 轉送器:

    C:\> sc.exe stop chronicle_forwarder
    
  4. 解除安裝 Google SecOps 轉送器服務和應用程式:

    C:\> .\chronicle_forwarder.exe --uninstall
    
  5. 刪除 C:\windows\system32\ChronicleForwarder 目錄中的所有檔案。

  6. 將新的 chronicle_forwarder.exe 應用程式和原始設定檔複製到工作目錄。

  7. 在工作目錄中執行下列指令:

    C:\> .\chronicle_forwarder.exe -install -config configFileProvidedToYou
    
  8. 啟動服務:

    C:\ sc.exe start chronicle_forwarder
    

收集 Splunk 資料

請與 Google SecOps 支援團隊聯絡,更新 Google SecOps 轉送器設定檔,將 Splunk 資料轉送至 Google Cloud。

收集系統記錄資料

Google SecOps 轉送器可做為系統記錄伺服器,也就是說,您可以設定任何支援透過 TCP 或 UDP 連線傳送系統記錄資料的設備或伺服器,將資料轉送至 Google SecOps 轉送器。您可以控管設備或伺服器傳送至 Google SecOps 轉送器的資料,然後轉送器會將資料轉送至 Google Cloud。

Google SecOps 轉送器設定檔會指定要監控哪些通訊埠,以接收每種轉送資料 (例如通訊埠 10514)。根據預設,Google SecOps 轉送器會接受 TCP 和 UDP 連線。請聯絡 Google SecOps 支援團隊,更新 Google SecOps 轉送器設定檔,以支援系統記錄。

切換資料壓縮

將記錄檔傳輸至 Google SecOps 時,記錄檔壓縮功能可減少網路頻寬用量。 不過,壓縮可能會導致 CPU 使用量增加。CPU 使用率和頻寬之間的取捨取決於許多因素,包括記錄資料類型、資料壓縮率、執行轉送程式的主機上可用的 CPU 週期,以及是否需要減少網路頻寬消耗量。

舉例來說,以文字為基礎的記錄檔壓縮效果良好,且 CPU 使用率低,因此可大幅節省頻寬。不過,原始封包的加密酬載無法有效壓縮,且會導致 CPU 使用率偏高。

由於轉送器擷取的記錄檔類型大多可有效壓縮,因此系統預設會啟用記錄檔壓縮功能,以減少頻寬用量。不過,如果 CPU 使用量增加的幅度超過節省頻寬的好處,您可以將 Google SecOps 轉送器設定檔中的 compression 欄位設為 false,藉此停用壓縮功能,如下列範例所示:

  compression: false
  url: malachiteingestion-pa.googleapis.com:443
  identity:
  identity:
  collector_id: 10479925-878c-11e7-9421-10604b7abba1
  customer_id: abcd4bb9-878b-11e7-8455-12345b7cb5c1
  secret_key: |
  {
    "type": "service_account",
  ...

為系統記錄設定啟用傳輸層安全標準 (TLS)

您可以為 Google SecOps 轉送程式的系統記錄連線啟用傳輸層安全標準 (TLS)。在 Google SecOps 轉送器設定檔中,指定憑證和憑證金鑰的位置,如以下範例所示:

憑證 C:/opt/chronicle/external/certs/edb3ae966a7bbe1f.pem
certificate_key C:/opt/chronicle/external/certs/forwarder.key

根據顯示的範例,Google SecOps 轉送器設定會修改如下:

  collectors:
- syslog:
    common:
      enabled: true
      data_type: WINDOWS_DNS
      data_hint:
      batch_n_seconds: 10
      batch_n_bytes: 1048576
  tcp_address: 0.0.0.0:10515
  connection_timeout_sec: 60
  certificate: "C:/opt/chronicle/external/certs/edb3ae966a7bbe1f.pem"
  certificate_key: "C:/opt/chronicle/external/certs/forwarder.key"

您可以在設定目錄下建立 certs 目錄,並將憑證檔案儲存在該處。

收集封包資料

Google SecOps 轉送器可使用 Windows 系統上的 Npcap,直接從網路介面擷取封包。

擷取的封包會傳送至 Google Cloud ,而非記錄檔項目。擷取作業只能透過本機介面進行。

請與 Google SecOps 支援團隊聯絡,更新 Google SecOps 轉送器設定檔,以支援封包擷取功能。

如要執行封包擷取 (PCAP) 轉送器,您需要下列項目:

  • 在 Microsoft Windows 主機上安裝 Npcap。

  • 授予 Google SecOps 轉送器根層級或管理員權限,監控網路介面。

  • 不需要任何指令列選項。

  • 在 Npcap 安裝期間,啟用 WinPcap 相容模式。

如要設定 PCAP 轉送器, Google Cloud 需要用來擷取封包的介面 GUID。在要安裝 Google SecOps 轉送器的電腦上 (伺服器或接聽範圍通訊埠的電腦),執行 getmac.exe,然後將輸出內容傳送至 Google SecOps。

或者,您也可以修改設定檔。找出 PCAP 區段,然後將介面旁邊顯示的 GUID 值,替換為執行 getmac.exe 時顯示的 GUID。

舉例來說,以下是原始 PCAP 區段:

 common:
       enabled: true
 data_type: PCAP_DNS
       batch_n_seconds: 10
   batch_n_bytes: 1048576
     interface: \Device\NPF_{1A7E7C8B-DD7B-4E13-9637-0437AB1A12FE}
   bpf: udp port 53

以下是執行 getmac.exe 的輸出內容:

C:\>getmac.exe
  Physical Address    Transport Name
  ===========================================================================
  A4-73-9F-ED-E1-82   \Device\Tcpip_{2E0E9440-ABFF-4E5B-B43C-E188FCAD1234}

最後,以下是修訂後的 PCAP 區段,其中包含新的 GUID:

- pcap:
       common:
     enabled: true
         data_type: PCAP_DNS
     batch_n_seconds: 10
         batch_n_bytes: 1048576
       interface: \Device\NPF_{2E0E9440-ABFF-4E5B-B43C-E188FCAD9734}
     bpf: udp port 53

收集 WebProxy 資料

Google SecOps 轉送器可使用 Npcap 直接從網路介面擷取 WebProxy 資料,並傳送至 Google Cloud。

如要為系統啟用 WebProxy 資料擷取功能,請與 Google SecOps 支援團隊聯絡。

執行 WebProxy 轉送器前,請先完成下列事項:

  1. 在 Microsoft Windows 主機上安裝 Npcap。安裝時啟用 WinPcap 相容模式。

  2. 將根層級或管理員權限授予 Google SecOps 轉送器,以便監控網路介面。

  3. 如要設定 WebProxy 轉送器, Google Cloud 需要用來擷取 WebProxy 封包的介面 GUID。

    在要安裝 Google SecOps 轉送器的機器上執行 getmac.exe,然後將輸出內容傳送至 Google SecOps。或者,您也可以修改設定檔。找出 WebProxy 區段,然後將介面旁顯示的 GUID 替換為執行 getmac.exe 後顯示的 GUID。

    按照下列步驟修改 Google SecOps 轉送站設定 (FORWARDER_NAME.conf) 檔案:

      - webproxy:
        common:
            enabled : true
            data_type: <Your LogType>
            batch_n_seconds: 10
            batch_n_bytes: 1048576
          interface: \Device\NPF_{2E0E9440-ABFF-4E5B-B43C-E188FCAD9734}
          bpf: tcp and dst port 80
    

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