收集 AWS IAM 日志

解析器版本:1.0

支持的平台:

本文档介绍了如何使用第三方 API Feed 将 AWS Identity and Access Management (IAM) 配置数据注入到 Google Security Operations。

AWS IAM 解析器将 IAM 实体数据(用户、群组、角色和政策)转换为结构化的统一数据模型 (UDM),提取用户详细信息、角色信息、权限和时间戳等字段,以便进行一致的安全分析。

准备工作

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

  • Google SecOps 实例
  • 对 AWS 控制台的特权访问权限
  • 创建 IAM 用户和政策的权限

获取 Google SecOps IP 范围

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 记下页面顶部显示的 IP 范围。

创建具有所需权限的 IAM 用户

重要提示:如需允许 Google SecOps 使用 API 检索 AWS IAM 数据,您必须创建具有相应读取权限的 IAM 用户。

  1. 按照本指南中的说明创建用户创建 IAM 用户
  2. 选择创建的用户
  3. 选择安全凭据标签页。
  4. 访问密钥部分中,点击创建访问密钥
  5. 选择第三方服务作为使用情形
  6. 点击下一步
    • 可选:添加说明标记。
  7. 点击创建访问密钥
  8. 点击下载 .csv 文件以保存访问密钥 ID密钥,供日后参考。
  9. 点击完成
  10. 选择权限标签页。
  11. 权限政策部分中,点击添加权限
  12. 选择添加权限
  13. 选择直接附加政策
  14. 搜索 IAMReadOnlyAccess(AWS 托管政策)。
  15. 选择相应政策。
  16. 点击下一步
  17. 点击添加权限

重要提示IAMReadOnlyAccess 政策包含所有必需的权限:

  • iam:GetUser
  • iam:ListUsers
  • iam:GetGroup
  • iam:ListGroups
  • iam:GetPolicy
  • iam:ListPolicies
  • iam:GetRole
  • iam:ListRoles
  • iam:ListAttachedUserPolicies
  • iam:ListAttachedGroupPolicies
  • iam:ListAttachedRolePolicies
  • iam:GetAccountSummary

选项 B:创建自定义政策(最小权限)

如果您的安全政策要求使用最少的权限,而不是使用托管政策,请执行以下操作:

  1. 在 AWS 控制台中,依次前往 IAM > 政策 > 创建政策 > JSON 标签页
  2. 粘贴以下政策:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "iam:GetUser",
            "iam:ListUsers",
            "iam:GetGroup",
            "iam:ListGroups",
            "iam:GetPolicy",
            "iam:ListPolicies",
            "iam:GetRole",
            "iam:ListRoles",
            "iam:ListAttachedUserPolicies",
            "iam:ListAttachedGroupPolicies",
            "iam:ListAttachedRolePolicies",
            "iam:GetAccountSummary"
          ],
          "Resource": "*"
        }
      ]
    }
    
  3. 点击下一步

  4. 将政策命名为 chronicle-iam-api-read-policy

  5. 点击创建政策

  6. 按照本指南中的说明创建用户创建 IAM 用户

  7. 选择创建的用户

  8. 选择安全凭据标签页。

  9. 访问密钥部分中,点击创建访问密钥

  10. 选择第三方服务作为使用情形

  11. 点击下一步

    • 可选:添加说明标记。
  12. 点击创建访问密钥

  13. 点击下载 .csv 文件以保存访问密钥 ID密钥,供日后参考。

  14. 点击完成

  15. 选择权限标签页。

  16. 权限政策部分中,点击添加权限

  17. 选择添加权限

  18. 选择直接附加政策

  19. 搜索并选择 chronicle-iam-api-read-policy

  20. 点击下一步

  21. 点击添加权限

在 Google SecOps 中配置 Feed 以注入 IAM 配置数据

AWS IAM Feed 会根据 API 类型字段(用户角色群组)选择每个 Feed 收集一个 IAM 实体列表。如需收集所有 IAM 实体,请为每种 API 类型创建一个 Feed,所有 Feed 都使用 AWS IAM 日志类型。

  1. 依次前往内容中心 > 内容包 > 开始
  2. 点击 Amazon Cloud Platform 包。
  3. 在列表中找到 AWS IAM 日志类型。
  4. 来源类型下拉菜单中选择第三方 API
  5. 提供以下配置详细信息:
    • 用户名:之前创建的 IAM 用户的访问密钥 ID。
    • 密钥:之前创建的 IAM 用户的私有访问密钥。
    • API 类型:选择要收集的 IAM 实体列表:用户角色群组
    • Feed 名称:用于标识 Feed 的预填充值(例如 AWS IAM Users)。
    • 资源命名空间:与 Feed 关联的命名空间。
    • 提取标签:应用于相应 Feed 中所有事件的标签。
  6. 点击创建 Feed

