收集 Palo Alto Networks Traps 記錄

支援的服務:

本文說明如何使用 Bindplane,將 Palo Alto Networks Traps 記錄收集到 Google Security Operations。剖析器會處理 CSV 和鍵/值格式的記錄,並轉換為 UDM。這個剖析器會使用 grok 和 CSV 剖析功能擷取欄位,並根據特定記錄訊息或欄位值執行條件邏輯,對應至 UDM 欄位,以及處理各種事件類型,例如狀態更新、網路掃描和程序建立。

事前準備

  • 確認您有 Google Security Operations 執行個體。
  • 確認您使用的是 Windows 2016 以上版本,或搭載 systemd 的 Linux 主機。
  • 如果是在 Proxy 後方執行,請確認防火牆通訊埠已開啟。
  • 確認您具備 Cortex XDR 的特殊權限。

取得 Bindplane 代理程式的 Google SecOps 憑證

如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
  1. 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往「IAM & Admin」>「Service Accounts」。
  3. 按一下「建立服務帳戶」。
  4. 提供下列設定詳細資料:
    • 「服務帳戶名稱」:輸入帳戶名稱 (例如 bindplane-ingest)。
    • 「Service account description」(服務帳戶說明):輸入說明 (例如 Bindplane agent log ingestion)。
  5. 點按「Create and continue」(建立並繼續)。
  6. 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
  7. 依序點選「繼續」和「完成」。
  8. 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
  9. 依序點選「新增金鑰」>「建立新的金鑰」。
  10. 選取「JSON」,然後點選「建立」。金鑰檔案會下載到您的電腦。
  11. 將金鑰檔案儲存為 Bindplane 收集器目錄中的 ingestion-auth.json (Linux 上的 /opt/observiq-otel-collector/ingestion-auth.json 或 Windows 上的 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新 config.yaml 中的 creds_file_path,使其與儲存路徑相符。
  12. 依序前往「IAM 與管理」>「設定」,然後複製「專案編號」。設定匯出工具時會用到。

方法 2:下載擷取驗證檔案 (舊版)

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「資料管理」>「收集代理程式」。如果使用的是僅限 SIEM 的平台,請依序前往「Settings」>「Collection Agents」。
  3. 下載擷取驗證檔案。
  4. 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「設定」>「管理」>「設定檔」。如果使用的是僅限 SIEM 的平台,請依序前往「設定」>「設定檔」。
  3. 複製並儲存「機構詳細資料」部分的客戶 ID。

安裝 Bindplane 代理程式

Windows 安裝

  1. 以管理員身分開啟命令提示字元或 PowerShell。
  2. 執行下列指令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安裝

  1. 開啟具有 root 或 sudo 權限的終端機。
  2. 執行下列指令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安裝資源

設定 Bindplane 代理程式,擷取系統記錄並傳送至 Google SecOps

  1. 存取設定檔:

    1. 找出 config.yaml 檔案。通常位於 Linux 的 /opt/observiq-otel-collector/ 目錄,或 Windows 的安裝目錄。
    2. 使用文字編輯器 (例如 nano、vi 或記事本) 開啟檔案。
  2. 按照下列方式編輯 config.yaml 檔案:

    receivers:
        udplog:
            # Replace the port and IP address as required
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/chronicle_w_labels:
            protocol: https
            # Region of your instance, for example us, europe, asia-southeast1
            location: <LOCATION>
            # Project number of the Google Cloud project linked to the instance
            project: '<PROJECT_NUMBER>'
            compression: gzip
            # Adjust the path to the credentials file you downloaded in Step 1
            creds: '/path/to/ingestion-authentication-file.json'
            # Replace with your actual customer ID from Step 2
            customer_id: <customer_id>
            endpoint: chronicle.googleapis.com
            # Add optional ingestion labels for better organization
            ingestion_labels:
                log_type: PAN_EDR
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 請根據基礎架構需求,替換通訊埠和 IP 位址。

  4. 將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會在這個值前面加上 chronicle.googleapis.com。

  5. 將 <PROJECT_NUMBER> 替換為「IAM 與管理」>「設定」中的專案編號。

  6. 將 <customer_id> 替換為實際的客戶 ID。

  7. 將 /path/to/ingestion-authentication-file.json 更新為服務帳戶金鑰檔案 (選項 1) 的儲存路徑,如「取得 Bindplane 代理程式的 Google SecOps 憑證」一節所述。

舊版 Ingestion API 匯出工具

  • 如果使用選項 2 的擷取驗證檔案,請將 exporters 區塊替換為下列內容。將 creds 設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將 malachiteingestion-pa.googleapis.com 替換為區域端點 (例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the path to the credentials file you downloaded in Step 1
            creds: '/path/to/ingestion-authentication-file.json'
            # Replace with your actual customer ID from Step 2
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # Add optional ingestion labels for better organization
            ingestion_labels:
                log_type: PAN_EDR
                raw_log_field: body
    

重新啟動 Bindplane 代理程式,套用變更

  • 如要在 Linux 重新啟動 Bindplane 代理程式,請執行下列指令:

    sudo systemctl restart bindplane-agent
    
  • 如要在 Windows 中重新啟動 Bindplane 代理程式,可以使用「Services」(服務) 控制台,或輸入下列指令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

設定 Palo Alto Networks Traps

  1. 登入 Cortex XDR ESM 控制台。
  2. 依序選取「Settings」>「ESM」>「Syslog」。
  3. 勾選「啟用系統記錄」核取方塊。
  4. 提供下列設定詳細資料:
    • Syslog 伺服器:輸入 Bindplane 代理程式的 IP 位址。
    • Syslog 通訊埠:輸入在 Bindplane 設定的通訊埠編號,例如 514。
    • Syslog protocol (Syslog 通訊協定):選取「CEF」。
    • 將「Keep-alive timeout」(keep-alive 逾時) 設為 0。
    • 「通訊協定」:選取「UDP」。
  5. 在「Security events」(安全性事件) 部分,勾選下列核取方塊:
    • 預防事件
    • 通知事件
    • 偵測到郵件事件
  6. 依序點選「檢查連線」>「儲存」。

UDM 對應表

記錄欄位 UDM 對應 邏輯
agentId event.idm.read_only_udm.additional.fields.value.string_value 原始記錄中的 agentId 值會對應至 additional.fields 下方巢狀結構中的 string_value 欄位。這個欄位的 key 設為 Agent ID。
agentIp event.idm.read_only_udm.target.ip 原始記錄中的 agentIp 值會對應至 target.ip 欄位。
cat event.idm.read_only_udm.security_result.rule_name 原始記錄中的 cat 值會對應至 security_result.rule_name 欄位。
class event.idm.read_only_udm.security_result.category_details 與 subClass 搭配使用,以 class: subClass 格式填入 security_result.category_details。
cs1 event.idm.read_only_udm.principal.application、event.idm.read_only_udm.principal.user.email_addresses 如果 cs1Label 為 email,且 cs1 是有效的電子郵件地址,則會對應至 principal.user.email_addresses。如果 cs1Label 為 Initiated by,則會對應至 principal.application。
cs2 event.idm.read_only_udm.principal.process.command_line、event.idm.read_only_udm.security_result.description 如果 cs2Label 為 subtype,則會對應至 security_result.description。如果 cs2Label 為 Initiator CMD,則會對應至 principal.process.command_line。
cs3 event.idm.read_only_udm.security_result.action_details 如果 cs3Label 為 result,則會對應至 security_result.action_details。
customerId event.idm.read_only_udm.additional.fields.value.string_value 原始記錄中的 customerId 值會對應至 additional.fields 下方巢狀結構中的 string_value 欄位。這個欄位的 key 設為 Customer ID。
date_time event.idm.read_only_udm.metadata.event_timestamp.seconds 剖析並轉換為時間戳記,然後對應至 metadata.event_timestamp.seconds。
desc event.idm.read_only_udm.metadata.description 原始記錄中的 desc 值會對應至 metadata.description 欄位。
deviceName event.idm.read_only_udm.target.hostname 原始記錄中的 deviceName 值會對應至 target.hostname 欄位。
email_receiver event.idm.read_only_udm.network.email.to 如果 msg 欄位包含電子郵件地址,則從該欄位擷取並對應至 network.email.to。
endpoint_desc event.idm.read_only_udm.target.resource.attribute.labels.value 衍生自 isEndpoint:如果 isEndpoint 為 1,則為 Yes, host is an endpoint.;如果 isEndpoint 為 0,則為 No, host is not an endpoint。key 設為 Is Endpoint。
eventType event.idm.read_only_udm.metadata.product_event_type、event.idm.read_only_udm.metadata.event_type 原始記錄中的 eventType 值會對應至 metadata.product_event_type 欄位。也用於根據其值衍生 metadata.event_type (例如,Management Audit Logs 產生 EMAIL_TRANSACTION,XDR Analytics BIOC 或 Behavioral Threat 產生 SCAN_NETWORK)。
facility event.idm.read_only_udm.additional.fields.value.string_value 原始記錄中的 facility 值會對應至 additional.fields 下方巢狀結構中的 string_value 欄位。這個欄位的 key 設為 Facility。
fileHash event.idm.read_only_udm.principal.process.file.sha256 原始記錄中的 fileHash 值會轉換為小寫,並對應至 principal.process.file.sha256 欄位。
filePath event.idm.read_only_udm.principal.process.file.full_path 原始記錄中的 filePath 值會對應至 principal.process.file.full_path 欄位。
friendlyName event.idm.read_only_udm.metadata.description 原始記錄中的 friendlyName 值會對應至 metadata.description 欄位。
interm_ip event.idm.read_only_udm.intermediary.ip 原始記錄中的 interm_ip 值會對應至 intermediary.ip 欄位。
isEndpoint event.idm.read_only_udm.target.resource.attribute.labels.value 用於衍生 target.resource.attribute.labels.value。
isVdi event.idm.read_only_udm.target.resource.resource_type 如果 isVdi 為 1,target.resource.resource_type 會設為 VIRTUAL_MACHINE。
msg event.idm.read_only_udm.security_result.summary 原始記錄中的 msg 值會對應至 security_result.summary 欄位。也用於擷取 email_receiver。
msgTextEn event.idm.read_only_udm.security_result.description 原始記錄中的 msgTextEn 值會對應至 security_result.description 欄位。
osType event.idm.read_only_udm.target.platform、event.idm.read_only_udm.target.resource.attribute.labels.value 如果 osType 為 1,target.platform 會設為 WINDOWS。如果 osType 為 2,target.platform 會設為 MAC。如果 osType 為 4,target.platform 會設為 LINUX。如果 osType 為 3,其值會對應至 target.resource.attribute.labels.value,並使用 key OS。
osVersion event.idm.read_only_udm.target.platform_version 原始記錄中的 osVersion 值會對應至 target.platform_version 欄位。
product_version event.idm.read_only_udm.metadata.product_version 原始記錄中的 product_version 值會對應至 metadata.product_version 欄位。
proto event.idm.read_only_udm.network.ip_protocol 如果 proto 為 udp,network.ip_protocol 會設為 UDP。
recordType event.idm.read_only_udm.additional.fields.value.string_value 原始記錄中的 recordType 值會對應至 additional.fields 下方巢狀結構中的 string_value 欄位。這個欄位的 key 設為 Record Type。
regionId event.idm.read_only_udm.principal.location.country_or_region 如果 regionId 為 10,principal.location.country_or_region 會設為 Americas (N. Virginia)。如果 regionId 為 70,principal.location.country_or_region 會設為 EMEA (Frankfurt)。
request event.idm.read_only_udm.target.url 原始記錄中的 request 值會對應至 target.url 欄位。
sec_category_details event.idm.read_only_udm.security_result.category_details 原始記錄中的 sec_category_details 值會對應至 security_result.category_details 欄位。
sec_desc event.idm.read_only_udm.security_result.description 原始記錄中的 sec_desc 值會對應至 security_result.description 欄位。
serverHost event.idm.read_only_udm.principal.hostname 原始記錄中的 serverHost 值會對應至 principal.hostname 欄位。
severity event.idm.read_only_udm.security_result.severity 使用下列邏輯對應至 security_result.severity:2 -> CRITICAL、3 -> ERROR、4 -> MEDIUM、5 -> LOW、6 -> INFORMATIONAL。
severity_val event.idm.read_only_udm.security_result.severity、event.idm.read_only_udm.security_result.severity_details 如果 severity_val 為 0,security_result.severity_details 會設為 UNKNOWN_SEVERITY。否則,系統會根據下列邏輯對應至 security_result.severity:6 -> LOW、8 -> MEDIUM、9 -> HIGH。
shost event.idm.read_only_udm.principal.hostname 原始記錄中的 shost 值會對應至 principal.hostname 欄位。
src_ip event.idm.read_only_udm.principal.ip 原始記錄中的 src_ip 值會對應至 principal.ip 欄位。
subClass event.idm.read_only_udm.security_result.category_details 與 class 搭配使用,填入 security_result.category_details。
suser event.idm.read_only_udm.principal.user.user_display_name 原始記錄中 suser 的值會對應至 principal.user.user_display_name 欄位,並移除括號、反斜線和單引號。
targetprocesscmd event.idm.read_only_udm.target.process.command_line 原始記錄中的 targetprocesscmd 值會對應至 target.process.command_line 欄位。
targetprocessname event.idm.read_only_udm.target.application 原始記錄中的 targetprocessname 值會對應至 target.application 欄位。
targetprocesssha256 event.idm.read_only_udm.target.process.file.sha256 原始記錄中的 targetprocesssha256 值會轉換為小寫,並對應至 target.process.file.sha256 欄位。
tenantname event.idm.read_only_udm.target.resource.attribute.labels.value 原始記錄中的 tenantname 值會對應至 target.resource.attribute.labels 下方巢狀結構中的 value 欄位。這個欄位的 key 設為 Tenant name。
event.idm.read_only_udm.metadata.event_type 預設為 STATUS_UPDATE。如果 eventType 為 Management Audit Logs,則變更為 EMAIL_TRANSACTION。如果 eventType 為 XDR Analytics BIOC 或 Behavioral Threat,或 desc 為 Behavioral Threat,則變更為 SCAN_NETWORK。如果 desc 為 Suspicious Process Creation,則變更為 SCAN_PROCESS。請設為 Palo Alto Networks。請設為 Cortex XDR。請設為 PAN_EDR。如果 eventType 為 XDR Analytics BIOC 或 Behavioral Threat,或 desc 為 Behavioral Threat,請設為 NETWORK_SUSPICIOUS。

變更記錄

查看這個剖析器的變更記錄

還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。