使用 VMware Engine 配置 Google 安全运营

本文档介绍了如何配置 Google Security Operations (Google SecOps),以便更好地检测、调查和响应 VMware Engine 上运行的虚拟机 (VM) 的网络安全威胁。此外,Google SecOps 还可以分析来自 VMware 基础架构和其他受支持服务的遥测数据。 Google Cloud

概览

Google SecOps 是一种云服务,作为 Google 基础架构之上的专用层构建,旨在让企业以私密方式保留、分析和搜索它们生成的大量安全和网络遥测数据。Google SecOps 对数据进行归一化、编入索引、关联和分析,以提供有关有风险或可疑活动的即时分析和背景信息。

Google SecOps 的数据提取机制

Google SecOps 提供了多种数据注入途径,如 Google SecOps 提取文档中所详述。本指南中的配置示例重点介绍了代表性架构中的以下关键集成点:

  • 虚拟机和工作负载系统日志:为了捕获来自虚拟机和工作负载的日志,存在多种架构模式。本指南中的配置示例使用直接部署在这些虚拟机中的 OpenTelemetry BindPlane 代理。此方法提供了一种灵活且标准化的方式来收集和转发系统日志。

  • Google Cloud 日志:除了虚拟化环境之外,大多数客户项目还使用一系列 Google Cloud 服务(在本特定上下文中,不包括 VMware Engine)。为了全面了解威胁检测情况,您可以将这些受支持服务的日志引入 Google SecOps。以下配置示例采用了直接提取机制,配置了 Cloud Logging 过滤条件以选择性地路由相关日志数据。

使用 VMware Engine 配置 Google 安全运营

如需使用 VMware Engine 配置 Google 安全运营中心,请完成以下步骤:

  1. 转发工作负载系统日志
  2. 创建自定义规则
  3. 转发 Google Cloud 云日志

转发工作负载系统日志

如需将 VMware Engine 中运行的虚拟机的工作负载系统日志转发到 Google SecOps,您可以使用在工作负载中运行的 OpenTelemetry 收集代理。相关步骤如下:

  1. 请按照 Before you begin 中的说明安装代理并下载 Google SecOps 提取身份验证文件。您可以从 Google SecOps 门户下载 Google SecOps 身份验证文件。
  2. 验证防火墙配置,确保相关防火墙端口处于打开状态。
  3. 按照适用于您的操作系统(LinuxWindows)的说明安装 Bindplane 代理。
  4. 完成配置代理的步骤。完成这些步骤时,请注意以下详细信息:

    • 接收器部分指定了代理应收集哪些日志并将其发送到 Google SecOps。
    • Exporter 部分指定代理应将日志发送到的目标位置。
    • 此任务使用 Google SecOps 导出器,该导出器会将日志直接发送到 Google SecOps 提取 API。
  5. 如需查看可用的示例配置文件,请参阅其他日志收集配置示例。以下是收集 Windows 事件日志(应用、安全和系统)并将其发送到 Google SecOps 的具体示例。它使用 OpenTelemetry 收集器配置格式:

    receivers:
    windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_application:
        attributes:
           log_type: windows_event.application
        channel: application
        max_reads: 100
        poll_interval: 1s
        raw: true
        start_at: end
    windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_security:
        attributes:
           log_type: windows_event.security
        channel: security
        max_reads: 100
        poll_interval: 1s
        raw: true
        start_at: end
    windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_system:
        attributes:
           log_type: windows_event.system
        channel: system
        max_reads: 100
        poll_interval: 1s
        raw: true
        start_at: end
    processors:
    resourcedetection/source0_01HZ7NFAB5HZY6TPMGEYRN4XGZ:
        detectors:
            -   system
        system:
            hostname_sources:
                 -   os
    transform/source001HZ7NFAB5HZY6TPMGEYRN4XGZprocessor0_logs:
        error_mode: ignore
        log_statements:
            -   context: log
              statements:
                  -   set(attributes["chronicle_log_type"], "WINEVTLOG") where true
    exporters:
    chronicle/NA-SDL:
        compression: none
        creds: '{  "type": "service_account",
            "project_id": "malachite-previewamericassdl",
            "private_key_id": "a9c8d8f0b081c09bcf92621804ba19fc6529ecce",
            "private_key": "----BEGIN PRIVATE KEY-----abcdefg-----END PRIVATE KEY-----\n",
            "client_email": "previewamericassdl-1710772997@malachite-previewamericassdl.iam.gserviceaccount.com",
            "client_id": "114604545528934473681",
            "auth_uri": "https://accounts.google.com/o/oauth2/auth",
            "token_uri": "https://oauth2.googleapis.com/token",
            "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
            "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/previewamericassdl-1710772997%40malachite-previewamericassdl.iam.gserviceaccount.com",
            "universe_domain": "googleapis.com" }'
        customer_id: a556547c-1cff-43ef-a2e4-cf5b12a865df
        endpoint: malachiteingestion-pa.googleapis.com
        ingestion_labels:
            env: takeshi
        log_type: CATCH_ALL
        namespace: null
        raw_log_field: body
        retry_on_failure:
            enabled: true
            initial_interval: 5s
            max_elapsed_time: 300s
            max_interval: 30s
        sending_queue:
            enabled: true
            num_consumers: 10
            queue_size: 5000
            storage: file_storage/NA-SDL
    extensions:
    file_storage/NA-SDL:
        compaction:
            directory: $OIQ_OTEL_COLLECTOR_HOME/storage
            on_rebound: true
        directory: $OIQ_OTEL_COLLECTOR_HOME/storage
    service:
    extensions:
        -   file_storage/NA-SDL
    pipelines:
        logs/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_NA-SDL-0:
            receivers:
                -   windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_application
                -   windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_security
                -   windowseventlog/source001HZ7NFAB5HZY6TPMGEYRN4XGZ_system
            processors:
                -   resourcedetection/source0_01HZ7NFAB5HZY6TPMGEYRN4XGZ
                -   transform/source001HZ7NFAB5HZY6TPMGEYRN4XGZprocessor0_logs
            exporters:
                -   chronicle/NA-SDL

  6. 配置完成后,重启收集器,并验证 Google SecOps 信息中心中是否填充了日志。

