收集 Security Command Center 观测日志

支持:

本文档介绍了如何使用 Cloud Storage 将 Security Command Center 观测日志导出并注入到 Google Security Operations 中。解析器会将原始 JSON 数据转换为统一数据模型 (UDM)。它会对数据结构进行标准化,处理输入中可能存在的差异,然后提取相关字段并将其映射到 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-observation-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-observation-logs-sink。
    • 接收器目标位置:选择 Cloud Storage 存储,然后输入存储桶的 URI;例如 gs://gcp-scc-observation-logs/。
    • 日志过滤器:

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

  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-observation-logs/。此网址必须以尾部正斜杠 (/) 结尾。
    • 来源删除选项:根据您的偏好选择删除选项。

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

  10. 点击下一步 。

  11. 在最终确定 屏幕中检查新 Feed 配置,然后点击提交 。

UDM 映射表

日志字段 UDM 映射 逻辑
access.callerIp read_only_udm.principal.ip 直接映射。
access.callerIpGeo.regionCode read_only_udm.principal.location.country_or_region 直接映射。
access.methodName read_only_udm.additional.fields.value.string_value 直接映射。还会映射到 read_only_udm.target.labels.value。
access.principalEmail read_only_udm.principal.user.email_addresses 直接映射。
access.principalSubject read_only_udm.principal.user.attribute.labels.value 直接映射。
assetDisplayName read_only_udm.target.resource.attribute.labels.value 直接映射。
assetId read_only_udm.target.asset.asset_id 从 assetId 字段中提取 assets/ 后的值,并将其映射为 AssetID:<extracted_value>。
category read_only_udm.metadata.product_event_type 直接映射。
contacts.security.contacts.email read_only_udm.security_result.about.user.email_addresses 直接映射。about 对象可以根据联系人的数量重复多次。此字段的 roles.name 字段设置为 Security。
contacts.technical.contacts.email read_only_udm.security_result.about.user.email_addresses 直接映射。about 对象可以根据联系人的数量重复多次。此字段的 roles.name 字段设置为 Technical。
createTime read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 createTime。
eventTime read_only_udm.metadata.event_timestamp 转换为时间戳格式。
externalUri read_only_udm.about.url 直接映射。
findingClass read_only_udm.security_result.category_details 直接映射。
findingProviderId read_only_udm.target.resource.attribute.labels.value 直接映射。
mitreAttack.primaryTactic read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 primary_tactic。
mitreAttack.primaryTechniques read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据技术数量重复多次。此字段的 key 字段设置为 primary_technique。
mute read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 mute。
name read_only_udm.metadata.product_log_id 直接映射。
parentDisplayName read_only_udm.metadata.description 直接映射。
resource.display_name read_only_udm.target.resource.attribute.labels.value 直接映射。
resource.name read_only_udm.target.resource.name, read_only_udm.principal.resource.name 直接映射。当此字段用于填充 principal.resource.name 字段时,解析器将检查 resource.project_name 是否为空。如果不为空,则会改用 resource.project_name。
resource.parent_display_name read_only_udm.target.resource.attribute.labels.value 直接映射。
resource.parent_name read_only_udm.target.resource.attribute.labels.value 直接映射。
resource.project_display_name read_only_udm.target.resource.attribute.labels.value 直接映射。
resource.project_name read_only_udm.target.resource.attribute.labels.value 直接映射。
resource.type read_only_udm.target.resource.attribute.labels.value 直接映射。
resourceName read_only_udm.target.resource.name 直接映射。
securityMarks.name read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 securityMarks_name。
severity read_only_udm.security_result.severity, read_only_udm.security_result.priority_details 直接映射。
sourceDisplayName read_only_udm.target.resource.attribute.labels.value 直接映射。
sourceProperties.contextUris.mitreUri.displayName read_only_udm.security_result.detection_fields.key 直接映射。detection_fields 对象可以根据可用字段重复多次。
sourceProperties.contextUris.mitreUri.url read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。
sourceProperties.detectionCategory.ruleName read_only_udm.security_result.rule_name 直接映射。
sourceProperties.detectionCategory.subRuleName read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 sourceProperties_detectionCategory_subRuleName。
sourceProperties.detectionPriority read_only_udm.security_result.priority_details 直接映射。
sourceProperties.findingId read_only_udm.target.resource.attribute.labels.value 直接映射。
state read_only_udm.security_result.detection_fields.value 直接映射。detection_fields 对象可以根据可用字段重复多次。此字段的 key 字段设置为 state。
不适用 read_only_udm.metadata.log_type 硬编码为 GCP_SECURITYCENTER_OBSERVATION。
不适用 read_only_udm.metadata.product_name 硬编码为 Security Command Center。
不适用 read_only_udm.metadata.vendor_name 硬编码为 Google。
不适用 read_only_udm.principal.user.account_type 如果存在正文电子邮件,则设置为 CLOUD_ACCOUNT_TYPE。
不适用 read_only_udm.security_result.alert_state 硬编码为 ALERTING。
不适用 read_only_udm.security_result.priority 如果严重程度为 LOW,则设置为 LOW_PRIORITY。
不适用 read_only_udm.target.application 从 resourceName 字段中提取。
不适用 read_only_udm.target.resource.product_object_id 从父字段中提取。
不适用 read_only_udm.target.resource.resource_type 默认设置为 CLUSTER。如果类别为 Impact: GPU Instance Created 或 Impact: Many Instances Created,则设置为 VIRTUAL_MACHINE。如果类别为 Persistence: Add Sensitive Role,则设置为 SETTING。
不适用 read_only_udm.target.resource_ancestors.name 从父字段和 resourceName 字段中提取。
不适用 read_only_udm.target.resource_ancestors.product_object_id 从父字段、resource.project_name 字段和 resourceName 字段中提取。
不适用 read_only_udm.target.resource_ancestors.resource_type 如果 resource.type 为 google.compute.Project,则设置为 CLOUD_PROJECT。
不适用 read_only_udm.target.labels.key 如果存在 access.methodName,则该值设置为 access_methodName。
不适用 read_only_udm.target.labels.value 该值从 access.methodName 设置。
不适用 read_only_udm.target.resource.attribute.labels.key 该键根据可用字段设置为以下值之一:resource_parentDisplayName、resource_type、resource_parentName、resource_projectDisplayName、resource_displayName、finding_id、source_id、FindingProviderId、sourceDisplayName、asset_display_name。
不适用 read_only_udm.target.resource.attribute.labels.value 该值根据可用字段从以下字段之一设置:parentDisplayName、resource.type、resource.parent_name、resource.project_display_name、resource.display_name、sourceProperties.findingId、sourceProperties.sourceId、findingProviderId、sourceDisplayName、assetDisplayName。

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