收集 Zscaler Tunnel 記錄

支援的國家/地區:

本文說明如何設定 Google Security Operations 動態饋給來匯出 Zscaler Tunnel 記錄,以及記錄欄位如何對應至 Google SecOps Unified Data Model (UDM) 欄位。

詳情請參閱「將資料擷取至 Google SecOps 總覽」。

一般部署作業包含 Zscaler Tunnel 和 Google SecOps Webhook 資訊提供,設定為將記錄傳送至 Google SecOps。每個客戶的部署作業可能有所不同,也可能更複雜。

部署作業包含下列元件:

  • Zscaler Tunnel:收集記錄的平台。

  • Google SecOps 資訊提供:從 Zscaler Tunnel 擷取記錄,並將記錄寫入 Google SecOps 的 Google SecOps 資訊提供。

  • Google SecOps:保留及分析記錄檔。

擷取標籤會識別剖析器,該剖析器會將原始記錄資料正規化為具結構性的 UDM 格式。本文件中的資訊適用於標示 ZSCALER_TUNNEL 的剖析器。

事前準備

請確認您已完成下列事前準備事項:

  • 存取 Zscaler Internet Access 控制台。詳情請參閱「Secure Internet and SaaS Access ZIA Help」。
  • Zscaler Tunnel 1.0 版或 2.0 版
  • 部署架構中的所有系統都已設定為世界標準時間時區。
  • 在 Google Security Operations 中完成動態饋給設定時,需要使用 API 金鑰。詳情請參閱「設定 API 金鑰」。

設定動態饋給

在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:

  • 「SIEM 設定」>「動態消息」
  • 內容中心 > 內容包

依序前往「SIEM 設定」>「動態消息」,設定動態消息

如要為這個產品系列中的不同記錄類型設定多個動態饋給,請參閱「依產品設定動態饋給」。

如要設定單一動態饋給,請按照下列步驟操作:

  1. 依序前往「SIEM 設定」>「動態饋給」
  2. 按一下「新增動態消息」
  3. 在下一個頁面中,按一下「設定單一動態饋給」
  4. 在「動態饋給名稱」欄位中輸入動態饋給的名稱,例如「Zscaler Tunnel Logs」
  5. 選取「Webhook」做為「來源類型」
  6. 選取「Zscaler Tunnel」做為「記錄類型」
  7. 點選「下一步」
  8. 選用:指定下列輸入參數的值:
    1. 分割分隔符號:用於分隔記錄行的分隔符號 (如未使用分隔符號,請留白)。
    2. 資產命名空間:資產命名空間。
    3. 擷取標籤:要套用至這個動態饋給事件的標籤。
  9. 點選「下一步」
  10. 在「Finalize」畫面上檢查新的動態饋給設定,然後按一下「Submit」
  11. 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。

從內容中心設定動態饋給

為下列欄位指定值:

  • 分割分隔符號:用於分隔記錄行的分隔符號,例如 \n

進階選項

  • 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
  • 來源類型:將記錄收集到 Google SecOps 的方法。
  • 資產命名空間資產命名空間
  • 擷取標籤:套用至這個動態饋給事件的標籤。
  • 點選「下一步」
  • 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」
  • 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。

