收集 Palo Alto Prisma Cloud 提醒日志

支持的平台:

概览

此解析器会以 JSON 格式从 Palo Alto Prisma Cloud 中提取提醒日志,并将其转换为 UDM。解析器会执行数据标准化、类型转换和条件逻辑,以填充适当的 UDM 字段。它还会处理日志数据中的嵌套 JSON 结构和数组,以提取相关信息。

准备工作

  • 确保您拥有 Google SecOps 实例。
  • 确保您拥有对 Palo Alto Prisma Cloud 的特权访问权限。

在 Google SecOps 中配置 Feed 以提取 Palo Alto Prisma Cloud 提醒

  1. 依次前往 SIEM 设置 > Feed
  2. 点击新增
  3. Feed 名称字段中,输入 Feed 的名称(例如 PAN Prisma Cloud Alerts)。
  4. 选择 Webhook 作为来源类型
  5. 选择 Palo Alto Prisma Cloud Alerts 载荷作为日志类型
  6. 点击下一步
  7. 可选:为以下输入参数指定值:
    • 分隔符:用于分隔日志行(例如 \n)的分隔符。
    • 资源命名空间资源命名空间
    • 提取标签:应用于此 Feed 中的事件的标签。
  8. 点击下一步
  9. 最终确定界面中查看 Feed 配置,然后点击提交
  10. 点击生成 Secret 密钥,生成用于对此 Feed 进行身份验证的 Secret 密钥。
  11. 复制并存储密钥。您将无法再查看此密钥。如有必要,您可以重新生成新的 Secret 密钥,但此操作会使之前的 Secret 密钥过时。
  12. 详情标签页中,从端点信息字段复制 Feed 端点网址。您需要在客户端应用中指定此端点网址。
  13. 点击完成

为该 Webhook Feed 创建 API 密钥

  1. 依次前往 Google Cloud 控制台 > 凭据

    转到“凭据”页面

  2. 点击创建凭据,然后选择 API 密钥

  3. 限制 API 密钥对 Google Security Operations API 的访问权限。

指定端点网址

  1. 在客户端应用中,指定 webhook Feed 中提供的 HTTPS 端点网址。
  2. 通过在自定义标头中指定 API 密钥和密钥(格式如下)来启用身份验证:

    X-goog-api-key = API_KEY
    X-Webhook-Access-Key = SECRET
    

    建议:将 API 密钥作为标头指定,而不是在网址中指定。

  3. 如果您的 webhook 客户端不支持自定义标头,您可以使用以下格式的查询参数指定 API 密钥和密钥:

    ENDPOINT_URL?key=API_KEY&secret=SECRET
    

    替换以下内容:

    • ENDPOINT_URL:Feed 端点网址。
    • API_KEY:用于对 Google Security Operations 进行身份验证的 API 密钥。
    • SECRET:您为对 Feed 进行身份验证而生成的密钥。

