收集 Palo Alto Networks Traps 日志

支持范围:

本文档介绍了如何使用 Bindplane 将 Palo Alto Networks Traps 日志收集到 Google Security Operations。该解析器可处理 CSV 和键值对格式的日志,并将其转换为 UDM。它使用 grok 和 CSV 解析来提取字段,根据特定日志消息或字段值执行条件逻辑以映射到 UDM 字段,并处理各种事件类型,例如状态更新、网络扫描和进程创建。

准备工作

  • 确保您有一个 Google Security Operations 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者使用 systemd 的 Linux 主机。
  • 如果在代理后运行,请确保防火墙端口处于打开状态。
  • 确保您拥有对 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 和管理 > 服务账号。
  3. 点击创建服务账号。
  4. 提供以下配置详细信息:
    • 服务账号名称:输入账号的名称(例如 bindplane-ingest)。
    • 服务账号说明:输入说明(例如 Bindplane agent log ingestion)。
  5. 点击创建并继续。
  6. 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
  7. 点击继续,然后点击完成。
  8. 点击您创建的服务账号,然后前往密钥标签页。
  9. 依次点击添加密钥 > 创建新密钥。
  10. 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
  11. 将密钥文件另存为 Bindplane 收集器目录(Linux 上的 /opt/observiq-otel-collector/ingestion-auth.json 或 Windows 上的 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的 ingestion-auth.json,或更新 config.yaml 中的 creds_file_path 以匹配您保存它的路径。
  12. 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。

方法 2:下载数据注入身份验证文件(旧版)

  1. 登录 Google SecOps 控制台。
  2. 依次前往设置 > 数据管理 > 收集代理。如果您使用的是仅限 SIEM 的平台,请依次前往设置 > 收集代理。
  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 代理以注入 Syslog 并发送到 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 更新为获取 Bindplane 代理的 Google SecOps 凭证部分中保存服务账号密钥文件(选项 1)的路径。

旧版提取 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 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

配置 Palo Alto Networks Traps

  1. 登录 Cortex XDR ESM 控制台。
  2. 依次选择设置 > ESM > Syslog。
  3. 选中启用 syslog 复选框。
  4. 提供以下配置详细信息:
    • Syslog 服务器:输入 Bindplane 代理的 IP 地址。
    • Syslog 端口:输入在 Bindplane 中配置的端口号,例如 514。
    • Syslog 协议:选择 CEF。
    • 将保持连接超时设置为 0。
    • 通信协议:选择 UDP。
  5. 在安全性事件部分,选中以下复选框:
    • 预防事件
    • 通知事件
    • 检测后事件
  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,则其值会通过 key OS 映射到 target.resource.attribute.labels.value。
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 专业人士的解答。