收集 Security Command Center 的“有毒组合”日志
本文档介绍了如何使用 Cloud Storage 将 Security Command Center Toxic Combination 日志导出并注入到 Google Security Operations 中。解析器从 JSON 日志中提取安全发现结果数据并对其进行结构化处理。它会将数据标准化为统一数据模型 (UDM),处理不同的数据格式,并使用网络信息和用户代理详细信息等其他上下文信息来丰富数据。
准备工作
确保您满足以下前提条件:
- Security Command Center 已在您的 Google Cloud 环境中启用和配置。
- Google SecOps 实例。
- 对 Security Command Center 和 Cloud Logging 的特权访问权限。
创建 Cloud Storage 存储桶
- 登录 Google Cloud 控制台。
前往 Cloud Storage 存储分区页面。
点击创建。
在创建存储桶页面上,输入您的存储桶信息。完成以下每一步后,点击继续以继续执行后续步骤:
在开始使用部分中,执行以下操作:
- 输入符合存储桶名称要求的唯一名称,例如 gcp-scc-toxic-combination-logs。
如需启用分层命名空间,请点击展开箭头以展开优化文件导向型和数据密集型工作负载部分,然后选择在此存储桶上启用分层命名空间。
如需添加存储桶标签,请点击展开箭头以展开标签部分。
点击添加标签,然后为标签指定键和值。
在选择数据存储位置部分中,执行以下操作:
- 选择位置类型。
使用位置类型菜单选择一个位置,用于永久存储存储桶中的对象数据。
如需设置跨存储桶复制,请展开设置跨存储桶复制部分。
在为数据选择一个存储类别部分中,为存储桶选择默认存储类别,或者选择 Autoclass 对存储桶数据进行自动存储类别管理。
在选择如何控制对对象的访问权限部分中,选择不强制执行禁止公开访问,然后为存储桶对象选择访问权限控制模型。
在选择如何保护对象数据部分中,执行以下操作:
- 在数据保护下,选择您要为存储桶设置的任何选项。
- 如需选择对象数据的加密方式,请点击标有数据加密的展开箭头,然后选择数据加密方法。
点击创建。
配置 Security Command Center 日志记录
- 登录 Google Cloud 控制台。
前往 Security Command Center 页面。
选择您的组织。
点击设置。
点击连续导出标签页。
在导出名称下,点击 Logging 导出。
在接收器下,开启将发现结果记录到 Logging。
在记录项目下,输入或搜索要在其中记录发现结果的项目。
点击保存。
配置 Security Command Center“有毒组合”日志导出
- 登录 Google Cloud 控制台。
- 前往日志记录 > 日志路由器。
- 点击创建接收器。
提供以下配置参数:
- 接收器名称:输入一个有意义的名称,例如
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"
设置导出选项:包含所有日志条目。
- 接收器名称:输入一个有意义的名称,例如
点击创建。
配置 Cloud Storage 权限
- 前往 IAM 和管理> IAM。
- 找到 Cloud Logging 服务账号。
- 授予对相应存储桶的 roles/storage.admin。
设置 Feed
您可以通过两种不同的入口点在 Google SecOps 平台中设置 Feed:
- SIEM 设置 > Feed
- 内容中心 > 内容包
通过“SIEM 设置”>“Feed”设置 Feed
如需配置 Feed,请按以下步骤操作:
- 依次前往 SIEM 设置 > Feed。
- 点击添加新 Feed。
- 在下一页上,点击配置单个 Feed。
- 在 Feed 名称字段中,输入 Feed 的名称;例如,Security Command Center Toxic Combination 日志。
- 选择 Google Cloud Storage 作为来源类型。
- 选择 Security Command Center Toxic Combination 作为日志类型。
- 点击Chronicle 服务账号字段旁边的获取服务账号。
- 点击下一步。
为以下输入参数指定值:
- 存储分区 URI:Cloud Storage 存储桶网址;例如
gs://gcp-scc-toxic-combination-logs
。 - URI Is A:选择目录(包括子目录)。
来源删除选项:根据您的偏好设置选择删除选项。
- 存储分区 URI:Cloud Storage 存储桶网址;例如
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
设置来自内容中心的 Feed
为以下字段指定值:
- 存储分区 URI:Cloud Storage 存储桶网址;例如
gs://gcp-scc-toxic-combination-logs
。 - URI Is A:选择目录(包括子目录)。
- 来源删除选项:根据您的偏好设置选择删除选项。
高级选项
- Feed 名称:用于标识 Feed 的预填充值。
- 来源类型:用于将日志收集到 Google SecOps 中的方法。
- 资源命名空间:与 Feed 关联的命名空间。
- 提取标签:应用于相应 Feed 中所有事件的标签。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
类别 | 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 字段映射。 |
父级 | 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”。 |
和程度上减少 | 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 。 |
|
父级 | 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 专业人士那里获得解答。