将 Palo Alto Prisma Cloud Webhook 配置为发送到 Google SecOps

  1. 登录 Palo Alto Prisma Cloud。
  2. 依次选择设置 > 集成和通知 ((and_then)) 集成
  3. 点击添加集成
  4. 选择 Webhook
  5. 为以下输入参数指定值:
    • 集成名称:提供具有描述性的唯一名称(例如 Google SecOps
    • Webhook 网址:输入 ENDPOINT_网址。
    • 可选:提供集成的说明
    • 可选:启用自定义载荷 > 点击下一步以查看或修改自定义载荷。
  6. 点击下一步
  7. 测试保存对接

配置 Palo Alto Prisma Cloud 提醒

  1. 在 Palo Alto Prisma Cloud 控制台中,依次选择 Alerts > View Alert Rules
  2. 选择要修改的现有提醒规则。
  3. 可选:Cloud Infrastructure 创建新提醒。
  4. 可选:云工作负载创建新提醒
  5. 前往配置通知
  6. 选择 Webhook
  7. 可选:选择您希望通过哪些渠道接收由提醒规则触发的提醒通知。
  8. 点击下一步
  9. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
accountId target.resource.id 原始日志中的 accountId 值。
accountId target.resource.product_object_id 原始日志中的 accountId 值。这会替换已废弃的 resource.id 字段。
alertId security_result.detection_fields[].key 键设置为“alert id”。
alertId security_result.detection_fields[].value 原始日志中的 alertId 值。
alertRuleId security_result.rule_id 原始日志中的 alertRuleId 值。
alertRuleName security_result.rule_name 原始日志中的 alertRuleName 值。
alertStatus security_result.detection_fields[].key 该键设置为“alert status”。
alertStatus security_result.detection_fields[].value 原始日志中的 alertStatus 值。
alertTs security_result.detection_fields[].key 键设置为“alertTs”。
alertTs security_result.detection_fields[].value 原始日志中的 alertTs 值,已转换为字符串。
callbackUrl metadata.url_back_to_product 原始日志中的 callbackUrl 值。
cloudType principal.cloud.environment 如果 cloudType 为“gcp”(不区分大小写),则值设为“GOOGLE_CLOUD_PLATFORM”。
complianceMetadata[].complianceId security_result.detection_fields[].key 键设置为“complianceId”。
complianceMetadata[].complianceId security_result.detection_fields[].value 原始日志中的 complianceMetadata[].complianceId 值。
complianceMetadata[].customAssigned security_result.detection_fields[].key 键设置为“customAssigned”。
complianceMetadata[].customAssigned security_result.detection_fields[].value 原始日志中的 complianceMetadata[].customAssigned 值,已转换为字符串。
complianceMetadata[].policyId security_result.detection_fields[].key 键设置为“政策 ID”。
complianceMetadata[].policyId security_result.detection_fields[].value 原始日志中的 complianceMetadata[].policyId 值。
complianceMetadata[].requirementId security_result.rule_id 原始日志中的 complianceMetadata[].requirementId 值。
complianceMetadata[].requirementName security_result.summary 原始日志中的 complianceMetadata[].requirementName 值。
complianceMetadata[].requirementViewOrder security_result.detection_fields[].key 键设置为“requirementViewOrder”。
complianceMetadata[].requirementViewOrder security_result.detection_fields[].value 原始日志中的 complianceMetadata[].requirementViewOrder 值,已转换为字符串。
complianceMetadata[].sectionDescription security_result.detection_fields[].key 键设置为“sectionDescription”。
complianceMetadata[].sectionDescription security_result.detection_fields[].value 原始日志中的 complianceMetadata[].sectionDescription 值。
complianceMetadata[].sectionId security_result.detection_fields[].key 键设置为“sectionId”。
complianceMetadata[].sectionId security_result.detection_fields[].value 原始日志中的 complianceMetadata[].sectionId 值。
complianceMetadata[].sectionLabel security_result.detection_fields[].key 键设置为“sectionLabel”。
complianceMetadata[].sectionLabel security_result.detection_fields[].value 原始日志中的 complianceMetadata[].sectionLabel 值。
complianceMetadata[].sectionViewOrder security_result.detection_fields[].key 键设置为“sectionViewOrder”。
complianceMetadata[].sectionViewOrder security_result.detection_fields[].value 原始日志中的 complianceMetadata[].sectionViewOrder 值,已转换为字符串。
complianceMetadata[].standardDescription security_result.detection_fields[].key 键设置为“standardDescription”。
complianceMetadata[].standardDescription security_result.detection_fields[].value 原始日志中的 complianceMetadata[].standardDescription 值。
complianceMetadata[].standardName security_result.rule_name 原始日志中的 complianceMetadata[].standardName 值。
complianceMetadata[].systemDefault security_result.detection_fields[].key 该键设置为“systemDefault”。
complianceMetadata[].systemDefault security_result.detection_fields[].value 原始日志中的 complianceMetadata[].systemDefault 值,已转换为字符串。
create_time metadata.event_timestampevents[].timestamp 原始日志中的 create_time 值。
data.allocationId principal.resource.product_object_id 原始日志中的 data.allocationId 值。
data.publicIp principal.ip 原始日志中的 data.publicIp 值。
deleted additional.fields[].key 将键设为“已删除”。
deleted additional.fields[].value.string_value 原始日志中的 deleted 值,已转换为字符串。
description metadata.description 原始日志中的 description 值。
firstSeen principal.asset.first_seen_time 原始日志中的 firstSeen 值,会解析为时间戳(UNIX_MS 或 UNIX 格式)。
hasFinding security_result.detection_fields[].key 键设置为“hasFinding”。
hasFinding security_result.detection_fields[].value 原始日志中的 hasFinding 值,已转换为字符串。
lastSeen principal.asset.last_discover_time 原始日志中的 lastSeen 值,会解析为时间戳(UNIX_MS 或 UNIX 格式)。
不适用 metadata.event_type 如果未被日志中的特定事件类型替换,则设置为“USER_RESOURCE_ACCESS”。否则,请设置为“GENERIC_EVENT”。
不适用 metadata.product_name 已硬编码为“CASB”。
不适用 metadata.vendor_name 已硬编码为“Palo Alto Networks”。
policyDescription security_result.detection_fields[].key 键设置为“policyDescription”。
policyDescription security_result.detection_fields[].value 原始日志中的 policyDescription 值。
policyId security_result.detection_fields[].key 键设置为“政策 ID”。
policyId security_result.detection_fields[].value 原始日志中的 policyId 值。
policyLabels additional.fields[].key 键设置为“policyLabels”。
policyLabels additional.fields[].value.string_value 原始日志中的 policyLabels 值。
policyName security_result.description 原始日志中的 policyName 值。
policyRecommendation security_result.detection_fields[].key 该键设置为“政策建议”。
policyRecommendation security_result.detection_fields[].value 原始日志中的 policyRecommendation 值。
policyType security_result.detection_fields[].key 键设置为“政策类型”。
policyType security_result.detection_fields[].value 原始日志中的 policyType 值。
reason security_result.summary 原始日志中的 reason 值。
recommendation security_result.detection_fields[].key 该键设置为“推荐”。
recommendation security_result.detection_fields[].value 原始日志中的 recommendation 值。
resource.additionalInfo principal.resource.attribute.labels[].key 该键设置为“resource additionalInfo”。
resource.additionalInfo principal.resource.attribute.labels[].value 原始日志中的 resource.additionalInfo 值。
resource.cloudAccountGroups principal.resource.attribute.labels[].key 键设置为“resource cloudAccountGroups {index}”。
resource.cloudAccountGroups principal.resource.attribute.labels[].value 原始日志中的 resource.cloudAccountGroups[] 值。
resource.cloudType principal.resource.attribute.labels[].key 键设置为“resource cloudType”。
resource.cloudType principal.resource.attribute.labels[].value 原始日志中的 resource.cloudType 值。
resource.data principal.resource.attribute.labels[].key 该键设置为“resource data {nested_key}”。
resource.data principal.resource.attribute.labels[].value 原始日志中的 resource.data[] 值。
resource.id principal.resource.product_object_id 原始日志中的 resource.id 值。
resource.name principal.resource.name 原始日志中的 resource.name 值。
resource.region principal.location.country_or_region 原始日志中的 resource.region 值。
resource.regionId principal.cloud.availability_zone 原始日志中的 resource.regionId 值。
resource.resourceApiName principal.resource.attribute.labels[].key 键设置为“resource resourceApiName”。
resource.resourceApiName principal.resource.attribute.labels[].value 原始日志中的 resource.resourceApiName 值。
resource.resourceTags principal.resource.attribute.labels[].key 键设置为“resource resourceTags {nested_key}”。
resource.resourceTags principal.resource.attribute.labels[].value 原始日志中的 resource.resourceTags[] 值。
resource.resourceTs principal.resource.attribute.labels[].key 键设置为“resource resourceTs”。
resource.resourceTs principal.resource.attribute.labels[].value 原始日志中的 resource.resourceTs 值。
resource.resourceType principal.resource.attribute.labels[].key 键设置为“resource resourceType”。
resource.resourceType principal.resource.attribute.labels[].value 原始日志中的 resource.resourceType 值。
resource.rrn principal.resource.attribute.labels[].key 该键设置为“resource rrn”。
resource.rrn principal.resource.attribute.labels[].value 原始日志中的 resource.rrn 值。
resource.url principal.url 原始日志中的 resource.url 值。
resourceCloudService principal.resource.attribute.labels[].key 该键设置为“资源云服务”。
resourceCloudService principal.resource.attribute.labels[].value 原始日志中的 resourceCloudService 值。
resourceName principal.resource.name 原始日志中的 resourceName 值。
resourceRegion principal.location.country_or_region 原始日志中的 resourceRegion 值。
resourceRegionId principal.cloud.availability_zone 原始日志中的 resourceRegionId 值。
resourceType target.resource.resource_subtype 原始日志中的 resourceType 值。
severity security_result.severity 原始日志中的 severity 值,已转换为大写形式。已映射到 UDM 严重程度值(严重、高、中、低、信息)。
source principal.application 原始日志中的 source 值。
unifiedAssetId principal.asset.asset_id 原始日志中的 unifiedAssetId 的值,以“ASSETID:”为前缀。

更改

2023-12-10

  • 添加了 Grok 模式以提取 JSON 部分。
  • 将“resourceId”映射到“principal.resource.product_object_id”。
  • 将“accountId”映射到“target.resource.product_object_id”。
  • 将“alertRuleName”映射到“security_result.rule_name”。
  • 将“accountName”映射到“target.resource.name”。
  • 将“hasFinding”映射到“security_result.detection_fields”。
  • 将“resourceRegionId”映射到“principal.cloud.availability_zone”。
  • 将“source”映射到“principal.application”。
  • 将“callbackUrl”映射到“metadata.url_back_to_product”。
  • 将“alertRuleId”映射到“security_result.rule_id”。
  • 将“alertId”映射到“security_result.detection_fields”。
  • 将“policyLabels”映射到“additional.fields”。
  • 将“policyName”映射到“security_result.description”。
  • 将“resourceName”映射到“principal.resource.name”。
  • 将“resourceRegion”映射到“principal.location.country_or_region”。
  • 将“policyDescription”映射到“security_result.detection_fields”。
  • 将“policyRecommendation”映射到“security_result.detection_fields”。
  • 将“resourceCloudService”映射到“principal.resource.attribute.labels”。
  • 将“resource.url”映射到“principal.url”。
  • 将“alertTs”映射到“security_result.detection_fields”。
  • 将“firstSeen”映射到“principal.asset.first_seen_time”。
  • 将“lastSeen”映射到“principal.asset.last_discover_time”。
  • 将“reason”映射到“security_result.summary”。
  • 将“alertStatus”映射到“security_result.detection_fields”。
  • 如果“severity”值为“HIGH”,请将“security_result.severity”设为“HIGH”。
  • 如果“cloudType”值为“gcp”,请将“principal.cloud.environment”设置为“GOOGLE_CLOUD_PLATFORM”。

2023-08-17

  • 新创建的解析器。