收集 Azure AD 登录日志

支持的语言:

本文档介绍了如何使用 Azure 存储账号将 Azure AD 登录日志导出到 Google Security Operations。解析器会获取 JSON 格式的原始日志,并将其转换为符合统一数据模型 (UDM) 的结构化格式。它会提取相关字段、规范化值、处理不同的时间戳,并使用与安全性相关的背景信息(例如用户信息、IP 地址和条件访问政策)来丰富数据。

准备工作

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

  • Google SecOps 实例
  • 有效的 Azure 租户
  • 对 Azure 的特权访问权限

配置 Azure 存储账号

  1. 在 Azure 控制台中,搜索存储账号
  2. 点击 + 创建
  3. 为以下输入参数指定值:
    • 订阅:选择相应订阅。
    • 资源组:选择资源组。
    • 地区:选择相应区域。
    • 效果:选择效果(建议选择“标准”)。
    • 冗余:选择冗余(建议使用 GRS 或 LRS)。
    • 存储账号名称:输入新存储账号的名称。
  4. 点击 Review + create(检查 + 创建)。
  5. 查看账号概览,然后点击创建
  6. 存储账号概览页面上,选择安全性 + 网络中的访问密钥子菜单。
  7. 点击 key1key2 旁边的显示
  8. 点击复制到剪贴板以复制密钥。
  9. 将密钥保存在安全的位置,以备日后使用。
  10. 存储账号概览页面中,选择设置中的终结点子菜单。
  11. 点击复制到剪贴板,复制 Blob 服务端点网址;例如,https://<storageaccountname>.blob.core.windows.net
  12. 将端点网址保存在安全的位置,以供日后使用。

如何为 Azure AD 登录日志配置日志导出

  1. 使用您的特权账号登录 Azure 门户
  2. 依次前往 Microsoft Entra ID > 监控 > 诊断设置
  3. 点击添加诊断设置
    • 为诊断设置输入描述性名称。
  4. 选择登录日志
  5. 选择归档到存储账号复选框作为目标位置。
    • 指定订阅存储账号

设置 Feed

您可以通过两种不同的入口点在 Google SecOps 平台中设置 Feed:

  • SIEM 设置 > Feed > 添加新 Feed
  • 内容中心 > 内容包 > 开始

