收集 Zscaler 防火牆記錄
本文說明如何設定 Google Security Operations 動態饋給來匯出 Zscaler Firewall 記錄,以及記錄欄位如何對應至 Google SecOps Unified Data Model (UDM) 欄位。
詳情請參閱「將資料擷取至 Google SecOps 總覽」。
一般部署作業包含 Zscaler 防火牆和 Google SecOps Webhook 饋給,後者會設定為將記錄傳送至 Google SecOps。每個客戶的部署作業可能有所不同,也可能更複雜。
部署作業包含下列元件:
Zscaler Firewall:收集記錄的平台。
Google SecOps 資訊提供:從 Zscaler Firewall 擷取記錄,並將記錄寫入 Google SecOps 的 Google SecOps 資訊提供。
Google SecOps:保留及分析記錄檔。
擷取標籤會識別剖析器,該剖析器會將原始記錄資料正規化為具結構性的 UDM 格式。本文件中的資訊適用於具有 ZSCALER_FIREWALL
攝入標籤的剖析器。
事前準備
請確認您已完成下列事前準備事項:
- 存取 Zscaler Internet Access 控制台。詳情請參閱「Secure Internet and SaaS Access ZIA Help」。
- Zscaler Firewall 2024 以上版本
- 部署架構中的所有系統都已設定為世界標準時間時區。
- 在 Google Security Operations 中完成動態饋給設定時,需要使用 API 金鑰。詳情請參閱「設定 API 金鑰」。
設定動態饋給
在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:
- 「SIEM 設定」>「動態消息」
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態消息」,設定動態消息
如要為這個產品系列中的不同記錄類型設定多個動態饋給,請參閱「依產品設定動態饋給」。
如要設定單一動態饋給,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態饋給」。
- 按一下「新增動態消息」。
- 在下一個頁面中,按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中,輸入動態饋給的名稱,例如「ZScaler Firewall Logs」。
- 選取「Webhook」做為「來源類型」。
- 選取「ZScaler NGFW」做為「記錄類型」。
- 點選「下一步」。
- 選用:輸入下列輸入參數的值:
- 分割分隔符號:用於分隔記錄行的分隔符號。如未使用分隔符號,請將此欄位留空。
- 資產命名空間:資產命名空間。
- 擷取標籤:要套用至這個動態饋給事件的標籤。
- 點選「下一步」。
- 檢查新的動態消息設定,然後按一下「提交」。
- 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
從內容中心設定動態饋給
為下列欄位指定值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。
進階選項
- 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
- 來源類型:將記錄收集到 Google SecOps 的方法。
- 資產命名空間:資產命名空間。
- 擷取標籤:套用至這個動態饋給事件的標籤。
- 點選「下一步」。
- 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
設定 Zscaler 防火牆
- 在 Zscaler Internet Access 控制台中,依序點選「Administration」(管理) >「Nanolog Streaming Service」(Nanolog 串流服務) >「Cloud NSS Feeds」(Cloud NSS 資訊提供),然後點選「Add Cloud NSS Feed」(新增 Cloud NSS 資訊提供)。
- 系統會隨即顯示「新增 Cloud NSS 饋給」視窗。在「新增 Cloud NSS 動態饋給」視窗中輸入詳細資料。
- 在「動態饋給名稱」欄位中輸入動態饋給名稱。
- 在「NSS Type」中選取「NSS for Firewall」。
- 從「狀態」清單中選取狀態,即可啟用或停用 NSS 動態饋給。
- 將「SIEM Rate」下拉式選單的值保留為「Unlimited」。如要因授權或其他限制而抑制輸出串流,請變更值。
- 在「SIEM Type」(SIEM 類型) 清單中選取「Other」(其他)。
- 在「OAuth 2.0 Authentication」清單中選取「Disabled」。
- 在「Max Batch Size」(批次大小上限) 中,輸入個別 HTTP 要求酬載的大小上限,以符合 SIEM 的最佳做法。例如 512 KB。
在「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
:Chronicle 執行個體的主機代管區域。例如「US」。GOOGLE_PROJECT_NUMBER
:自帶專案編號。請從 C4 取得這項資訊。LOCATION
:Chronicle 區域。例如「US」。CUSTOMER_ID
:Chronicle 客戶 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
按一下「新增 HTTP 標頭」,然後新增 HTTP 標頭,格式如下:
Header 1
:Key1:X-goog-api-key
和 Value1:在 Google Cloud BYOP 的 API 憑證中產生的 API 金鑰。Header 2
:Key2:X-Webhook-Access-Key
和 Value2:在網路鉤子的「SECRET KEY」上產生的 API 密鑰。
在「記錄類型」清單中選取「防火牆記錄」。
在「動態饋給輸出類型」清單中選取「JSON」。
將「動態饋給逸出字元」設為
, \ "
。如要將新欄位新增至動態饋給輸出格式,請在「動態饋給輸出類型」清單中選取「自訂」。
複製並貼上「動態饋給輸出格式」,然後新增欄位。確認鍵名與實際欄位名稱相符。
以下是預設的動態饋給輸出格式:
\{ "sourcetype" : "zscalernss-fw", "event" :\{"datetime":"%s{time}","user":"%s{elogin}","department":"%s{edepartment}","locationname":"%s{elocation}","cdport":"%d{cdport}","csport":"%d{csport}","sdport":"%d{sdport}","ssport":"%d{ssport}","csip":"%s{csip}","cdip":"%s{cdip}","ssip":"%s{ssip}","sdip":"%s{sdip}","tsip":"%s{tsip}","tunsport":"%d{tsport}","tuntype":"%s{ttype}","action":"%s{action}","dnat":"%s{dnat}","stateful":"%s{stateful}","aggregate":"%s{aggregate}","nwsvc":"%s{nwsvc}","nwapp":"%s{nwapp}","proto":"%s{ipproto}","ipcat":"%s{ipcat}","destcountry":"%s{destcountry}","avgduration":"%d{avgduration}","rulelabel":"%s{erulelabel}","inbytes":"%ld{inbytes}","outbytes":"%ld{outbytes}","duration":"%d{duration}","durationms":"%d{durationms}","numsessions":"%d{numsessions}","ipsrulelabel":"%s{ipsrulelabel}","threatcat":"%s{threatcat}","threatname":"%s{ethreatname}","deviceowner":"%s{deviceowner}","devicehostname":"%s{devicehostname}"\}\}
在「Timezone」(時區)清單中,選取輸出檔案「Time」(時間) 欄位的時區。根據預設,時區會設為貴機構的時區。
查看已設定的設定。
按一下「儲存」,測試連線。如果連線成功,畫面會顯示綠色勾號,以及「Test Connectivity Successful: OK (200)」(測試連線成功:OK (200)) 訊息。
如要進一步瞭解 Google SecOps 動態消息,請參閱 Google SecOps 動態消息說明文件。如要瞭解各動態饋給類型的規定,請參閱「依類型設定動態饋給」。
如果在建立動態饋給時遇到問題,請與 Google SecOps 支援團隊聯絡。
支援的 Zscaler 防火牆記錄格式
Zscaler Firewall 剖析器支援 JSON 格式的記錄。
支援的 Zscaler 防火牆記錄檔範例
JSON:
{ "sourcetype": "zscalernss-fw", "event": { "datetime": "Tue Apr 11 00:44:01 2023", "user": "abc@test.com", "department": "Optum%20Tech%20UHC%20Technology", "locationname": "Road%20Warrior", "cdport": "443", "csport": "50407", "sdport": "443", "ssport": "36223", "csip": "198.51.100.8", "cdip": "198.51.100.7", "ssip": "198.51.100.9", "sdip": "198.51.100.10", "tsip": "198.51.100.11", "tunsport": "0", "tuntype": "ZscalerClientConnector", "action": "Allow", "dnat": "No", "stateful": "Yes", "aggregate": "Yes", "nwsvc": "ZSCALER_PROXY_NW_SERVICES", "nwapp": "sharepoint_document", "proto": "TCP", "ipcat": "Miscellaneous or Unknown", "destcountry": "Other", "avgduration": "239296", "rulelabel": "Default%20Firewall%20Filtering%20Rule", "inbytes": "286134", "outbytes": "515005", "duration": "6461", "durationms": "6461000", "numsessions": "27", "ipsrulelabel": "None", "threatcat": "None", "threatname": "None", "deviceowner": "dummydeviceowner", "devicehostname": "dummyhostname" } }
欄位對應參考資料
下表列出 ZSCALER_FIREWALL
記錄類型的記錄欄位,以及對應的 UDM 欄位。
Log field | UDM mapping | Logic |
---|---|---|
fwd_gw_name |
intermediary.resource.name |
|
|
intermediary.resource.resource_type |
If the fwd_gw_name log field value is not empty or the ofwd_gw_name log field value is not empty, then the intermediary.resource.resource_type UDM field is set to GATEWAY . |
ofwd_gw_name |
intermediary.security_result.detection_fields[ofwd_gw_name] |
|
ordr_rulename |
intermediary.security_result.detection_fields[ordr_rulename] |
|
orulelabel |
intermediary.security_result.detection_fields[orulelabel] |
|
rdr_rulename |
intermediary.security_result.rule_name |
|
rulelabel |
intermediary.security_result.rule_name |
|
erulelabel |
intermediary.security_result.rule_name |
|
bypass_etime |
metadata.collected_timestamp |
|
datetime |
metadata.event_timestamp |
|
epochtime |
metadata.event_timestamp |
|
|
metadata.event_type |
If the sdport log field value is equal to 80 or the sdport log field value is equal to 443 and the csip log field value is not empty or the tsip log field value is not empty or the ssip log field value is not empty and the cdip log field value is not empty or the sdip log field value is not empty, then the metadata.event_type UDM field is set to NETWORK_HTTP .Else, if the csip log field value is not empty or the tsip log field value is not empty or the ssip log field value is not empty and the cdip log field value is not empty or the sdip log field value is not empty, then the metadata.event_type UDM field is set to NETWORK_CONNECTION .Else, if the csip log field value is not empty or the tsip log field value is not empty or the ssip 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 . |
recordid |
metadata.product_log_id |
|
|
metadata.product_name |
The metadata.product_name UDM field is set to Firewall . |
|
metadata.vendor_name |
The metadata.vendor_name UDM field is set to Zscaler . |
proto |
network.ip_protocol |
If the proto log field value contain one of the following values, then the proto log field is mapped to the network.ip_protocol UDM field.
|
inbytes |
network.received_bytes |
|
outbytes |
network.sent_bytes |
|
avgduration |
network.session_duration.nanos |
If the durationms log field value is empty and the avgduration log field value is not empty, then the avgduration log field is mapped to the network.session_duration.nanos UDM field. |
durationms |
network.session_duration.nanos |
If the durationms log field value is not empty, then the durationms log field is mapped to the network.session_duration.nanos UDM field. |
duration |
network.session_duration.seconds |
|
|
principal.asset.asset_id |
If the devicename log field value is not empty, then the Zscaler:devicename log field is mapped to the principal.asset.asset_id UDM field. |
devicemodel |
principal.asset.hardware.model |
|
devicehostname |
principal.asset.hostname |
If the devicehostname log field value is not empty, then the devicehostname log field is mapped to the principal.asset.hostname UDM field. |
|
principal.asset.platform_software.platform |
If the deviceostype log field value matches the regular expression pattern (?i)iOS , then the principal.asset.platform_software.platform UDM field is set to IOS .Else, if the deviceostype log field value matches the regular expression pattern (?i)Android , then the principal.asset.platform_software.platform UDM field is set to ANDROID .Else, if the deviceostype log field value matches the regular expression pattern (?i)Windows , then the principal.asset.platform_software.platform UDM field is set to WINDOWS .Else, if the deviceostype log field value matches the regular expression pattern (?i)MAC , then the principal.asset.platform_software.platform UDM field is set to MAC .Else, if the deviceostype log field value matches the regular expression pattern (?i)Other , then the principal.asset.platform_software.platform UDM field is set to UNKNOWN_PLATFORM . |
deviceosversion |
principal.asset.platform_software.platform_version |
|
external_deviceid |
principal.asset.product_object_id |
|
csip |
principal.ip |
|
tsip |
principal.ip |
|
srcip_country |
principal.location.country_or_region |
|
location |
principal.location.name |
|
locationname |
principal.location.name |
|
ssip |
principal.nat_ip |
|
ssport |
principal.nat_port |
|
csport |
principal.port |
|
dept |
principal.user.department |
|
department |
principal.user.department |
|
login |
principal.user.email_addresses |
The login field is extracted from login log field using the Grok pattern, and the login log field is mapped to the principal.user.email_addresses UDM field. |
user |
principal.user.email_addresses |
The user field is extracted from user log field using the Grok pattern, and the user log field is mapped to the principal.user.email_addresses UDM field. |
deviceowner |
principal.user.userid |
|
|
security_result.action |
If the action log field value matches the regular expression pattern ^Allow.* , then the security_result.action UDM field is set to ALLOW .Else, if the action log field value matches the regular expression pattern ^Drop.* or ^Block.* , then the security_result.action UDM field is set to BLOCK .Else, if the action log field value is equal to Reset , then the security_result.action UDM field is set to BLOCK . |
action |
security_result.action_details |
|
|
security_result.severity |
If the threat_severity log field value is one of the following: CRITICAL , HIGH , MEDIUM , LOW , NONE then, the threat_severity log field is mapped to the security_result.severity UDM field. Else, if the threat_score log field value is equal to 0 then, the security_result.severity UDM field is set to NONE . Else, if threat_score log field value > 0 and the threat_score log field value <= 45 then, the security_result.severity UDM field is set to LOW . Else, if threat_score log field value > 45 and the threat_score log field value < 75 then, the security_result.severity UDM field is set to MEDIUM . Else, if threat_score log field value >= 75 and the threat_score log field value < 90 then, the security_result.severity UDM field is set to HIGH . Else, if threat_score log field value >= 90 and the threat_score log field value <= 100 then, the security_result.severity UDM field is set to CRITICAL . |
|
security_result.severity_details |
If the threat_score log field value is not empty and the threat_severity log field value is not empty then, %{threat_score} - %{threat_severity} log field is mapped to the security_result.severity_details UDM field. Else, if threat_severity log field value is not empty then, threat_severity log field is mapped to the security_result.severity_details UDM field. Else, if threat_score log field value is not empty then, threat_score log field is mapped to the security_result.severity_details UDM field. |
|
security_result.category |
If the ipcat log field value is not empty or the oipcat log field value is not empty, then the security_result.category UDM field is set to NETWORK_CATEGORIZED_CONTENT . |
ipcat |
security_result.category_details |
The ipcat log field is mapped to the security_result.category_details UDM field. |
threatcat |
security_result.category_details |
If the threatcat log field value is not equal to None , then the threatcat log field is mapped to the security_result.category_details UDM field. |
|
security_result.detection_fields[bypassed_session] |
If the bypassed_session log field value is equal to 0 , then the security_result.detection_fields.bypassed_session UDM field is set to the traffic did not bypass Zscaler Client Connector .Else, if the bypassed_session log field value is equal to 1 , then the security_result.detection_fields.bypassed_session UDM field is set to the traffic bypassed Zscaler Client Connector . |
odevicehostname |
security_result.detection_fields[odevicehostname] |
|
odevicename |
security_result.detection_fields[odevicename] |
|
odeviceowner |
security_result.detection_fields[odeviceowner] |
|
oipcat |
security_result.detection_fields[oipcat] |
|
oipsrulelabel |
security_result.detection_fields[oipsrulelabel] |
|
numsessions |
security_result.detection_fields[numsessions] |
|
|
security_result.rule_labels [ips_custom_signature] |
If the ips_custom_signature log field value is equal to 0 , then the security_result.rule_labels.ips_custom_signature UDM field is set to non-custom IPS rule .Else, if the ips_custom_signature log field value is equal to 1 , then the security_result.rule_labels.ips_custom_signature UDM field is set to custom IPS rule . |
ipsrulelabel |
security_result.rule_name |
If the ipsrulelabel log field value is not equal to None , then the ipsrulelabel log field is mapped to the security_result.rule_name UDM field. |
threatname |
security_result.threat_name |
If the threatname log field value is not equal to None , then the threatname log field is mapped to the security_result.threat_name UDM field. |
ethreatname |
security_result.threat_name |
If the ethreatname log field value is not equal to None , then the ethreatname log field is mapped to the security_result.threat_name UDM field. |
nwapp |
target.application |
|
cdfqdn |
target.domain.name |
|
sdip |
target.ip |
|
datacentercity |
target.location.city |
|
destcountry |
target.location.country_or_region |
|
datacentercountry |
target.location.country_or_region |
|
datacenter |
target.location.name |
|
cdip |
target.nat_ip |
|
cdport |
target.nat_port |
|
sdport |
target.port |
|
odnatlabel |
target.security_result.detection_fields[odnatlabel] |
|
dnat |
target.security_result.rule_labels[dnat] |
|
dnatrulelabel |
target.security_result.rule_name |
|
aggregate |
additional.fields[aggregate] |
|
day |
additional.fields[day] |
|
dd |
additional.fields[dd] |
|
deviceappversion |
additional.fields[deviceappversion] |
|
eedone |
additional.fields[eedone] |
|
flow_type |
additional.fields[flow_type] |
|
hh |
additional.fields[hh] |
|
mm |
additional.fields[mm] |
|
mon |
additional.fields[mon] |
|
mth |
additional.fields[mth] |
|
nwsvc |
additional.fields[nwsvc] |
|
ocsip |
additional.fields[ocsip] |
|
ozpa_app_seg_name |
additional.fields[ozpa_app_seg_name] |
|
ss |
additional.fields[ss] |
|
sourcetype |
additional.fields[sourcetype] |
|
stateful |
additional.fields[stateful] |
|
tz |
additional.fields[tz] |
|
tuntype |
additional.fields[traffic_forwarding_method] |
|
tunsport |
additional.fields[tunsport] |
|
yyyy |
additional.fields[yyyy] |
|
zpa_app_seg_name |
additional.fields[zpa_app_seg_name] |
|
ztunnelversion |
additional.fields[ztunnelversion] |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。