Raccogli i log del firewall Zscaler

Supportato in:

Questo documento descrive come esportare i log di Zscaler Firewall configurando un feed di Google Security Operations e come i campi dei log vengono mappati ai campi del modello di dati unificato (UDM) di Google SecOps.

Per ulteriori informazioni, consulta la panoramica dell'importazione dei dati in Google SecOps.

Un deployment tipico è costituito dal firewall Zscaler e dal feed webhook di Google SecOps configurato per inviare i log a Google SecOps. Ogni implementazione del cliente può essere diversa e potrebbe essere più complessa.

Il deployment contiene i seguenti componenti:

  • Zscaler Firewall: la piattaforma da cui raccogli i log.

  • Feed Google SecOps: il feed Google SecOps che recupera i log dal firewall Zscaler e li scrive in Google SecOps.

  • Google SecOps: conserva e analizza i log.

Un'etichetta di importazione identifica l'analizzatore sintattico che normalizza i dati dei log non elaborati in formato UDM strutturato. Le informazioni contenute in questo documento si applicano al parser con l'etichetta di importazione ZSCALER_FIREWALL.

Prima di iniziare

Assicurati di disporre dei seguenti prerequisiti:

  • Accedi alla console Zscaler Internet Access. Per ulteriori informazioni, consulta la guida di ZIA per l'accesso sicuro a internet e SaaS.
  • Zscaler Firewall 2024 o versioni successive
  • Tutti i sistemi nell'architettura di deployment sono configurati con il fuso orario UTC.
  • La chiave API necessaria per completare la configurazione del feed in Google Security Operations. Per ulteriori informazioni, vedi Configurare le chiavi API.

Configurare i feed

Esistono due diversi punti di contatto per configurare i feed nella piattaforma Google SecOps:

  • Impostazioni SIEM > Feed
  • Content Hub > Pacchetti di contenuti

Configura i feed da Impostazioni SIEM > Feed

Per configurare più feed per tipi di log diversi all'interno di questa famiglia di prodotti, consulta Configurare i feed per prodotto.

Per configurare un singolo feed:

  1. Vai a Impostazioni SIEM > Feed.
  2. Fai clic su Aggiungi nuovo feed.
  3. Nella pagina successiva, fai clic su Configura un singolo feed.
  4. Nel campo Nome feed, inserisci un nome per il feed, ad esempio Log firewall ZScaler.
  5. Seleziona Webhook come Tipo di origine.
  6. Seleziona ZScaler NGFW come Tipo di log.
  7. Fai clic su Avanti.
  8. (Facoltativo) Inserisci i valori per i seguenti parametri di input:
    1. Delimitatore di separazione: il delimitatore utilizzato per separare le righe dei log. Lascia vuoto se non viene utilizzato un delimitatore.
    2. Spazio dei nomi dell'asset: lo spazio dei nomi dell'asset.
    3. Etichette di importazione: l'etichetta da applicare agli eventi di questo feed.
  9. Fai clic su Avanti.
  10. Esamina la configurazione del nuovo feed e poi fai clic su Invia.
  11. Fai clic su Genera chiave segreta per generare una chiave segreta per autenticare questo feed.

Configurare i feed da Content Hub

Specifica i valori per i seguenti campi:

  • Delimitatore di split: il delimitatore utilizzato per separare le righe di log, ad esempio \n.

Opzioni avanzate

  • Nome feed: un valore precompilato che identifica il feed.
  • Tipo di origine: metodo utilizzato per raccogliere i log in Google SecOps.
  • Spazio dei nomi dell'asset: lo spazio dei nomi dell'asset.
  • Etichette di importazione: l'etichetta applicata agli eventi di questo feed.
  • Fai clic su Avanti.
  • Controlla la configurazione del feed nella schermata Concludi e poi fai clic su Invia.
  • Fai clic su Genera chiave segreta per generare una chiave segreta per autenticare questo feed.

Configurare il firewall Zscaler

  1. Nella console Zscaler Internet Access, fai clic su Amministrazione > Nanolog Streaming Service > Feed NSS cloud e poi su Aggiungi feed NSS cloud.
  2. Viene visualizzata la finestra Aggiungi feed NSS cloud. Nella finestra Aggiungi feed NSS cloud, inserisci i dettagli.
  3. Inserisci un nome per il feed nel campo Nome feed.
  4. Seleziona NSS per firewall in Tipo NSS.
  5. Seleziona lo stato dall'elenco Stato per attivare o disattivare il feed NSS.
  6. Mantieni il valore nel menu a discesa Tariffa SIEM impostato su Illimitato. Per eliminare lo stream di output a causa di licenze o altri vincoli, modifica il valore.
  7. Seleziona Altro nell'elenco Tipo SIEM.
  8. Seleziona Disattivata nell'elenco Autenticazione OAuth 2.0.
  9. Inserisci un limite di dimensioni per il payload di una singola richiesta HTTP in base alle best practice del SIEM in Dimensione massima batch. Ad esempio, 512 KB.
  10. Inserisci l'URL HTTPS dell'endpoint API Chronicle nell'URL API nel seguente formato:

      https://<CHRONICLE_REGION>-chronicle.googleapis.com/v1alpha/projects/<GOOGLE_PROJECT_NUMBER>/locations/<LOCATION>/instances/<CUSTOMER_ID>/feeds/<FEED_ID>:importPushLogs
    
    • CHRONICLE_REGION: regione in cui è ospitata l'istanza di Chronicle. Ad esempio, US.
    • GOOGLE_PROJECT_NUMBER: numero del progetto BYOP. Richiedi questo documento a C4.
    • LOCATION: regione di Chronicle. Ad esempio, US.
    • CUSTOMER_ID: ID cliente Chronicle. Ottieni da C4.
    • FEED_ID: ID feed visualizzato nell'interfaccia utente del feed nel nuovo webhook creato
    • URL API di esempio:
    https://us-chronicle.googleapis.com/v1alpha/projects/12345678910/locations/US/instances/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/feeds/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy:importPushLogs
    
  11. Fai clic su Aggiungi intestazione HTTP e aggiungi le intestazioni HTTP nel seguente formato:

    • Header 1: Key1: X-goog-api-key e Value1: chiave API generata nelle credenziali API di Google Cloud BYOP.
    • Header 2: Key2: X-Webhook-Access-Key e Value2: la chiave segreta dell'API generata in "SECRET KEY" dell'webhook.
  12. Seleziona Log firewall nell'elenco Tipi di log.

  13. Seleziona JSON nell'elenco Tipo di output del feed.

  14. Imposta Carattere di escape del feed su , \ ".

  15. Per aggiungere un nuovo campo al Formato di output del feed,seleziona Personalizzato nell'elenco Tipo di output del feed.

  16. Copia e incolla il Formato di output del feed e aggiungi nuovi campi. Assicurati che i nomi delle chiavi corrispondano ai nomi effettivi dei campi.

  17. Di seguito è riportato il formato di output del feed predefinito:

      \{ "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}"\}\}
    
  18. Seleziona il fuso orario per il campo Ora nel file di output nell'elenco Fuso orario. Per impostazione predefinita, il fuso orario è impostato sul fuso orario della tua organizzazione.

  19. Rivedi le impostazioni configurate.

  20. Fai clic su Salva per verificare la connettività. Se la connessione è riuscita, viene visualizzata una spunta verde accompagnata dal messaggio Test di connettività riuscito: OK (200).

