Este documento explica como exportar registros de fluxo de VPC para o Google Security Operations usando Google Cloud. O analisador transforma os registros do formato JSON integrado para a UDM do Google Security Operations. Ele extrai campos relevantes, como IP de origem e destino, porta, protocolo e bytes enviados, e os mapeia para os campos correspondentes da UDM, considerando a direção da rede e casos especiais para uma representação precisa no Google SecOps.
Antes de começar
Verifique se você atende aos seguintes pré-requisitos:
Instância do Google SecOps.
O fluxo da VPC está configurado e ativo no seu ambiente Google Cloud .
Na página Criar um bucket, insira as informações do seu bucket. Após cada uma das etapas a seguir, clique em Continuar para prosseguir para a próxima etapa:
Na seção Começar, faça o seguinte:
Insira um nome exclusivo que atenda aos requisitos de nome de bucket, por exemplo, vpcflow-logs.
Para ativar o namespace hierárquico, clique na seta de expansão para abrir a seção Otimizar para cargas de trabalho orientadas a arquivos e com uso intensivo de dados e selecione Ativar namespace hierárquico neste bucket.
Para adicionar um rótulo de bucket, clique na seta de expansão para abrir a seção Rótulos.
Clique em Adicionar rótulo e especifique uma chave e um valor para o rótulo.
Na seção Escolha onde armazenar seus dados, faça o seguinte:
Selecione um tipo de local.
Use o menu do tipo de local para selecionar um Local em que os dados de objetos no bucket serão armazenados permanentemente.
Para configurar a replicação entre buckets, abra a seção Configurar a replicação entre buckets.
Na seção Escolha uma classe de armazenamento para seus dados, selecione uma classe de armazenamento padrão para o bucket ou selecione Classe automática para gerenciamento automático da classe de armazenamento dos dados do bucket.
Na seção Escolha como controlar o acesso a objetos, selecione não para aplicar a prevenção de acesso público e selecione um modelo de controle de acesso para os objetos do bucket.
Na seção "Escolha como proteger os dados do objeto", faça o seguinte:
Selecione qualquer uma das opções em "Proteção de dados" que você quer definir para o bucket.
Para escolher como os dados do objeto serão criptografados, clique na seta de expansão identificada como Criptografia de dados e selecione um Método de criptografia de dados.
Clique em Criar.
Configurar a exportação de registros em Google Cloud Fluxo de VPC
Faça login na conta do Google Cloud usando sua conta privilegiada.
Na página Bem-vindo, clique em Redes VPC.
Clique em Padrão. Uma página de sub-rede vai aparecer.
Selecione todos os registros.
Clique em Registros de fluxo > Configurar.
Selecione Intervalo de agregação, por exemplo, 30 SEG.
Informe a Taxa de amostragem, por exemplo, 50%.
Clique em Salvar.
Pesquise Logging na barra de pesquisa e clique em Enter.
Na Análise de registros, filtre os registros escolhendo VPC_flows em Nome do registro e clique em Aplicar.
Clique em Mais ações.
Clique em Criar coletor.
Forneça as seguintes configurações:
Detalhes do coletor: insira um nome e uma descrição.
Clique em Próxima.
Destino do coletor: selecione Bucket do Cloud Storage.
Bucket do Cloud Storage: selecione o bucket criado anteriormente ou crie um novo.
Clique em Próxima.
Escolher os registros para incluir no coletor: um registro padrão é preenchido quando você seleciona uma opção no bucket do Cloud Storage.
Clique em Próxima.
Opcional: Escolher registros para filtrar do coletor: selecione os registros que você não quer que sejam coletados.
Clique em Criar coletor.
Configurar feeds
Há dois pontos de entrada diferentes para configurar feeds na plataforma do Google SecOps:
Configurações do SIEM > Feeds > Adicionar novo
Central de conteúdo > Pacotes de conteúdo > Começar
Como configurar o feed de fluxo da Google Cloud VPC
Clique no pacote Plataforma de computação do Google Cloud.
Localize o tipo de registro GCP VPC Flow Feed.
Especifique os valores nos campos a seguir.
Tipo de origem: Amazon SQS V2
Nome da fila: o nome da fila do SQS de onde ler.
URI do S3: o URI do bucket.
s3://your-log-bucket-name/
Substitua your-log-bucket-name pelo nome real do seu bucket do S3.
Opções de exclusão de origem: selecione a opção de exclusão de acordo com suas preferências de ingestão.
Idade máxima do arquivo: inclui arquivos modificados no último número de dias. O padrão é de 180 dias.
ID da chave de acesso à fila do SQS: uma chave de acesso à conta que é uma string alfanumérica de 20 caracteres.
Chave de acesso secreta da fila do SQS: uma chave de acesso da conta que é uma string alfanumérica de 40 caracteres.
Opções avançadas
Nome do feed: um valor pré-preenchido que identifica o feed.
Namespace do recurso: namespace associado ao feed.
Rótulos de ingestão: rótulos aplicados a todos os eventos deste feed.
Clique em Criar feed.
Para mais informações sobre como configurar vários feeds para diferentes tipos de registros nessa família de produtos, consulte Configurar feeds por produto.
Formatos de registros de fluxo de VPC compatíveis
O analisador de registros de fluxo da VPC é compatível com registros no formato JSON.
Registros de amostra de registros de fluxo de VPC compatíveis
Mapeamento direto quando network.direction é OUTBOUND. Mapeado de principal.ip quando network.direction é INBOUND.
connection.dest_port
target.port
Convertido para número inteiro se for maior que -1.
connection.protocol
network.ip_protocol
Convertido em string e mapeado para número inteiro. Com base no valor inteiro, mapeado para o nome do protocolo IP (por exemplo, TCP, UDP, ICMP).
connection.src_ip
principal.ip
Mapeamento direto.
connection.src_port
principal.port
Convertido em número inteiro.
dest_instance.region
target.location.name
Mapeamento direto.
dest_instance.vm_name
target.asset.hostname
Mapeamento direto.
dest_location.city
target.location.city
Mapeamento direto.
dest_location.country
target.location.country_or_region
Mapeamento direto.
dest_location.region
target.location.state
Mapeamento direto.
dest_vpc.project_id
target.namespace
Usado com dest_vpc.vpc_name para formar o target.namespace.
dest_vpc.vpc_name
target.namespace
Usado com dest_vpc.project_id para formar o target.namespace.
insertId
metadata.product_log_id
Mapeamento direto.
jsonPayload.bytes_sent
network.sent_bytes
Renomeado como "network.sent_bytes" e convertido para uinteger.
jsonPayload.packets_sent
network.sent_packets
Convertido em número inteiro.
labels.tunnel_id
additional.fields
Unidos em "additional.fields" com a chave Tunnel Id e o tipo string_value.
logName
security_result.category_details
Mapeamento direto.
resource.labels.project_id
target.resource.name
Usado para construir o target.resource.name com o formato //cloudresourcemanager.googleapis.com/projects/{resource.labels.project_id}.
resource.labels.region
target.location.country_or_region
Mapeamento direto.
resource.labels.subnetwork_id
target.user.attribute.labels
Unido a "target.user.attribute.labels" com a chave subnetwork_id.
resource.type
metadata.product_event_type
Mapeamento direto.
gravidade,
security_result.severity
Mapeado para LOW se o valor for DEBUG.
src_gke_details.cluster.cluster_location
principal.resource.attribute.labels
Unido a "principal.resource.attribute.labels" com a chave cluster_location.
src_gke_details.cluster.cluster_name
principal.resource.attribute.labels
Unido a "principal.resource.attribute.labels" com a chave cluster_name.
src_gke_details.pod.pod_name
principal.resource.attribute.labels
Unido a "principal.resource.attribute.labels" com a chave pod_name.
src_gke_details.pod.pod_namespace
principal.resource.attribute.labels
Unido a "principal.resource.attribute.labels" com a chave pod_namespace.
src_instance.region
principal.location.name
Mapeamento direto.
src_instance.vm_name
principal.asset.hostname
Mapeamento direto.
src_location.city
principal.location.city
Mapeamento direto.
src_location.country
principal.location.country_or_region
Mapeamento direto.
src_location.region
principal.location.state
Mapeamento direto.
src_vpc.project_id
principal.namespace
Usado com src_vpc.vpc_name para formar o principal.namespace.
src_vpc.vpc_name
principal.namespace
Usado com src_vpc.project_id para formar o principal.namespace.
textPayload
additional.fields
Unidos em "additional.fields" com a chave Textpayload e o tipo string_value.
timestamp
metadata.event_timestamp
Usado para preencher event_timestamp se jsonPayload.end_time estiver vazio.
metadata.description
Uma descrição do fluxo de rede, incluindo o criador de relatórios (SRC ou DEST) e a direção (INBOUND ou OUTBOUND), é gerada com base no campo "reporter".
metadata.event_type
Defina como NETWORK_CONNECTION para registros de fluxo da VPC e USER_RESOURCE_ACCESS para outros tipos de registros.
metadata.log_type
Defina como GCP_VPC_FLOW.
metadata.product_name
Defina como GCP VPC Flow Logs.
metadata.product_version
Defina como 1.0.
metadata.vendor_name
Defina como Google Cloud.
network.direction
Determinado com base em "target.port". Se a porta for conhecida ou reservada, ela será considerada INBOUND. Caso contrário, será OUTBOUND.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-21 UTC."],[[["\u003cp\u003eThis guide explains how to export Google Cloud VPC Flow Logs to Google Security Operations (SecOps) and map the logs to the Unified Data Model (UDM).\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating a Google Cloud Storage bucket, configuring log export from Google Cloud VPC Flow to the bucket, and setting up a feed in Google SecOps to ingest these logs.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, users need a Google SecOps instance, active VPC Flow in their Google Cloud environment, and privileged access to Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eThe UDM mapping table outlines how various fields from the Cloud VPC Flow Logs are transformed and mapped to specific UDM fields within Google Security Operations, covering details like IP addresses, ports, protocols, and more.\u003c/p\u003e\n"],["\u003cp\u003eThe mapping of various fields has been updated and enhanced multiple times, including changes in \u003ccode\u003eprincipal\u003c/code\u003e and \u003ccode\u003etarget\u003c/code\u003e fields, as well as adding mappings for details about \u003ccode\u003egke\u003c/code\u003e and \u003ccode\u003eresources\u003c/code\u003e from \u003ccode\u003ejsonPayload\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Collect VPC Flow Logs\n=====================\n\nSupported in: \nGoogle secops [SIEM](/chronicle/docs/secops/google-secops-siem-toc)\n| **Note:** This feature is covered by [Pre-GA Offerings Terms](https://chronicle.security/legal/service-terms/) of the Google Security Operations Service Specific Terms. Pre-GA features might have limited support, and changes to pre-GA features might not be compatible with other pre-GA versions. For more information, see the [Google SecOps Technical Support Service guidelines](https://chronicle.security/legal/technical-support-services-guidelines/) and the [Google SecOps Service Specific Terms](https://chronicle.security/legal/service-terms/).\n\nThis document explains how to export VPC Flow Logs to Google Security Operations using Google Cloud. The parser transforms the logs from their built-in JSON format into the Google Security Operations UDM. It extracts relevant fields like source and destination IP, port, protocol, and bytes sent, then maps them to corresponding UDM fields, taking into account network direction and special cases for accurate representation in Google SecOps.\n\nBefore You Begin\n----------------\n\nEnsure that you have the following prerequisites:\n\n- Google SecOps instance.\n- VPC Flow is set up and active in your Google Cloud environment.\n- Privileged access to Google Cloud.\n\nCreate a Google Cloud Storage Bucket\n------------------------------------\n\n1. Sign in to the [Google Cloud console](https://console.cloud.google.com/).\n2. Go to the **Cloud Storage Buckets** page.\n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n3. Click **Create**.\n\n4. On the **Create a bucket** page, enter your bucket information. After each of the following steps, click **Continue** to proceed to the next step:\n\n 1. In the **Get started** section, do the following:\n\n 1. Enter a unique name that meets the bucket name requirements; for example, **vpcflow-logs**.\n 2. To enable hierarchical namespace, click the expander arrow to expand the **Optimize for file oriented and data-intensive workloads** section, and then select **Enable Hierarchical namespace on this bucket**.\n\n | **Note:** You cannot enable hierarchical namespace in an existing bucket.\n 3. To add a bucket label, click the expander arrow to expand the **Labels** section.\n\n 4. Click **Add label**, and specify a key and a value for your label.\n\n 2. In the **Choose where to store your data** section, do the following:\n\n 1. Select a **Location type**.\n 2. Use the location type menu to select a **Location** where object data within your bucket will be permanently stored.\n\n | **Note:** If you select the **dual-region** location type, you can also choose to enable **turbo replication** by using the relevant checkbox.\n 3. To set up cross-bucket replication, expand the **Set up cross-bucket replication** section.\n\n 3. In the **Choose a storage class for your data** section, either select a **default storage class** for the bucket, or select **Autoclass** for automatic storage class management of your bucket's data.\n\n 4. In the **Choose how to control access to objects** section, select **not** to enforce **public access prevention** , and select an **access control model** for your bucket's objects.\n\n | **Note:** If public access prevention is already enforced by your project's organization policy, the **Prevent public access** checkbox is locked.\n 5. In the Choose how to protect object data section, do the following:\n\n 1. Select any of the options under Data protection that you want to set for your bucket.\n 2. To choose how your object data will be encrypted, click the expander arrow labeled **Data encryption** , and select a **Data encryption method**.\n5. Click **Create**.\n\n| **Note:** Be sure to provide your Google SecOps Service Account with permissions to **Read** or **Read \\& Write** to the newly created bucket.\n\nConfigure Log Export in Google Cloud VPC Flow\n---------------------------------------------\n\n1. Sign in to **Google Cloud** account using your privileged account.\n2. On **Welcome** page, click **VPC Networks**.\n3. Click **Default** and a subnet page should appear.\n4. Select **all logs**.\n5. Click **Flow Logs \\\u003e Configure**.\n6. Select **Aggregation Interval** ; for example, **30 SEC**.\n7. Provide **Sample Rate** ; for example, **50%**.\n8. Click **Save**\n9. Search **Logging** in the search bar and click **Enter**.\n10. In **Log Explorer** , filter the logs by choosing **VPC_flows** in the **Log Name** and click **Apply**.\n11. Click **More Actions**.\n12. Click **Create Sink**.\n13. Provide the following configurations:\n 1. **Sink Details**: enter a name and description.\n 2. Click **Next**.\n 3. **Sink Destination** : select **Cloud Storage Bucket**.\n 4. **Cloud Storage Bucket**: select the bucket created earlier or create a new bucket.\n 5. Click **Next**.\n 6. **Choose Logs to include in Sink**: a default log is populated when you select an option in Cloud Storage Bucket.\n 7. Click **Next**.\n 8. Optional: **Choose Logs to filter out of Sink**: select the logs that you would like not to sink.\n14. Click **Create Sink**.\n\nSet up feeds\n------------\n\nThere are two different entry points to set up feeds in the\nGoogle SecOps platform:\n\n- **SIEM Settings \\\u003e Feeds \\\u003e Add New**\n- **Content Hub \\\u003e Content Packs \\\u003e Get Started**\n\nHow to set up the Google Cloud VPC Flow feed\n--------------------------------------------\n\n1. Click the **Google Cloud Compute platform** pack.\n2. Locate the **GCP VPC Flow Feed** logtype.\n3. Specify the values in the following fields.\n\n - **Source Type**: Amazon SQS V2\n - **Queue Name**: The SQS queue name to read from\n - **S3 URI** : The bucket URI.\n - `s3://your-log-bucket-name/`\n - Replace `your-log-bucket-name` with the actual name of your S3 bucket.\n - **Source deletion options**: Select the deletion option according to your ingestion preferences.\n\n | **Note:** If you select the `Delete transferred files` or `Delete transferred files and empty directories` option, make sure that you granted appropriate permissions to the service account.\n - **Maximum File Age**: Include files modified in the last number of days. Default is 180 days.\n\n - **SQS Queue Access Key ID**: An account access key that is a 20-character alphanumeric string.\n\n - **SQS Queue Secret Access Key**: An account access key that is a 40-character alphanumeric string.\n\n **Advanced options**\n - **Feed Name**: A prepopulated value that identifies the feed.\n - **Asset Namespace**: Namespace associated with the feed.\n - **Ingestion Labels**: Labels applied to all events from this feed.\n4. Click **Create feed**.\n\n| **Note:** The Content Hub is not available on the SIEM standalone platform. To upgrade, contact your Google SecOps representative.\n\nFor more information about configuring multiple feeds for different log types within this product family, see [Configure feeds by product](/chronicle/docs/ingestion/ingestion-entities/configure-multiple-feeds).\n\nSupported VPC Flow Logs log formats\n-----------------------------------\n\nThe VPC Flow Logs parser supports logs in JSON format.\n\nSupported VPC Flow Logs Sample Logs\n-----------------------------------\n\n- JSON\n\n {\n \"insertId\": \"1wjp1y9f8vc6y6\",\n \"jsonPayload\": {\n \"bytes_sent\": \"0\",\n \"connection\": {\n \"dest_ip\": \"198.51.100.0\",\n \"dest_port\": 32846,\n \"protocol\": 6,\n \"src_ip\": \"198.51.100.1\",\n \"src_port\": 443\n },\n \"dest_instance\": {\n \"project_id\": \"logging-259109\",\n \"region\": \"us-west2\",\n \"vm_name\": \"demisto-01\",\n \"zone\": \"us-west2-a\"\n },\n \"dest_vpc\": {\n \"project_id\": \"logging-259109\",\n \"subnetwork_name\": \"default\",\n \"vpc_name\": \"default\"\n },\n \"end_time\": \"2020-03-28T10:44:41.896734136Z\",\n \"packets_sent\": \"2\",\n \"reporter\": \"DEST\",\n \"start_time\": \"2020-03-28T10:44:41.896734136Z\"\n },\n \"logName\": \"projects/logging-259109/logs/compute.googleapis.com%2Fvpc_flows\",\n \"receiveTimestamp\": \"2020-03-28T10:44:50.112903743Z\",\n \"resource\": {\n \"labels\": {\n \"location\": \"us-west2-a\",\n \"project_id\": \"dummy_project_id\",\n \"subnetwork_id\": \"subnetwork_id\",\n \"subnetwork_name\": \"default\"\n },\n \"type\": \"gce_subnetwork\"\n },\n \"timestamp\": \"2020-03-28T10:44:50.112903743Z\"\n }\n\nUDM Mapping Table\n-----------------\n\n**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/google-security-operations-2)"]]