如何设置 Azure AD 登录 Feed

  1. 点击 Azure 平台包。
  2. 找到 Azure AD 登录日志类型。
  3. 为以下字段指定值:

    • 来源类型:Microsoft Azure Blob Storage V2。
    • Azure URI:Blob 端点网址。
      • ENDPOINT_URL/BLOB_NAME
        • 替换以下内容:
          • ENDPOINT_URL:Blob 端点网址 (https://<storageaccountname>.blob.core.windows.net)
          • BLOB_NAME:Blob 的名称(例如 insights-logs-<logname>
    • 源删除选项:根据您的提取偏好设置选择删除选项。

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

    • 共享密钥:Azure Blob Storage 的访问密钥。

    高级选项

    • Feed 名称:用于标识 Feed 的预填充值。
    • 资产命名空间与 Feed 关联的命名空间
    • 提取标签:应用于相应 Feed 中所有事件的标签。
  4. 点击创建 Feed

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

UDM 映射表

日志字段 UDM 映射 逻辑
AppDisplayName read_only_udm.target.application 直接从原始日志中的 AppDisplayName 字段映射。
AppId read_only_udm.security_result.detection_fields.value 直接从原始日志中的 AppId 字段映射。该键设置为 appId
类别 read_only_udm.security_result.category_details 直接从原始日志中的 Category 字段映射。
ConditionalAccessPolicies[].displayName read_only_udm.security_result.rule_name 直接从原始日志中 ConditionalAccessPolicies 数组内的 displayName 字段映射。
ConditionalAccessPolicies[].enforcedGrantControls[] read_only_udm.security_result.rule_labels.value 直接从原始日志中 ConditionalAccessPolicies 数组内的 enforcedGrantControls 数组映射。该键设置为 applied_conditional_access_policies_enforced_grant_controls
ConditionalAccessPolicies[].enforcedSessionControls[] read_only_udm.security_result.rule_labels.value 直接从原始日志中 ConditionalAccessPolicies 数组内的 enforcedSessionControls 数组映射。该键设置为 applied_conditional_access_policies_enforced_session_controls
ConditionalAccessPolicies[].id read_only_udm.security_result.rule_id 直接从原始日志中 ConditionalAccessPolicies 数组内的 id 字段映射。
ConditionalAccessPolicies[].Result read_only_udm.security_result.rule_labels.value 直接从原始日志中 ConditionalAccessPolicies 数组内的 Result 字段映射。该键设置为 applied_conditional_access_policies_result
ConditionalAccessStatus read_only_udm.additional.fields.value.string_value 直接从原始日志中的 ConditionalAccessStatus 字段映射。该键设置为 conditionalAccessStatus
CorrelationId read_only_udm.security_result.detection_fields.value 直接从原始日志中的 CorrelationId 字段映射。该键设置为 correlationId
DurationMs read_only_udm.additional.fields.value.string_value 直接从原始日志中的 DurationMs 字段映射。该键设置为 durationMs
HomeTenantId read_only_udm.security_result.detection_fields.value 直接从原始日志中的 HomeTenantId 字段映射。该键设置为 HomeTenantId
IPAddress read_only_udm.principal.asset.ip, read_only_udm.principal.ip 直接从原始日志中的 IPAddress 字段映射。
ID read_only_udm.security_result.detection_fields.value 直接从原始日志中的 Id 字段映射。该键设置为 id
身份 read_only_udm.target.resource.attribute.labels.value 直接从原始日志中的 Identity 字段映射。该键设置为 identity
级别 read_only_udm.security_result.severity, read_only_udm.security_result.severity_details 直接从原始日志中的 Level 字段映射。严重程度是根据 Level 的值确定的:InformationInformational04 映射到 INFORMATIONALWarning13 映射到 MEDIUMError2 映射到 ERRORCritical 映射到 CRITICAL
OperationName read_only_udm.metadata.product_event_type 直接从原始日志中的 OperationName 字段映射。
ResourceGroup read_only_udm.security_result.detection_fields.value 直接从原始日志中的 ResourceGroup 字段映射。该键设置为 ResourceGroup
ResultSignature read_only_udm.additional.fields.value.string_value 直接从原始日志中的 ResultSignature 字段映射。该键设置为 resultSignature
ResultType read_only_udm.additional.fields.value.string_value 直接从原始日志中的 ResultType 字段映射。该键设置为 resultType
TenantId read_only_udm.metadata.product_deployment_id 直接从原始日志中的 TenantId 字段映射。
TimeGenerated read_only_udm.metadata.event_timestamp.seconds, read_only_udm.metadata.event_timestamp.nanos 直接从原始日志中的 TimeGenerated 字段映射。该字段会被解析为时间戳,并用于填充 secondsnanos 字段。
TokenIssuerType read_only_udm.security_result.detection_fields.value 直接从原始日志中的 TokenIssuerType 字段映射。该键设置为 TokenIssuerType
UniqueTokenIdentifier read_only_udm.security_result.detection_fields.value 直接从原始日志中的 UniqueTokenIdentifier 字段映射。该键设置为 UniqueTokenIdentifier
UserAgent read_only_udm.network.http.user_agent, read_only_udm.network.http.parsed_user_agent 直接从原始日志中的 UserAgent 字段映射。该字段会被解析为用户代理字符串,并用于填充 parsed_user_agent 对象。
UserDisplayName read_only_udm.target.user.user_display_name 直接从原始日志中的 UserDisplayName 字段映射。
UserId read_only_udm.target.user.userid 直接从原始日志中的 UserId 字段映射。
UserPrincipalName read_only_udm.target.user.email_addresses 直接从原始日志中的 UserPrincipalName 字段映射,但前提是该字段与电子邮件地址模式匹配。
UserType read_only_udm.target.user.attribute.roles.name 直接从原始日志中的 UserType 字段映射。
_Internal_WorkspaceResourceId read_only_udm.security_result.detection_fields.value 直接从原始日志中的 _Internal_WorkspaceResourceId 字段映射。该键设置为 Internal_WorkspaceResourceId
_ItemId read_only_udm.security_result.detection_fields.value 直接从原始日志中的 _ItemId 字段映射。该键设置为 ItemId
properties.appId read_only_udm.security_result.detection_fields.value 直接从原始日志中 properties 对象的 appId 字段映射。该键设置为 appId
properties.authenticationDetails[].authenticationMethod read_only_udm.security_result.detection_fields.value 直接从原始日志中 authenticationDetails 数组内的 authenticationMethod 字段映射。该键设置为 authenticationMethod
properties.authenticationDetails[].authenticationMethodDetail read_only_udm.security_result.detection_fields.value 直接从原始日志中 authenticationDetails 数组内的 authenticationMethodDetail 字段映射。该键设置为 authenticationMethodDetail
properties.authenticationDetails[].authenticationStepDateTime read_only_udm.security_result.detection_fields.value 直接从原始日志中 authenticationDetails 数组内的 authenticationStepDateTime 字段映射。该键设置为 authenticationStepDateTime
properties.authenticationDetails[].authenticationStepRequirement read_only_udm.security_result.detection_fields.value 直接从原始日志中 authenticationDetails 数组内的 authenticationStepRequirement 字段映射。该键设置为 authenticationStepRequirement
properties.authenticationDetails[].authenticationStepResultDetail read_only_udm.security_result.detection_fields.value 直接从原始日志中 authenticationDetails 数组内的 authenticationStepResultDetail 字段映射。该键设置为 authenticationStepResultDetail
properties.authenticationDetails[].succeeded read_only_udm.security_result.action, read_only_udm.security_result.action_details 直接从原始日志中 authenticationDetails 数组内的 succeeded 字段映射。如果值为 true,则将操作设置为 ALLOW;否则,将其设置为 BLOCK
properties.conditionalAccessStatus read_only_udm.additional.fields.value.string_value 直接从原始日志中 properties 对象的 conditionalAccessStatus 字段映射。该键设置为 conditionalAccessStatus
properties.id read_only_udm.security_result.detection_fields.value 直接从原始日志中 properties 对象的 id 字段映射。该键设置为 id
properties.status.errorCode read_only_udm.security_result.action 如果值为 0,则将操作设置为 ALLOW;否则,将其设置为 BLOCK
properties.userId read_only_udm.target.user.userid 直接从原始日志中 properties 对象的 userId 字段映射。
properties.userPrincipalName read_only_udm.target.user.email_addresses 直接从原始日志中 properties 对象的 userPrincipalName 字段映射,但前提是该字段与电子邮件地址模式匹配。
resourceId read_only_udm.target.resource.name 直接从原始日志中的 resourceId 字段映射。
时间 read_only_udm.metadata.event_timestamp.seconds, read_only_udm.metadata.event_timestamp.nanos 直接从原始日志中的 time 字段映射。该字段会被解析为时间戳,并用于填充 secondsnanos 字段。
read_only_udm.extensions.auth.type 该值设置为 AUTHTYPE_UNSPECIFIED
read_only_udm.metadata.event_type 该值根据 principal.iptarget.user.userid 字段是否存在来确定:如果这两个字段都存在,则类型设置为 USER_LOGIN;如果仅存在 principal.ip,则类型设置为 STATUS_UPDATE;否则,类型设置为 GENERIC_EVENT

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