收集 Security Command Center 毒性组合日志

支持:

本文档介绍了如何使用 Cloud Storage 将 Security Command Center 毒性组合日志导出并注入到 Google Security Operations 中。解析器会从 JSON 日志中提取安全发现结果数据并对其进行结构化处理。它会将数据规范化为统一数据模型 (UDM),处理不同的数据格式,并使用网络信息和用户代理详细信息等其他上下文来丰富数据。

准备工作

请确保满足以下前提条件:

  • Security Command Center 已在您的 Google Cloud 环境中启用和配置。
  • Google SecOps 实例。
  • 对 Security Command Center 和 Cloud Logging 的特权访问权限。

创建 Cloud Storage 存储桶

  1. 登录 Google Cloud 控制台。
  2. 进入 Cloud Storage 存储分区 页面。

    进入“存储分区”

  3. 点击创建 。

  4. 在创建存储桶 页面上,输入您的存储桶信息。完成以下每个步骤后,点击继续 以继续执行下一步:

    1. 在开始使用 部分中,执行以下操作:

      1. 输入符合存储桶名称要求的唯一名称;例如,gcp-scc-toxic-combination-logs 。
      2. 如需启用分层命名空间,请点击展开箭头以展开优化文件导向型和数据密集型工作负载 部分,然后选择在此存储桶上启用分层命名空间 。

      3. 如需添加存储桶标签,请点击展开箭头以展开标签 部分。

      4. 点击添加标签,并为标签指定键和值。

    2. 在选择数据存储位置 部分中,执行以下操作:

      1. 选择位置类型 。
      2. 使用位置类型菜单选择一个位置 ,用于永久存储存储桶中的对象数据。

      3. 如需设置跨存储桶复制,请展开设置跨存储桶复制 部分。

    3. 在为数据选择一个存储类别 部分中,为存储桶选择默认存储类别 ,或者选择 Autoclass 对存储桶数据进行自动存储类别管理。

    4. 在选择如何控制对对象的访问权限 部分中,选择不 强制执行禁止公开访问 ,然后为存储桶对象选择访问权限控制模型 。

    5. 在选择如何保护对象数据 部分中,执行以下操作:

      1. 在数据保护 下,选择您要为存储桶设置的任何选项。
      2. 如需选择对象数据的加密方式,请点击标有数据加密 的 展开箭头,然后选择数据加密方法 。
  5. 点击创建 。

配置 Security Command Center 日志记录

  1. 登录 Google Cloud 控制台。
  2. 进入 Security Command Center 页面。

    进入 Security Command Center

  3. 选择您的组织。

  4. 点击设置 。

  5. 点击连续导出 标签页。

  6. 在导出名称 下,点击 Logging 导出 。

  7. 在接收器 下,开启将发现结果记录到 Logging 。

  8. 在Logging 项目 下,输入或搜索要在其中记录发现结果的项目。

  9. 点击保存 。

配置 Security Command Center 毒性组合日志导出

  1. 登录 Google Cloud 控制台。
  2. 进入 Logging > 日志路由器。
  3. 点击创建接收器 。
  4. 提供以下配置参数:

    • 接收器名称:输入有意义的名称;例如,scc-toxic-combination-logs-sink。
    • 接收器目标位置:选择 Cloud Storage 存储,然后输入存储桶的 URI;例如,gs://gcp-scc-toxic-combination-logs/。
    • 日志过滤条件:

      logName="projects/<your-project-id>/logs/cloudsecurityscanner.googleapis.com%2Ftoxic_combinations"
      resource.type="security_command_center_toxic_combination"
      
    • 设置导出选项:包含所有日志条目。

  5. 点击创建 。

配置 Cloud Storage 的权限

  1. 进入 IAM 和管理员 > IAM。
  2. 找到 Cloud Logging 服务帐号。
  3. 授予对存储桶的 roles/storage.admin 角色。

设置 Feed

