使用 VMware Engine 設定 Google Security Operations

本文說明如何設定 Google Security Operations (Google SecOps),以便針對在 VMware Engine 上執行的虛擬機器 (VM) 改善對網路安全威脅的偵測、調查和回應機制。此外,Google SecOps 還可分析 VMware 基礎架構和其他支援 Google Cloud 服務的遙測資料。

總覽

Google SecOps 是一種雲端服務,是 Google 基礎架構上建立的專屬層,可讓企業私下保留、分析及搜尋大量安全性和網路遙測資料。Google SecOps 會將資料標準化、建立索引、建立關聯並分析資料,以便即時分析及掌握有風險或可疑活動的情況。

Google SecOps 的資料擷取機制

Google SecOps 提供多種資料攝入途徑,詳情請參閱 Google SecOps 攝入說明文件。本指南的設定範例著重於代表性架構中的下列重要整合點:

  • VM 和工作負載系統記錄檔:為了擷取 VM 和工作負載產生的記錄,我們提供多種架構模式。本指南中的設定範例使用直接部署在這些虛擬機器中的 OpenTelemetry BindPlane 代理程式。這個方法提供彈性且標準化的收集和轉送系統記錄方式。

  • Google Cloud 記錄:除了虛擬化環境之外,大多數客戶專案都會使用一系列 Google Cloud 服務 (不包括此特定情境中的 VMware Engine)。為了全面掌握威脅偵測情況,您可以將這些支援服務的記錄傳送至 Google SecOps。以下設定範例採用直接攝入機制,設定 Cloud Logging 篩選器,以便有選擇地轉送相關記錄資料。

使用 VMware Engine 設定 Google Security Operations

如要使用 VMware Engine 設定 Google 安全作業,請完成下列步驟:

  1. 轉送工作負載系統記錄
  2. 建立自訂規則
  3. 轉送 Google Cloud 雲端記錄

轉送工作負載系統記錄

如要將 VMware Engine 中執行的 VM 工作負載系統記錄轉送至 Google SecOps,您可以使用在工作負載中執行的 OpenTelemetry 收集代理程式。相關步驟如下:

  1. 請按照 Bindplane 代理程式開始前的說明安裝代理程式,並下載 Google SecOps 擷取驗證檔案。您可以從 Google SecOps 入口網站下載 Google SecOps 驗證檔案。
  2. 確認防火牆設定,確保相關防火牆通訊埠已開啟。
  3. 依照適用於您作業系統的操作說明 (LinuxWindows) 安裝 Bindplane 代理程式。
  4. 完成設定代理程式的步驟。完成這些步驟時,請注意下列細節:

    • 「Receiver」 區段會指定代理程式應收集哪些記錄,並將這些記錄傳送至 Google SecOps。
    • 「Exporter」部分會指定代理程式應傳送記錄的目的地。
    • 這項工作會使用 Google SecOps 匯出工具,直接將記錄傳送至 Google SecOps 擷取 API。
  5. 如要瞭解可用的設定檔範例,請參閱其他記錄收集設定範例。以下是收集 Windows 事件記錄 (應用程式、安全性和系統) 並傳送至 Google SecOps 的具體範例。它採用 OpenTelemetry Collector 設定格式:

    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 雲端記錄

如要使用直接擷取功能,將 Google Cloud 資料擷取到 Google SecOps,請按照下列步驟操作:

  1. 請按照「將資料匯入 Google Cloud Google SecOps」一文中的步驟設定記錄檔。
  2. 在「全球擷取設定」分頁中,啟用 Cloud Logging 的擷取和分析資料功能。
  3. 請查看支援的 Google Cloud 記錄擷取服務清單,找出最符合安全監控需求的 Google Cloud 服務。請參閱「匯出 gcp_name 記錄」。
  4. 在「Export Filter Settings」分頁中,視需要修改預設匯出篩選器,加入所需的特定記錄。以下範例是本文件所用的匯出篩選器:
    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")

後續步驟