收集 AWS Security Hub 日志
支持的平台:
Google SecOps
SIEM
本文档介绍了如何将 AWS Security Hub 日志提取到 Google Security Operations。AWS Security Hub 可全面显示各个 AWS 账号的安全提醒和发现结果。通过将这些发现发送到 Google SecOps,您可以使用 Google SecOps 功能来增强监控和威胁检测能力。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您拥有对 AWS 的特权访问权限。
配置 AWS IAM
- 按照以下用户指南创建 Amazon S3 存储分区:创建存储分区
- 保存存储分区的名称和区域,以备日后使用。
- 按照以下用户指南创建用户:创建 IAM 用户。
- 选择创建的用户。
- 选择安全凭据标签页。
- 点击访问密钥部分中的创建访问密钥。
- 选择第三方服务作为用例。
- 点击下一步。
- 可选:添加说明标记。
- 点击创建访问密钥。
- 点击下载 CSV 文件,保存访问密钥和密钥以供日后使用。
- 点击完成。
- 选择权限标签页。
- 在权限政策部分中,点击添加权限。
- 选择添加权限。
- 选择直接附加政策。
- 搜索并选择 AmazonS3FullAccess 政策。
- 点击下一步。
- 点击添加权限。
配置 AWS Security Hub 以使用 EventBridge 转发发现结果
- 登录 AWS Management Console。
- 在搜索栏中输入 Security Hub,然后从服务列表中选择该服务。
- 点击设置。
- 在集成部分下,找到 EventBridge,然后点击启用。
- 在搜索栏中输入 EventBridge,然后从服务列表中选择该服务。
- 在 EventBridge 控制台中,依次点击规则 > 创建规则。
- 提供以下规则配置:
- 规则名称:为规则提供一个描述性名称(例如 SendSecurityHubFindingsToS3)。
- 事件来源:选择 AWS 服务。
- 服务名称:选择 Security Hub。
- 事件类型:选择 Security Hub 发现。
- 设置目标:选择 S3 存储分区作为发现结果的目标位置。
- S3 存储分区:选择应存储发现结果的存储分区。
- 如果您尚未设置 S3 存储分区,请创建一个:
- 前往 S3 控制台。
- 点击创建存储分区。
- 提供存储分区名称(例如 securityhub-findings-logs)。
- 点击创建。
- 配置权限:EventBridge 会自动配置所需权限,以便将发现结果发送到指定的 S3 存储分区(如果您使用的是自定义存储分区,请确保已设置适当的 S3 权限,以便 EventBridge 将日志写入该存储分区)。
- 点击创建。
在 Google SecOps 中配置 Feed 以提取 AWS Security Hub 日志
- 依次前往 SIEM 设置 > Feed。
- 点击新增。
- 在Feed 名称字段中,输入 Feed 的名称(例如 AWS Security Hub 日志)。
- 选择 Amazon S3 作为来源类型。
- 选择 AWS Security Hub 作为日志类型。
- 点击下一步。
为以下输入参数指定值:
- 区域:Amazon S3 存储分区所在的区域。
- S3 URI:存储分区 URI。
s3://your-log-bucket-name/
- 将
your-log-bucket-name
替换为存储分区的实际名称。
- 将
- URI 是:选择目录或包含子目录的目录。
来源删除选项:根据您的偏好选择删除选项。
访问密钥 ID:有权访问 S3 存储分区的用户访问密钥。
私有访问密钥:有权访问 S3 存储分区的用户私有密钥。
资源命名空间:资源命名空间。
提取标签:要应用于此 Feed 中的事件的标签。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
account |
principal.group.product_object_id |
与相应问题相关联的 AWS 账号 ID。 |
configurationItem.ARN |
target.resource.id |
配置项的 Amazon 资源名称 (ARN)。 |
configurationItem.awsAccountId |
principal.user.userid |
配置项的 AWS 账号 ID。 |
configurationItem.awsRegion |
target.asset.location.country_or_region |
配置项的 AWS 区域。 |
configurationItem.configuration.complianceType |
security_result.summary |
配置项的合规性类型。 |
configurationItem.configuration.configRuleList[].complianceType |
security_result.summary |
每个配置规则的合规性状态。 |
configurationItem.configuration.configRuleList[].configRuleArn |
security_result.rule_id |
AWS Config 规则的 ARN。 |
configurationItem.configuration.configRuleList[].configRuleId |
security_result.about.labels.configRuleId |
AWS Config 规则的 ID。 |
configurationItem.configuration.configRuleList[].configRuleName |
security_result.rule_name |
AWS Config 规则的名称。 |
configurationItem.configuration.privateIpAddress |
target.ip |
配置项的专用 IP 地址。 |
configurationItem.configuration.publicIpAddress |
target.ip |
配置项的公共 IP 地址。 |
configurationItem.configurationItemCaptureTime |
target.asset.attribute.creation_time |
配置项的采集时间,已转换为时间戳。 |
configurationItem.configurationItemStatus |
target.asset.attribute.labels.Configuration Item Status |
配置项的状态。 |
configurationItem.relationships[].resourceId |
target.asset.attribute.cloud.vpc.id |
关联资源的资源 ID,如果与“vpc”匹配,则用于 VPC ID。 |
configurationItem.resourceId |
target.resource.id |
配置项的资源 ID。 |
configurationItem.resourceName |
target.resource.name |
资源的名称。 |
configurationItem.resourceType |
target.resource.resource_subtype |
配置项的资源类型。 |
configurationItem.tags.Contact |
principal.user.user_display_name 或 principal.user.email_addresses |
从代码中提取的详细联系信息,系统会解析电子邮件地址和用户名。 |
configurationItem.tags.OS /configurationItem.tags.Os |
target.asset.platform_software.platform |
代码中的操作系统,如果是“Windows”或“Linux”,则会映射到平台。 |
configurationItemDiff.changeType |
metadata.event_type |
更改类型,映射到 RESOURCE_WRITTEN 或 RESOURCE_CREATION。 |
detail.accountId |
principal.group.product_object_id |
与相应问题相关联的 AWS 账号 ID。 |
detail.actionDescription detail.actionName detail.description |
sec_result.description |
相应发现的说明。 |
detail.findings[].AwsAccountId |
principal.group.product_object_id |
与相应问题相关联的 AWS 账号 ID。 |
detail.findings[].CompanyName detail.findings[].CreatedAt detail.findings[].Description |
sec_result.description |
相应发现的说明。 |
detail.findings[].FindingProviderFields.Severity.Label |
sec_result.severity |
发现结果的严重程度标签,已转换为大写形式。 |
detail.findings[].FindingProviderFields.Types[] detail.findings[].FirstObservedAt detail.findings[].GeneratorId detail.findings[].Id detail.findings[].LastObservedAt detail.findings[].ProductArn detail.findings[].ProductFields. |
如下所示 | 用于其他字段、主要字段和目标信息的各种字段。 |
detail.findings[].ProductName detail.findings[].RecordState detail.findings[].Region |
target.location.name |
相应发现结果所在的 AWS 区域。 |
detail.findings[].Resources[].Details. |
如下所示 | 与发现结果相关的资源的详细信息。 |
detail.findings[].Resources[].Id |
target.resource.product_object_id |
资源的 ID。 |
detail.findings[].Resources[].Partition detail.findings[].Resources[].Region |
target.location.name |
资源的 AWS 区域。 |
detail.findings[].Resources[].Tags detail.findings[].Resources[].Type |
target.resource.resource_type 、target.resource.resource_subtype 、metadata.event_type |
资源类型,用于资源类型、子类型和事件类型映射。 |
detail.findings[].Sample detail.findings[].SchemaVersion detail.findings[].Severity.Label detail.findings[].SourceUrl detail.findings[].Title |
sec_result.summary |
发现的标题。 |
detail.findings[].Types[] detail.findings[].UpdatedAt detail.findings[].Workflow.Status detail.findings[].WorkflowState detail-type |
metadata.product_event_type |
事件的详细类型。 |
id |
metadata.product_log_id |
事件的 ID。 |
region |
target.location.name |
活动的 AWS 区域。 |
resources[] source time version (解析器逻辑) |
metadata.event_timestamp |
原始日志条目的创建时间,用作事件时间戳。 |
(Parser Logic) | metadata.log_type |
设置为“AWS_SECURITY_HUB”。 |
(Parser Logic) | metadata.product_name |
设置为“AWS Security Hub”。 |
(Parser Logic) | metadata.vendor_name |
设置为“AMAZON”。 |
(Parser Logic) | target.asset.attribute.cloud.environment |
设置为“AMAZON_WEB_SERVICES”。 |
(Parser Logic) | metadata.event_type |
如果未从 Resources[].Type 或 configurationItemDiff.changeType 映射,则默认设置为“USER_RESOURCE_ACCESS”。如果存在 configurationItems 且未设置其他事件类型,则设置为“STATUS_UPDATE”。如果存在 configurationItem 或 configurationItems ,并且状态为“OK”或“ResourceDiscovered”,则设置为“RESOURCE_READ”。如果存在 configurationItem 或 configurationItems 且状态为“ResourceDeleted”,则设为“RESOURCE_DELETION”。 |
(Parser Logic) | metadata.description |
如果存在 detail.findings[].ProductFields.aws/guardduty/service/serviceName ,则设置为“guardduty”。 |
(Parser Logic) | target.asset.attribute.cloud.vpc.resource_type |
如果 configurationItems.relationships[].resourceId 与“vpc”匹配,则设置为“VPC_NETWORK”。 |
(Parser Logic) | target.resource.resource_type |
如果存在 configurationItem 或 configurationItems ,则设置为“VIRTUAL_MACHINE”。如果未设置任何其他资源类型,则将其设置为“UNSPECIFIED”。 |
(Parser Logic) | target.asset.platform_software.platform |
根据是否存在“Windows”或“(Linux |
(Parser Logic) | disambiguation_key |
从单个日志条目生成多个事件时添加。 |
变化
2023-06-20
- 增强功能:
- 将“metadata.event_type”从“GENERIC_EVENT”修改为“USER_RESOURCE_ACCESS”。
2023-03-24
- 增强功能:
- when "detail.findings.0.Resources.0.Type" == "AwsEcsTaskDefinition" -
- 将“target.resource.resource_type”映射到“TASK”。
- 将“event_type”映射到“USER_RESOURCE_ACCESS”。
- 将“detail.findings.0.ProductFields.Resources:0/Id”映射到“principal.asset_id”。
- 将所有其他失败日志解析为 GENERIC_EVENT,因为 STATUS_UPDATE 不适合用于解析这些日志。
2022-08-22
- 增强功能:
- 将 vendor_name 从“AWS SECURITY HUB”更新为“AMAZON”。
- 将 product_name 从“AWS SECURITY HUB”更新为“AWS Security Hub”。
- 解析了包含“configurationItem”或“configurationItems”的新 JSON 格式日志。
- 使用 for 循环将作为导入文件提取的日志分隔开来,并将每个日志解析为单独的事件,以便进行处理。
2022-07-01
- 新创建的解析器。
需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。