收集 Zscaler 隧道記錄
本文說明如何設定 Google Security Operations 動態饋給,以匯出 Zscaler Tunnel 記錄,以及記錄欄位如何對應至 Google SecOps 統一資料模型 (UDM) 欄位。
詳情請參閱「將資料匯入 Google SecOps 總覽」。
一般部署作業包括 Zscaler Tunnel 和 Google SecOps Webhook 動態饋給,可將記錄傳送至 Google SecOps。每個客戶的部署作業可能有所不同,且可能更為複雜。
部署作業包含下列元件:
Zscaler Tunnel:您收集記錄的平台。
Google SecOps 動態饋給:Google SecOps 動態饋給會擷取 Zscaler Tunnel 中的記錄,並將記錄寫入 Google SecOps。
Google SecOps:保留並分析記錄檔。
擷取標籤可識別剖析器,將原始記錄資料正規化為具結構性的 UDM 格式。本文中的資訊適用於標示為 ZSCALER_TUNNEL
的剖析器。
事前準備
請確認您已完成下列必要條件:
- 存取 Zscaler Internet Access 主控台。詳情請參閱「Secure Internet and SaaS Access ZIA 說明」。
- Zscaler Tunnel 1.0 或 2.0 版
- 部署架構中的所有系統都已設定為使用世界標準時間 (UTC) 時區。
- 在 Google Security Operations 中完成動態饋給設定所需的 API 金鑰。詳情請參閱「設定 API 金鑰」。
設定動態饋給
在 Google SecOps 平台中,有兩個不同的入口可用來設定動態消息:
- SIEM 設定 > 動態饋給
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態」設定動態
如要針對這個產品系列中的不同記錄類型設定多個動態饋給,請參閱「依產品設定動態饋給」。
如要設定單一動態饋給,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態饋給」。
- 按一下「新增動態消息」。
- 在下一頁中,按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中輸入動態饋給的名稱,例如「Zscaler Tunnel Logs」。
- 將「來源類型」設為「Webhook」。
- 選取「Zscaler Tunnel」做為「記錄類型」。
- 點選「下一步」。
- 選用:指定下列輸入參數的值:
- 分隔符號:用於分隔記錄行,如果不使用分隔符號,請留空白。
- Asset namespace:素材資源命名空間。
- 攝入標籤:要套用至這個動態饋給事件的標籤。
- 點選「下一步」。
- 在「完成」畫面中查看新的動態饋給設定,然後按一下「提交」。
- 按一下「產生密鑰」,產生用於驗證這則動態饋給的密鑰。
透過內容中心設定動態饋給
指定下列欄位的值:
- 分隔符號:用於分隔記錄資料列的符號,例如
\n
。
進階選項
- 動態饋給名稱:預先填入的值,用於識別動態饋給。
- 來源類型:用於收集記錄並匯入 Google SecOps 的方法。
- 資產命名空間:資產命名空間。
- 攝入標籤:套用至這個動態饋給事件的標籤。
- 點選「下一步」。
- 在「Finalize」畫面中查看動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,即可產生密鑰來驗證這項動態饋給。
設定 Zscaler 通道
- 在 Zscaler Internet Access 控制台中,依序前往「Administration」(管理) >「Nanolog Streaming Service」(Nanolog 串流服務) >「Cloud NSS Feeds」(雲端 NSS 動態饋給)。
- 按一下「新增雲端 NSS 動態饋給」。
- 在「動態饋給名稱」欄位中輸入動態饋給的名稱。
- 在「NSS Type」中選取「NSS for Tunnel」。
- 從「狀態」清單中選取狀態,即可啟用或停用 NSS 動態饋給。
- 請將「SIEM Rate」下拉式選單的值設為「Unlimited」。如要因授權或其他限制而抑制輸出串流,請變更該值。
- 在「SIEM 類型」清單中選取「其他」。
- 在「OAuth 2.0 驗證」清單中選取「已停用」。
- 在「最大批次大小」中,輸入 SIEM 最佳做法中個別 HTTP 要求酬載的大小限制 (例如 512 KB)。
在 API 網址中輸入 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
:BYOP 專案編號 (請向 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
按一下「Add HTTP Header」,然後使用以下格式新增 HTTP 標頭:
Header 1
:Key1:X-goog-api-key
和 Value1:在 Google Cloud BYOP 的 API 憑證中產生的 API 金鑰。Header 2
:Key2:X-Webhook-Access-Key
和 Value2: 在 webhook 的「SECRET KEY」中產生的 API 密鑰。
在「記錄類型」清單中選取「Tunnel」。
在「動態饋給輸出類型」清單中選取「JSON」。
將「Feed Escape Character」設為
, \ "
。如要新增欄位至動態饋給輸出格式,請在「動態饋給輸出類型」清單中選取「自訂」。
複製貼上動態饋給輸出格式,然後新增欄位。請確認鍵名稱與實際欄位名稱相符。
以下是預設的動態饋給輸出格式:
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}"\}\}
在「Timezone」清單中,選取輸出檔案中「Time」欄位的時區。根據預設,時區會設為貴機構的時區。
查看已設定的設定。
按一下「儲存」即可測試連線。如果連線成功,畫面上會顯示綠色勾號,並顯示「Test Connectivity Successful: OK (200)」訊息。
如要進一步瞭解 Google SecOps 動態饋給,請參閱 Google SecOps 動態饋給說明文件。如要瞭解各個動態饋給類型的規定,請參閱「依類型分類的動態饋給設定」。
如果在建立動態饋給時遇到問題,請與 Google SecOps 支援團隊聯絡。
支援的 Zscaler 隧道記錄格式
Zscaler Tunnel 剖析器支援 JSON 格式的記錄。
支援的 Zscaler 隧道記錄檔
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.
|
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 專家尋求解答。