如需详细了解如何为相应产品系列中的不同日志类型配置多个 Feed,请参阅按产品配置 Feed

使用 SIEM 设置

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 在下一页上,点击配置单个 Feed
  4. Feed 名称字段中,输入 Feed 的名称(例如 AWS IAM API Configuration)。
  5. 选择第三方 API 作为来源类型
  6. 选择 AWS IAM 作为日志类型
  7. 点击下一步
  8. 为以下输入参数指定值:
    • 用户名:之前创建的 IAM 用户的访问密钥 ID。
    • 密钥:之前创建的 IAM 用户的私有访问密钥。
    • API 类型:选择要收集的 IAM 实体列表:用户角色群组
    • 资产命名空间资产命名空间
    • 注入标签:要应用于此 Feed 中事件的标签。
  9. 点击下一步
  10. 最终确定界面中查看新的 Feed 配置,然后点击提交

UDM 映射表

日志字段 UDM 映射 逻辑
Group.CreateDate entity.group.attribute.creation_time 解析为 ISO8601
Group.Path entity.group.attribute.labels.value 直接映射
IsTruncated entity.group.attribute.labels.value 直接映射
Marker entity.group.attribute.labels.value 直接映射
Group.GroupName entity.group.email_addresses 已合并
Group.GroupName entity.group.group_display_name 直接映射
Group.GroupID entity.group.product_object_id 直接映射
RoleLastUsed.Region entity.location.name 直接映射
CreateDate entity.resource.attribute.creation_time 解析为 ISO8601
MaxSessionDuration entity.resource.attribute.labels.value 直接映射
Path entity.resource.attribute.labels.value 直接映射
RoleLastUsed.LastUsedDate entity.resource.attribute.labels.value 直接映射
AssumeRolePolicyDocument entity.resource.attribute.permissions.name 直接映射
Description entity.resource.attribute.roles.description 直接映射
RoleName entity.resource.attribute.roles.name 直接映射
Arn entity.resource.name 直接映射
Group.Arn entity.resource.name 直接映射
RoleID entity.resource.product_object_id 直接映射
CreateDate entity.user.attribute.creation_time 解析为 ISO8601
PasswordLastUsed entity.user.last_login_time 解析为 ISO8601
UserID entity.user.product_object_id 直接映射
UserName entity.user.userid 直接映射
PermissionsBoundary.PermissionsBoundaryArn relations.entity.resource.attribute.labels.value 直接映射
PermissionsBoundary.PermissionsBoundaryType relations.entity.resource.attribute.labels.value 直接映射
user.PermissionsBoundary.PermissionsBoundaryArn relations.entity.resource.attribute.labels.value 直接映射
user.PermissionsBoundary.PermissionsBoundaryType relations.entity.resource.attribute.labels.value 直接映射
user.Arn relations.entity.resource.name 直接映射
user.CreateDate relations.entity.user.attribute.creation_time 解析为 ISO8601
tag.Key relations.entity.user.attribute.labels.key 直接映射
Path relations.entity.user.attribute.labels.value 直接映射
tag.Value relations.entity.user.attribute.labels.value 直接映射
user.Path relations.entity.user.attribute.labels.value 直接映射
user.PasswordLastUsed relations.entity.user.last_login_time 解析为 ISO8601
user.UserID relations.entity.user.product_object_id 直接映射
user.UserName relations.entity.user.userid 直接映射
不适用 entity.group.attribute.labels.key 常量:is_truncated
不适用 entity.resource.attribute.cloud.environment 常量:AMAZON_WEB_SERVICES
不适用 entity.resource.attribute.labels.key 常量:max_session_duration
不适用 entity.resource.resource_subtype 常量:User
不适用 entity.resource.resource_type 常量:ACCESS_POLICY
不适用 metadata.entity_type 常量:USER
不适用 metadata.product_name 常量:AWS IAM
不适用 metadata.vendor_name 常量:AWS
不适用 relations.direction 常量:UNIDIRECTIONAL
不适用 relations.entity.resource.attribute.labels.key 常量:permissions_boundary_arn
不适用 relations.entity.resource.resource_subtype 常量:User
不适用 relations.entity.user.attribute.labels.key 常量:path
不适用 relations.entity_type 常量:USER
不适用 relations.relationship 常量:MEMBER

更新日志

查看相应解析器的更改日志

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