Per ulteriori informazioni sui feed di Google SecOps, consulta la documentazione dei feed di Google SecOps. Per informazioni sui requisiti per ciascun tipo di feed, consulta Configurazione dei feed per tipo.

Se riscontri problemi durante la creazione dei feed, contatta l'assistenza Google SecOps.

Formati dei log del firewall Zscaler supportati

Lo scanner del firewall Zscaler supporta i log in formato JSON.

Log di esempio del firewall Zscaler supportati

  • 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"
      }
    }
    

Riferimento alla mappatura dei campi

La tabella seguente elenca i campi del log del tipo di log ZSCALER_FIREWALL e i relativi campi UDM.

Log field UDM mapping Logic
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.
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.
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.
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.
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.
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.
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.
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.
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.
action security_result.action_details
aggregate additional.fields[aggregate]
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.
bypass_etime metadata.collected_timestamp
cdfqdn target.domain.name
cdip target.nat_ip
cdport target.nat_port
csip principal.ip
csport principal.port
datacenter target.location.name
datacentercity target.location.city
datacentercountry target.location.country_or_region
datetime metadata.event_timestamp
day additional.fields[day]
dd additional.fields[dd]
department principal.user.department
dept principal.user.department
destcountry target.location.country_or_region
deviceappversion additional.fields[deviceappversion]
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.
devicemodel principal.asset.hardware.model
deviceosversion principal.asset.platform_software.platform_version
deviceowner principal.user.userid
dnat target.security_result.rule_labels[dnat]
dnatrulelabel target.security_result.rule_name
duration network.session_duration.seconds
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.
eedone additional.fields[eedone]
epochtime metadata.event_timestamp
erulelabel intermediary.security_result.rule_name
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.
external_deviceid principal.asset.product_object_id
flow_type additional.fields[flow_type]
fwd_gw_name intermediary.resource.name
hh additional.fields[hh]
inbytes network.received_bytes
ipcat security_result.category_details The ipcat log field is mapped to the security_result.category_details UDM field.
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.
location principal.location.name
locationname principal.location.name
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.
mm additional.fields[mm]
mon additional.fields[mon]
mth additional.fields[mth]
numsessions security_result.detection_fields[numsessions]
nwapp target.application
nwsvc additional.fields[nwsvc]
ocsip additional.fields[ocsip]
odevicehostname security_result.detection_fields[odevicehostname]
odevicename security_result.detection_fields[odevicename]
odeviceowner security_result.detection_fields[odeviceowner]
odnatlabel target.security_result.detection_fields[odnatlabel]
ofwd_gw_name intermediary.security_result.detection_fields[ofwd_gw_name]
oipcat security_result.detection_fields[oipcat]
oipsrulelabel security_result.detection_fields[oipsrulelabel]
ordr_rulename intermediary.security_result.detection_fields[ordr_rulename]
orulelabel intermediary.security_result.detection_fields[orulelabel]
outbytes network.sent_bytes
ozpa_app_seg_name additional.fields[ozpa_app_seg_name]
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.
  • TCP
  • UDP
  • ICMP
  • GRE
  • IP6IN4
  • IGMP
rdr_rulename intermediary.security_result.rule_name
recordid metadata.product_log_id
rulelabel intermediary.security_result.rule_name
sdip target.ip
sdport target.port
sourcetype additional.fields[sourcetype]
srcip_country principal.location.country_or_region
ss additional.fields[ss]
ssip principal.nat_ip
ssport principal.nat_port
stateful additional.fields[stateful]
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.
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.
tsip principal.ip
tunsport additional.fields[tunsport]
tuntype additional.fields[traffic_forwarding_method]
tz additional.fields[tz]
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.
yyyy additional.fields[yyyy]
zpa_app_seg_name additional.fields[zpa_app_seg_name]
ztunnelversion additional.fields[ztunnelversion]

Hai bisogno di ulteriore assistenza? Ricevi risposte dai membri della community e dai professionisti di Google SecOps.