設定 Zscaler Tunnel

  1. 在 Zscaler Internet Access 控制台中,依序前往「Administration」>「Nanolog Streaming Service」>「Cloud NSS Feeds」
  2. 按一下「新增 Cloud NSS 動態消息」
  3. 在「動態饋給名稱」欄位中輸入動態饋給名稱。
  4. 在「NSS Type」中選取「NSS for Tunnel」
  5. 從「狀態」清單中選取狀態,即可啟用或停用 NSS 動態饋給。
  6. 將「SIEM Rate」下拉式選單的值保留為「Unlimited」。如要因授權或其他限制而抑制輸出串流,請變更值。
  7. 在「SIEM Type」(SIEM 類型) 清單中選取「Other」(其他)
  8. 在「OAuth 2.0 Authentication」清單中選取「Disabled」
  9. 根據 SIEM 的最佳做法,在「Max Batch Size」(批次大小上限) 中輸入個別 HTTP 要求酬載的大小上限 (例如 512 KB)。
  10. 在「API URL」中輸入 Chronicle API 端點的 HTTPS 網址,格式如下:

    https://<CHRONICLE_REGION>-chronicle.googleapis.com/v1alpha/projects/<GOOGLE_PROJECT_NUMBER>/locations/<LOCATION>/instances/<CUSTOMER_ID>/feeds/<FEED_ID>:importPushLogs
    
    • CHRONICLE_REGION:Google SecOps 執行個體的代管區域 (例如 US)。
    • GOOGLE_PROJECT_NUMBER:自帶專案編號 (請向 C4 索取)。
    • LOCATION:Google SecOps 區域 (例如 US)。
    • CUSTOMER_ID:Google SecOps 客戶 ID (請向 C4 索取)。
    • FEED_ID:新建立的 Webhook 顯示在動態饋給 UI 上的動態饋給 ID。

    API 網址範例:

    https://us-chronicle.googleapis.com/v1alpha/projects/12345678910/locations/US/instances/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/feeds/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy:importPushLogs
    
  11. 按一下「新增 HTTP 標頭」,然後新增 HTTP 標頭,格式如下:

    • Header 1Key1: X-goog-api-keyValue1:在 Google Cloud BYOP 的 API 憑證中產生的 API 金鑰。
    • Header 2Key2: X-Webhook-Access-KeyValue2:在網路鉤子的「SECRET KEY」上產生的 API 密鑰。
  12. 在「記錄類型」清單中選取「通道」

  13. 在「動態饋給輸出類型」清單中選取「JSON」

  14. 將「動態饋給逸出字元」設為 , \ "

  15. 如要將新欄位新增至動態饋給輸出格式,請在「動態饋給輸出類型」清單中選取「自訂」

  16. 複製並貼上「動態饋給輸出格式」,然後新增欄位。確認鍵名與實際欄位名稱相符。

    預設的動態饋給輸出格式如下:

    • IKE 階段 1:

      \{ "sourcetype" : "zscalernss-tunnel", "event" : \{"datetime":"%s{datetime}","Recordtype":"%s{tunnelactionname}","tunneltype":"IPSEC IKEV %d{ikeversion}","user":"%s{vpncredentialname}","location":"%s{elocationname}","sourceip":"%s{sourceip}","destinationip":"%s{destvip}","sourceport":"%d{srcport}","destinationport":"%d{dstport}","lifetime":"%d{lifetime}","ikeversion":"%d{ikeversion}","spi_in":"%lu{spi_in}","spi_out":"%lu{spi_out}","algo":"%s{algo}","authentication":"%s{authentication}","authtype":"%s{authtype}","recordid":"%d{recordid}"\}\}
      
    • IKE 第 2 階段:

      \{ "sourcetype" : "zscalernss-tunnel", "event" : \{"datetime":"%s{datetime}","Recordtype":"%s{tunnelactionname}","tunneltype":"IPSEC IKEV %d{ikeversion}","user":"%s{vpncredentialname}","location":"%s{elocationname}","sourceip":"%s{sourceip}","destinationip":"%s{destvip}","sourceport":"%d{srcport}","sourceportstart":"%d{srcportstart}","destinationportstart":"%d{destportstart}","srcipstart":"%s{srcipstart}","srcipend":"%s{srcipend}","destinationipstart":"%s{destipstart}","destinationipend":"%s{destipend}","lifetime":"%d{lifetime}","ikeversion":"%d{ikeversion}","lifebytes":"%d{lifebytes}","spi":"%d{spi}","algo":"%s{algo}","authentication":"%s{authentication}","authtype":"%s{authtype}","protocol":"%s{protocol}","tunnelprotocol":"%s{tunnelprotocol}","policydirection":"%s{policydirection}","recordid":"%d{recordid}"\}\}
      
    • 隧道事件:

      \{ "sourcetype" : "zscalernss-tunnel", "event" : \{"datetime":"%s{datetime}","Recordtype":"%s{tunnelactionname}","tunneltype":"%s{tunneltype}","user":"%s{vpncredentialname}","location":"%s{elocationname}","sourceip":"%s{sourceip}","destinationip":"%s{destvip}","sourceport":"%d{srcport}","event":"%s{event}","eventreason":"%s{eventreason}","recordid":"%d{recordid}"\}\}
      
    • 範例:

      \{ "sourcetype" : "zscalernss-tunnel", "event" : \{"datetime":"%s{datetime}","Recordtype":"%s{tunnelactionname}","tunneltype":"%s{tunneltype}","user":"%s{vpncredentialname}","location":"%s{elocationname}","sourceip":"%s{sourceip}","destinationip":"%s{destvip}","sourceport":"%d{srcport}","txbytes":"%lu{txbytes}","rxbytes":"%lu{rxbytes}","dpdrec":"%d{dpdrec}","recordid":"%d{recordid}"\}\}
      
  17. 在「Timezone」(時區)清單中,選取輸出檔案「Time」(時間)欄位的時區。根據預設,時區會設為貴機構的時區。

  18. 查看已設定的設定。

  19. 按一下「儲存」,測試連線。如果連線成功,畫面會顯示綠色勾號,以及「Test Connectivity Successful: OK (200)」(測試連線成功:OK (200)) 訊息。

