收集 Microsoft Graph 活动日志

支持的语言:

概览

此解析器从 Microsoft Graph 活动日志中提取字段,并将其转换为统一数据模型 (UDM)。它会初始化 UDM 字段、解析载荷、提取时间戳、将各种属性映射到 UDM 字段、处理 IP 地址和端口,并根据正文信息和网络信息的存在情况对事件类型进行分类。

准备工作

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

  • Google SecOps 实例。
  • 对 Microsoft Entra ID 和 Azure 存储账号的特权访问权限。

配置 Azure 存储账号

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

将 Microsoft Graph 活动日志导出到存储账号

  1. 在 Azure 控制台中,搜索 Entra ID
  2. 依次选择监控 > 诊断设置
  3. 点击 + 添加诊断设置
  4. 为设置指定一个唯一名称(例如 ms-graph-activity)。
  5. 选择要导出到 Google SecOps 的 MicrosoftGraphActivityLog 类别。
  6. 目标位置详细信息下,选择归档到存储账号
  7. 选择您的订阅和您在上一步中创建的存储账号。
  8. 点击保存

如何设置 Microsoft Graph 活动日志

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 在下一页上,点击配置单个 Feed
  4. Feed 名称字段中,输入 Feed 的名称,例如 Microsoft Graph 活动日志
  5. 选择 Microsoft Azure Blob Storage V2 作为来源类型
  6. 选择 Microsoft Graph 活动日志作为日志类型
  7. 点击下一步
  8. 为以下输入参数指定值:

    • Azure URI:Blob 端点网址。

      ENDPOINT_URL/BLOB_NAME

      替换以下内容:

      • ENDPOINT_URL:Blob 端点网址 (https://<storageaccountname>.blob.core.windows.net)
      • BLOB_NAME:Blob 的名称(例如 insights-logs-
    • 来源删除选项:根据您的偏好设置选择删除选项。

    • 文件存在时间上限:在过去指定天数内修改的文件。默认值为 180 天。
    • 共享密钥:Azure Blob Storage 的访问密钥。
  9. 点击下一步

  10. 最终确定界面中查看新的 Feed 配置,然后点击提交

UDM 映射表

日志字段 UDM 映射 逻辑
callerIpAddress principal.asset.ip 原始日志字段 callerIpAddress 会复制到 UDM 字段。
callerIpAddress principal.ip 原始日志字段 callerIpAddress 会复制到 UDM 字段。
category security_result.category_details 原始日志字段 category 会复制到 UDM 字段。
correlationId security_result.detection_fields.value 原始日志字段 correlationId 会复制到 UDM 字段,其中键为 correlationId
Level security_result.detection_fields.value 原始日志字段 Level 会转换为字符串并复制到 UDM 字段(键为 Level)。
operationName metadata.product_event_type 原始日志字段 operationName 会复制到 UDM 字段。
operationVersion additional.fields.value.string_value 原始日志字段 operationVersion 会复制到 UDM 字段,其中键为 operationVersion
properties.apiVersion metadata.product_version 原始日志字段 properties.apiVersion 会复制到 UDM 字段。
properties.appId target.resource.product_object_id 原始日志字段 properties.appId 会复制到 UDM 字段。
properties.atContent additional.fields.value.string_value 原始日志字段 properties.atContent 会复制到 UDM 字段,其中键为 atContent
properties.clientAuthMethod extensions.auth.auth_details 根据 properties.clientAuthMethod 的值,UDM 字段会设置为“公共客户端”(0)、“客户端 ID/客户端密钥”(1) 或“客户端证书”(2)。
properties.clientRequestId additional.fields.value.string_value 原始日志字段 properties.clientRequestId 会复制到 UDM 字段,其中键为 clientRequestId
properties.durationMs network.session_duration.seconds 原始日志字段 properties.durationMs 从毫秒转换为秒,并复制到 UDM 字段。
properties.identityProvider security_result.detection_fields.value 原始日志字段 properties.identityProvider 会复制到 UDM 字段,其中键为 identityProvider
properties.ipAddress principal.asset.ip 从原始日志字段 properties.ipAddress 中提取 IP 地址,并将其复制到 UDM 字段。
properties.ipAddress principal.ip 从原始日志字段 properties.ipAddress 中提取 IP 地址,并将其复制到 UDM 字段。
properties.location principal.location.name 原始日志字段 properties.location 会复制到 UDM 字段。
properties.operationId security_result.detection_fields.value 原始日志字段 properties.operationId 会复制到 UDM 字段,其中键为 operationId
properties.requestMethod network.http.method 原始日志字段 properties.requestMethod 会复制到 UDM 字段。
properties.requestId metadata.product_log_id 原始日志字段 properties.requestId 会复制到 UDM 字段。
properties.responseSizeBytes network.received_bytes 原始日志字段 properties.responseSizeBytes 会转换为无符号整数并复制到 UDM 字段。
properties.responseStatusCode network.http.response_code 原始日志字段 properties.responseStatusCode 会转换为整数并复制到 UDM 字段。
properties.roles additional.fields.value.string_value 原始日志字段 properties.roles 会复制到 UDM 字段,其中键为 roles
properties.scopes additional.fields.value.string_value 原始日志字段 properties.scopes 会复制到 UDM 字段,其中键为 Scopes
properties.servicePrincipalId principal.user.userid 如果 properties.userId 为空,则将原始日志字段 properties.servicePrincipalId 复制到 UDM 字段。
properties.signInActivityId network.session_id 原始日志字段 properties.signInActivityId 会复制到 UDM 字段。
properties.tenantId metadata.product_deployment_id 原始日志字段 properties.tenantId 会复制到 UDM 字段。
properties.tokenIssuedAt additional.fields.value.string_value 原始日志字段 properties.tokenIssuedAt 会复制到 UDM 字段,其中键为 tokenIssuedAt
properties.userAgent network.http.user_agent 原始日志字段 properties.userAgent 会复制到 UDM 字段。
properties.userId principal.user.userid 原始日志字段 properties.userId 会复制到 UDM 字段。
properties.wids security_result.detection_fields.value 原始日志字段 properties.wids 会复制到 UDM 字段,其中键为 wids
resourceId target.resource.attribute.labels.value 原始日志字段 resourceId 会复制到 UDM 字段,其中键为 Resource ID
resultSignature additional.fields.value.string_value 原始日志字段 resultSignature 会复制到 UDM 字段,其中键为 resultSignature
time metadata.event_timestamp 系统会解析原始日志字段 time 并将其转换为时间戳,然后复制到 UDM 字段。如果 has_principal 为 true 且 network.http 不为空,则 UDM 字段 event.idm.read_only_udm.metadata.event_type 设置为“NETWORK_HTTP”;如果 has_principal 为 true 且 network.http 为空,则设置为“STATUS_UPDATE”;否则设置为“GENERIC_EVENT”。UDM 字段设置为“Microsoft Graph”。UDM 字段设置为“Microsoft”。

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