Recolha registos da firewall do Zscaler

Compatível com:

Este documento descreve como pode exportar registos da firewall da Zscaler configurando um feed do Google Security Operations e como os campos de registo são mapeados para os campos do modelo de dados unificado (UDM) do Google SecOps.

Para mais informações, consulte o artigo Vista geral da ingestão de dados no Google SecOps.

Uma implementação típica consiste na firewall da Zscaler e no feed de webhook do Google SecOps configurado para enviar registos para o Google SecOps. Cada implementação do cliente pode ser diferente e mais complexa.

A implementação contém os seguintes componentes:

  • Zscaler Firewall: a plataforma a partir da qual recolhe registos.

  • Feed do Google SecOps: o feed do Google SecOps que obtém registos da firewall da Zscaler e escreve registos no Google SecOps.

  • Google SecOps: retém e analisa os registos.

Uma etiqueta de carregamento identifica o analisador que normaliza os dados de registo não processados para o formato UDM estruturado. As informações neste documento aplicam-se ao analisador com a etiqueta de carregamento ZSCALER_FIREWALL.

Antes de começar

Certifique-se de que cumpre os seguintes pré-requisitos:

  • Acesso à consola do Zscaler Internet Access. Para mais informações, consulte o artigo Acesso seguro à Internet e ao SaaS: ajuda do ZIA.
  • Zscaler Firewall 2024 ou posterior
  • Todos os sistemas na arquitetura de implementação estão configurados com o fuso horário UTC.
  • A chave da API necessária para concluir a configuração do feed no Google Security Operations. Para mais informações, consulte o artigo Configurar chaves de API.

Configure feeds

Para configurar este tipo de registo, siga estes passos:

  1. Aceda a Definições do SIEM > Feeds.
  2. Clique em Adicionar novo feed.
  3. Clique no pacote de feeds Zscaler.
  4. Localize o tipo de registo necessário e clique em Adicionar novo feed.
  5. Introduza valores para os seguintes parâmetros de entrada:

    • Tipo de origem: webhook (recomendado)
    • Delimitador de divisão: o caráter usado para separar linhas de registos. Deixe em branco se não for usado nenhum delimitador.

    Opções avançadas

    • Nome do feed: um valor pré-preenchido que identifica o feed.
    • Espaço de nomes do recurso: espaço de nomes associado ao feed.
    • Etiquetas de carregamento: etiquetas aplicadas a todos os eventos deste feed.
  6. Clique em Criar feed.

Para mais informações sobre a configuração de vários feeds para diferentes tipos de registos nesta família de produtos, consulte o artigo Configure feeds por produto.

Configure a firewall do Zscaler

  1. Na consola do Zscaler Internet Access, clique em Administração > Serviço de streaming de nanologs > Feeds NSS na nuvem e, de seguida, clique em Adicionar feed NSS na nuvem.
  2. É apresentada a janela Adicionar feed NSS na nuvem. Na janela Adicionar feed NSS da nuvem, introduza os detalhes.
  3. Introduza um nome para o feed no campo Nome do feed.
  4. Selecione NSS para firewall em Tipo de NSS.
  5. Selecione o estado na lista Estado para ativar ou desativar o feed NSS.
  6. Mantenha o valor no menu pendente Taxa de SIEM como Ilimitado. Para suprimir o fluxo de saída devido a licenciamento ou outras restrições, altere o valor.
  7. Selecione Outro na lista Tipo de SIEM.
  8. Selecione Desativado na lista Autenticação OAuth 2.0.
  9. Introduza um limite de tamanho para uma carga útil de pedido HTTP individual de acordo com a prática recomendada do SIEM em Tamanho máximo do lote. Por exemplo, 512 KB.
  10. Introduza o URL HTTPS do ponto final da API Chronicle no URL da API no seguinte formato:

      https://<CHRONICLE_REGION>-chronicle.googleapis.com/v1alpha/projects/<GOOGLE_PROJECT_NUMBER>/locations/<LOCATION>/instances/<CUSTOMER_ID>/feeds/<FEED_ID>:importPushLogs
    
    • CHRONICLE_REGION: região onde a sua instância do Chronicle está alojada. Por exemplo, US.
    • GOOGLE_PROJECT_NUMBER: número do projeto BYOP. Obtenha-o a partir do C4.
    • LOCATION: região do Chronicle. Por exemplo, US.
    • CUSTOMER_ID: ID de cliente do Chronicle. Obtenha a partir de C4.
    • FEED_ID: ID do feed apresentado na IU do feed no novo webhook criado
    • URL da API de exemplo:
    https://us-chronicle.googleapis.com/v1alpha/projects/12345678910/locations/US/instances/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/feeds/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy:importPushLogs
    
  11. Clique em Adicionar cabeçalho HTTP e, de seguida, adicione cabeçalhos HTTP no seguinte formato:

    • Header 1: Key1: X-goog-api-key e Value1: chave da API gerada nas credenciais da API do Google Cloud BYOP.
    • Header 2: Key2: X-Webhook-Access-Key e Value2: chave secreta da API gerada na "CHAVE SECRETA" do webhook.
  12. Selecione Registos de firewall na lista Tipos de registos.

  13. Selecione JSON na lista Tipo de saída do feed.

  14. Defina o caráter de escape do feed como , \ ".

  15. Para adicionar um novo campo ao formato de saída do feed,selecione Personalizado na lista Tipo de saída do feed.

  16. Copie e cole o Formato de saída do feed e adicione novos campos. Certifique-se de que os nomes das chaves correspondem aos nomes dos campos reais.

  17. Segue-se o formato de saída do feed predefinido:

      \{ "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. Selecione o fuso horário para o campo Hora no ficheiro de saída na lista Fuso horário. Por predefinição, o fuso horário é definido como o fuso horário da sua organização.

  19. Reveja as definições configuradas.

  20. Clique em Guardar para testar a conetividade. Se a ligação for bem-sucedida, é apresentada uma marca de verificação verde acompanhada da mensagem Test Connectivity Successful: OK (200).

Para mais informações sobre os feeds do Google SecOps, consulte a documentação dos feeds do Google SecOps. Para obter informações sobre os requisitos de cada tipo de feed, consulte o artigo Configuração do feed por tipo.

Se tiver problemas ao criar feeds, contacte o apoio técnico da Google SecOps.

Formatos de registo da firewall do Zscaler suportados

O analisador do Zscaler Firewall suporta registos no formato JSON.

Registos de exemplo da firewall do Zscaler suportados

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

Referência de mapeamento de campos

A tabela seguinte apresenta os campos de registo do ZSCALER_FIREWALL tipo de registo e os respetivos campos 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.
  • TCP
  • UDP
  • ICMP
  • GRE
  • IP6IN4
  • IGMP
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]

Precisa de mais ajuda? Receba respostas de membros da comunidade e profissionais da Google SecOps.