为威胁检测创建自定义规则

Google SecOps 提供经过精心挑选的默认规则和检测功能,旨在有效识别网络安全威胁。除了默认功能之外,您还可以创建自定义规则,以生成针对特定环境及其安全问题量身定制的提醒。为了实现更精细的威胁检测,Google SecOps 支持使用多个事件规则。这样,您就可以跟踪和关联一段时间内的相关安全事件,从而更轻松地识别可能不易从孤立事件中发现的复杂攻击模式。

转发 Google Cloud Cloud 日志

如需配置使用直接提取功能将数据提取到 Google SecOps,请执行以下操作: Google Cloud

  1. 按照将数据 Google Cloud 提取到 Google SecOps 中的步骤设置日志。
  2. 在 Cloud Logging 的全局注入设置标签页下,启用注入和分析数据
  3. 查看支持的 Google Cloud 日志提取服务列表,以确定对您的安全监控需求最为重要的服务。 Google Cloud 请参阅导出 gcp_name 日志
  4. 导出过滤条件设置标签页下,根据需要修改默认导出过滤条件,以包含您需要的特定日志。以下示例是用于此文档的导出过滤条件的副本:
    log_id("dns.googleapis.com/dns_queries") OR log_id("cloudaudit.googleapis.com/activity") OR log_id("cloudaudit.googleapis.com/system_event") OR
    ( log_id("cloudaudit.googleapis.com/data_access")
    AND NOT protoPayload.methodName =~ "^storage.(buckets|objects).(get|list)$"
    AND NOT protoPayload.request.cmd = "select" ) OR
    log_id("cloudaudit.googleapis.com/policy") OR
    log_id("cloudaudit.googleapis.com/access_transparency") OR
    log_id("compute.googleapis.com/nat_flows") OR
    log_id("compute.googleapis.com/firewall") OR
    log_id("requests") OR
    logName =~ "^projects/[\w-]+/logs/syslog$" OR
    logName =~ "^projects/[\w-]+/logs/authlog$" OR
    log_id("securelog") OR
    log_id("sysmon.raw") OR
    logName =~ "^projects/[\w-]+/logs/windows_event_log$" OR
    log_id("windows_event_log") OR
    log_id("events") OR
    log_id("stdout") OR
    log_id("stderr") OR
    log_id("audit_log") OR
    log_id("recaptchaenterprise.googleapis.com/assessment") OR
    log_id("recaptchaenterprise.googleapis.com/annotation") OR
    log_id("cloudaudit.googleapis.com/activity")

后续步骤