如需配置 Feed,请按以下步骤操作:

  1. 进入 SIEM 设置 > Feed。
  2. 点击 Add New Feed (添加新 Feed)。
  3. 在下一页上,点击 Configure a single feed (配置单个 Feed)。
  4. 在 Feed 名称 字段中,输入 Feed 的名称;例如,Security Command Center 毒性组合日志 。
  5. 选择 Google Cloud Storage V2 作为来源类型 。
  6. 选择 Security Command Center 毒性组合 作为日志类型 。
  7. 点击 Chronicle 服务账号 字段旁边的 Get Service Account (获取服务账号)。
  8. 点击下一步 。
  9. 为以下输入参数指定值:

    • 存储分区 URI:Cloud Storage 存储桶网址;例如,gs://gcp-scc-toxic-combination-logs/。此网址必须以尾部正斜杠 (/) 结尾。
    • 来源删除选项:根据您的偏好选择删除选项。

    • 最长文件存在时间:包含在过去指定天数内修改的文件。默认值为 180 天。

  10. 点击下一步 。

  11. 在完成 屏幕中查看新的 Feed 配置,然后点击提交 。

UDM 映射表

日志字段 UDM 映射 逻辑
category read_only_udm.metadata.product_event_type 直接从原始日志中的 category 字段映射。
createTime read_only_udm.security_result.detection_fields.value 直接从原始日志中的 createTime 字段映射,其中键为“createTime”。
mute read_only_udm.security_result.detection_fields.value 直接从原始日志中的 mute 字段映射,其中键为“mute”。
name read_only_udm.metadata.product_log_id 直接从原始日志中的 name 字段映射。
parent read_only_udm.target.resource_ancestors.name 直接从原始日志中的 parent 字段映射。
parentDisplayName read_only_udm.metadata.description 直接从原始日志中的 parentDisplayName 字段映射。
resource.displayName read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.displayName 字段映射,其中键为“resource_displayName”。
resource.folders read_only_udm.target.resource_ancestors 解析器会从 resource 对象中的 folders 数组中提取资源文件夹信息。它会遍历每个文件夹,并将 resourceFolder 映射到 name,并将 resourceFolderDisplayName 映射到 attribute.labels.value,其中键为“folder_resourceFolderDisplayName”。
resource.name read_only_udm.target.resource.name 直接从原始日志中的 resource.name 字段映射。
resource.parent read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.parent 字段映射,其中键为“resource_parent”。
resource.parentDisplayName read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.parentDisplayName 字段映射,其中键为“resource_parentDisplayName”。
resource.project read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.project 字段映射,其中键为“resource_project”。
resource.projectDisplayName read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.projectDisplayName 字段映射,其中键为“resource_projectDisplayName”。
resource.service read_only_udm.target.application 直接从原始日志中的 resource.service 字段映射。
resource.type read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 resource.type 字段映射,其中键为“resource_type”。
resourceName read_only_udm.target.resource.name 直接从原始日志中的 resourceName 字段映射。
securityMarks.name read_only_udm.security_result.detection_fields.value 直接从原始日志中的 securityMarks.name 字段映射,其中键为“securityMarks_name”。
severity read_only_udm.security_result.severity 直接从原始日志中的 severity 字段映射。
state read_only_udm.security_result.detection_fields.value 直接从原始日志中的 state 字段映射,其中键为“state”。
eventTime read_only_udm.metadata.event_timestamp.seconds 解析器会从 eventTime 字段中提取时间戳,并将其转换为 Unix 纪元秒数。
read_only_udm.metadata.product_name 解析器会根据日志源将 product_name 设置为 Security Command Center。
read_only_udm.metadata.vendor_name 解析器会根据日志源将 vendor_name 设置为 Google。
read_only_udm.security_result.alert_state 解析器会将 alert_state 设置为 ALERTING,因为此日志表示有效提醒。
read_only_udm.security_result.category_details 解析器会根据日志源将 category_details 设置为 POSTURE_VIOLATION。
read_only_udm.security_result.url_back_to_product 解析器会使用从日志中提取的组织 ID、来源 ID 和发现结果 ID 动态构建 url_back_to_product。
parent read_only_udm.target.resource.product_object_id 解析器会从 parent 字段中提取来源 ID,并将其设置为 product_object_id。
resourceName read_only_udm.target.resource_ancestors.name 解析器会从 resourceName 字段中提取项目 ID,并将其设置为 resource_ancestors 条目,其中 resource_type 为 CLOUD_PROJECT。
read_only_udm.target.resource_ancestors.resource_subtype 解析器会根据日志源将文件夹祖先的 resource_subtype 设置为 google.cloud.resourcemanager.Project。
read_only_udm.target.resource.attribute.labels.key 解析器会为目标资源的 attribute 对象中的 labels 字段设置多个键。这些键包括“resource_parentDisplayName”“resource_type”“resource_projectDisplayName”“resource_displayName”“finding_id”“source_id”“resource_parent”和“resource_project”。

需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。