如要進一步瞭解 Google SecOps 動態消息,請參閱 Google SecOps 動態消息說明文件。如要瞭解各動態饋給類型的規定,請參閱「依類型設定動態饋給」。

如果在建立動態饋給時遇到問題,請與 Google SecOps 支援團隊聯絡。

支援的 Zscaler Tunnel 記錄格式

Zscaler Tunnel 剖析器支援 JSON 格式的記錄。

支援的 Zscaler Tunnel 記錄檔範例

  • JSON

    {
      "sourcetype": "zscalernss-tunnel",
      "event": {
        "datetime": "Sun Jan 21 06:17:00 2024",
        "Recordtype": "Tunnel Samples",
        "tunneltype": "IPSec IKEv2",
        "user": "dummy-user@dummydomain.net",
        "location": "PLWSE06",
        "sourceip": "198.51.100.0",
        "destinationip": "198.51.100.1",
        "sourceport": "0",
        "txbytes": "12560",
        "rxbytes": "0",
        "dpdrec": "0",
        "recordid": "7326416289073594372"
      }
    }
    

UDM 對應表

欄位對應參考資料:ZSCALER_TUNNEL

下表列出 ZSCALER_TUNNEL 記錄類型的記錄欄位,以及對應的 UDM 欄位。

Log field UDM mapping Logic
algo additional.fields[algo]
authtype additional.fields[authtype]
authentication additional.fields[authentication]
dd additional.fields[dd]
day additional.fields[day]
destinationportstart additional.fields[destinationportstart]
dpdrec additional.fields[dpdrec]
eventreason additional.fields[eventreason]
hh additional.fields[hh]
ikeversion additional.fields[ikeversion]
lifebytes additional.fields[lifebytes]
mm additional.fields[mm]
mon additional.fields[mon]
mth additional.fields[mth]
olocationname additional.fields[olocationname]
ovpncredentialname additional.fields[ovpncredentialname]
ss additional.fields[ss]
sourcetype additional.fields[sourcetype]
spi_in additional.fields[spi_in]
spi_out additional.fields[spi_out]
sourceportstart additional.fields[sourceportstart]
tz additional.fields[tz]
tunnelprotocol additional.fields[tunnelprotocol]
tunneltype additional.fields[tunneltype]
vendorname additional.fields[vendorname]
yyyy additional.fields[yyyy]
spi additional.fields[spi]
event metadata.description
datetime metadata.event_timestamp
metadata.event_type If (the srcipstart log field value is not empty or the srcipend log field value is not empty or the sourceip log field value is not empty) and (the destinationipstart log field value is not empty or the destinationip log field value is not empty or the destinationipend log field value is not empty), then the metadata.event_type UDM field is set to NETWORK_CONNECTION.

Else, if the srcipstart log field value is not empty or the srcipend log field value is not empty or the sourceip log field value is not empty, then the metadata.event_type UDM field is set to STATUS_UPDATE.

Else, the metadata.event_type UDM field is set to GENERIC_EVENT.
Recordtype metadata.product_event_type
recordid metadata.product_log_id
metadata.product_name The metadata.product_name UDM field is set to ZSCALER_TUNNEL.
metadata.vendor_name The metadata.vendor_name UDM field is set to ZSCALER.
network.direction If the policydirection log field value matches the regular expression pattern (?i)Inbound, then the network.direction UDM field is set to INBOUND.

Else, if the policydirection log field value matches the regular expression pattern (?i)Outbound, then the network.direction UDM field is set to OUTBOUND.
protocol network.ip_protocol If the protocol log field value contain one of the following values, then the protocol log field is mapped to the network.ip_protocol UDM field.
  • TCP
  • EIGRP
  • ESP
  • ETHERIP
  • GRE
  • ICMP
  • IGMP
  • IP6IN4
  • PIM
  • UDP
  • VRRP
rxbytes network.received_bytes
rxpackets network.received_packets
txbytes network.sent_bytes
txpackets network.sent_packets
lifetime network.session_duration.seconds
srcipstart principal.ip
sourceip principal.ip
srcipend principal.ip
location principal.location.name
sourceport principal.port
user principal.user.userid
destinationipstart target.ip
destinationip target.ip
destinationipend' target.ip
destinationport target.port

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