收集 Microsoft Defender for Cloud 提醒日志

支持的语言:

概览

此解析器可从 Microsoft Defender for Cloud 的 JSON 格式日志中提取安全提醒数据。它将原始日志字段转换并映射到 Google SecOps UDM,处理各种数据类型和嵌套结构,同时还通过添加更多上下文和标签来丰富数据,以改进分析。

准备工作

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

  • Google SecOps 实例。
  • 对 Microsoft Defender for Cloud 的特权访问权限。

设置 Feed

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

  • SIEM 设置 > Feed
  • 内容中心 > 内容包

通过“SIEM 设置”>“Feed”设置 Feed

如需配置 Feed,请按以下步骤操作:

  1. 依次前往 SIEM 设置 > Feed
  2. 点击添加新 Feed
  3. 在下一页上,点击配置单个 Feed
  4. Feed 名称字段中,输入 Feed 的名称;例如,Microsoft Defender for Cloud 提醒日志
  5. 选择 Webhook 作为来源类型
  6. 选择 Microsoft Defender for Cloud 作为日志类型
  7. 点击下一步
  8. 可选:为以下输入参数指定值:
    • 拆分分隔符:用于分隔日志行的分隔符,例如 \n
  9. 点击下一步
  10. 最终确定界面中检查 Feed 配置,然后点击提交
  11. 点击生成密钥,生成用于对此 Feed 进行身份验证的密钥。
  12. 复制并存储密钥。您将无法再次查看此密钥。如有需要,您可以重新生成新的 Secret 密钥,但此操作会使之前的 Secret 密钥失效。
  13. 详情标签页中,从端点信息字段复制 Feed 端点网址。您需要在客户端应用中指定此端点网址。
  14. 点击完成

设置来自内容中心的 Feed

为以下字段指定值:

  • 拆分分隔符:用于分隔日志行的分隔符,例如 \n

高级选项

  • Feed 名称:用于标识 Feed 的预填充值。
  • 来源类型:用于将日志收集到 Google SecOps 中的方法。
  • 资源命名空间:与 Feed 关联的命名空间。
  • 提取标签:应用于相应 Feed 中所有事件的标签。

  • 点击生成密钥,生成用于对此 Feed 进行身份验证的密钥。

  • 复制并存储密钥。您将无法再次查看此密钥。如有需要,您可以重新生成新的 Secret 密钥,但此操作会使之前的 Secret 密钥失效。

  • 详情标签页中,从端点信息字段复制 Feed 端点网址。您需要在客户端应用中指定此端点网址。

为 Webhook Feed 创建 API 密钥

  1. 前往 Google Cloud 控制台 > 凭据

    转到“凭证”页面

  2. 点击创建凭据,然后选择 API 密钥

  3. 将 API 密钥访问权限限制为 Google Security Operations API

指定端点网址

  1. 在客户端应用中,指定 webhook Feed 中提供的 HTTPS 端点网址。
  2. 通过在自定义标头中指定 API 密钥和密钥来启用身份验证,格式如下:

    X-goog-api-key = API_KEY
    X-Webhook-Access-Key = SECRET
    

    建议:将 API 密钥指定为标头,而不是在网址中指定。如果您的 Webhook 客户端不支持自定义标头,您可以使用以下格式的查询参数指定 API 密钥和密钥:

    ENDPOINT_URL?key=API_KEY&secret=SECRET
    

替换以下内容:

  • ENDPOINT_URL:Feed 端点网址。
  • API_KEY:用于向 Google Security Operations 进行身份验证的 API 密钥。
  • SECRET:您生成的用于验证 Feed 的密钥。

创建 Azure 逻辑应用

  1. 登录 Azure 门户 (https://portal.azure.com)。
  2. 点击创建资源,然后搜索 Logic App
  3. 点击创建以开始部署流程。
  4. 配置逻辑应用:
    • 名称:为逻辑应用提供一个描述性名称(例如 GoogleSecOpsWebhook)。
    • 订阅:选择合适的订阅。
    • 资源组:选择现有资源组或创建新资源组。
    • 位置:选择离您的环境最近的位置。
    • Log Analytics:如果您想记录逻辑应用的诊断数据,请启用此选项。
  5. 点击查看 + 创建以创建逻辑应用。
  6. 点击创建以部署逻辑应用。

配置 Azure 逻辑应用 Webhook 连接

  1. 前往在上一步中创建的逻辑应用。
  2. 依次点击开发工具 > 逻辑应用设计器
  3. 点击添加触发器
  4. 搜索 Microsoft Defender for Cloud > 选择创建或触发 Microsoft Defender for Cloud 提醒时作为触发器。

  5. 点击创建新账号,然后按照提示进行身份验证。

  6. 点击插入新步骤,向工作流添加新步骤。

  7. 点击添加操作

  8. 搜索 HTT

  9. 选择 HTTP 作为操作。

  10. 配置 HTTP 操作:

    • URI:您可以在此处输入 Google SecOps API 端点网址。
    • 方法POST
    • 添加 Content-Type 标头:将 Content-Type 设置为标头键,并将 application/json 设置为标头值。此参数用于告知 Google SecOps 所发送数据的格式。
    • 向查询中添加 API 密钥:将 key 设置为第一个查询键,并将 <API_KEY> 设置为查询值。API_KEY 是在 Google SecOps Feed 配置期间生成的 API 密钥值。
    • 向查询中添加 Secret 密钥:将 secret 设置为第二个查询键,并将 <SECRET_KEY> 设置为查询值。SECRET_KEY 是在 Google SecOps Feed 配置期间生成的 Secret 密钥。
    • 设置上一步中的正文:点击输入请求内容 > 点击输入上一步中的数据(输入字段左侧带有闪电图标的按钮)。
  11. 点击保存

配置 Microsoft Defender Cloud 提醒 Webhook

  1. 前往 Microsoft Defender for Cloud
  2. 依次点击管理 > 工作流自动化
  3. 点击添加工作流自动化
    • 名称:为自动化规则提供描述性名称(例如 ForwardAlertsToGoogleSecOps)。
    • 资源组:选择现有资源组。
    • Defender for Cloud 数据类型:选择安全提醒
    • 提醒严重程度:选择全选
    • 显示以下订阅中的逻辑应用实例:选择创建逻辑应用的订阅。
    • 选择逻辑应用:选择在上一步中创建的逻辑应用。
  4. 点击创建以保存工作流自动化。

UDM 映射表

日志字段 UDM 映射 逻辑
AlertLink principal.resource.attribute.labels.AlertLink.value 直接映射。
AlertName security_result.rule_name 直接映射。
AlertSeverity security_result.severity 如果值为 HIGH、MEDIUM、LOW、CRITICAL、UNKNOWN_SEVERITY 之一,则直接映射。否则,映射到 security_result.severity_details。在比较之前,值会转换为大写。
AlertType security_result.threat_name 直接映射。
CompromisedEntity principal.resource.attribute.labels.CompromisedEntity.value 直接映射。
Description security_result.description 直接映射。
DisplayName security_result.summary 直接映射。
EndTime about.resource.attribute.labels.EndTime.value 直接映射。
Entities[].Location.City principal.location.city 直接映射。
Entities[].Location.CountryName principal.location.country_or_region 直接映射。
ExtendedLinks[].Category about.resource.attribute.labels.extendedLink_Category.value 直接映射。
ExtendedLinks[].Href about.resource.attribute.labels.extendedLink_Href.value 直接映射。
ExtendedLinks[].Label about.resource.attribute.labels.extendedLink_Label.value 直接映射。
ExtendedLinks[].Type about.resource.attribute.labels.extendedLink_Type.value 直接映射。
ExtendedProperties.Account Session Id network.session_id 重命名为 accountSessionId 后直接映射。
ExtendedProperties.Alert Id metadata.product_log_id 重命名为 alertId 后直接映射。
ExtendedProperties.Authentication type extensions.auth.auth_details 重命名为 authenticationType 后直接映射。
ExtendedProperties.Client Application principal.application 重命名为 clientApplication 后直接映射。
ExtendedProperties.Client Hostname principal.asset.hostnameprincipal.hostname 重命名为 clientHostName 后直接映射。
ExtendedProperties.Client IP address principal.asset.ipprincipal.ip 重命名为 clientIpAddress 后直接映射。
ExtendedProperties.Client IP location principal.location.country_or_region 重命名为 clientIpLocation 后直接映射。
ExtendedProperties.Client Location principal.location.country_or_region 重命名为 clientLocation 后直接映射。
ExtendedProperties.Client Principal Name principal.user.userid 重命名为 clientPrincipalName 后直接映射。
ExtendedProperties.Compromised Host principal.asset.hostnameprincipal.hostname 重命名为 compromisedHost 后直接映射。
ExtendedProperties.Suspicious Command Line target.process.command_line 重命名为 suspiciousCommandLine 后直接映射。
ExtendedProperties.Suspicious Process target.process.file.full_path 重命名为 suspiciousProcess 后直接映射。
ExtendedProperties.Suspicious Process Id target.process.pid 重命名为 suspiciousProcessId 后直接映射。
ExtendedProperties.User agent network.http.user_agent 重命名为 userAgent 后直接映射。
ExtendedProperties.User Name principal.user.user_display_name 重命名为 userName 后直接映射。
ExtendedProperties.resourceType principal.resource.name 直接映射。
IsIncident security_result.detection_fields.IsIncident.value 直接映射。已转换为字符串。
ProcessingEndTime about.resource.attribute.labels.ProcessingEndTime.value 直接映射。
ProductName metadata.product_name 直接映射。
ResourceId principal.resource.product_object_id 直接映射。
SourceSystem security_result.detection_fields.SourceSystem.value 直接映射。
StartTime about.resource.attribute.labels.StartTime.value 直接映射。
Status security_result.detection_fields.Status.value 直接映射。
SystemAlertId metadata.product_log_id 直接映射。
Tactics security_result.attack_details.tactics.name 直接映射。
TenantId additional.fields.TenantId.string_value 直接映射。
TimeGenerated about.resource.attribute.labels.TimeGenerated.value 直接映射。
VendorName metadata.vendor_name 直接映射。
WorkspaceResourceGroup target.resource.attribute.labels.WorkspaceResourceGroup.value 直接映射。
WorkspaceSubscriptionId target.resource.attribute.labels.WorkspaceSubscriptionId.value 直接映射。
_Internal_WorkspaceResourceId target.resource.product_object_id 直接映射。
properties.alertDisplayName security_result.rule_name 直接映射。
properties.alertType security_result.threat_name 直接映射。
properties.alertUri principal.resource.attribute.labels.AlertUri.value 直接映射。
properties.correlationKey principal.resource.attribute.labels.correlationKey.value 直接映射。
properties.description security_result.description 直接映射。
properties.endTimeUtc additional.fields.EndTime.string_value 直接映射。
properties.entities[].location.city principal.location.city 直接映射。
properties.entities[].location.countryName principal.location.country_or_region 直接映射。
properties.entities[].location.latitude principal.location.region_coordinates.latitude 直接映射。已转换为浮点数。
properties.entities[].location.longitude principal.location.region_coordinates.longitude 直接映射。已转换为浮点数。
properties.extendedProperties.alert_Id metadata.product_log_id 直接映射。
properties.extendedProperties.clientApplication principal.application 直接映射。
properties.extendedProperties.clientIpAddress principal.asset.ipprincipal.ip 直接映射。解析为 IP 地址。
properties.extendedProperties.clientLocation principal.location.country_or_region 直接映射。
properties.extendedProperties.clientPrincipalName principal.user.userid 直接映射。
properties.extendedProperties.compromisedEntity principal.resource.attribute.labels.CompromisedEntity.value 直接映射。
properties.extendedProperties.resourceType principal.resource.name 直接映射。
properties.IsIncident security_result.detection_fields.isIncident.value 直接映射。已转换为字符串。
properties.productName metadata.product_name 直接映射。
properties.resourceIdentifiers[].<key> additional.fields.<key>_<index>.string_value 直接映射。键 $idtype 会附加数组中元素的索引。
properties.severity security_result.severity 如果值为 HIGH、MEDIUM、LOW、CRITICAL、UNKNOWN_SEVERITY 之一,则直接映射。否则,映射到 security_result.severity_details。在比较之前,值会转换为大写。
properties.startTimeUtc additional.fields.StartTime.string_value 直接映射。
properties.status security_result.detection_fields.Status.value 直接映射。
properties.timeGeneratedUtc additional.fields.TimeGenerated.string_value 直接映射。如果日志中未提供,则设置为“MICROSOFT_DEFENDER_CLOUD_ALERTS”。设置为“MICROSOFT_DEFENDER_CLOUD_ALERTS”。如果存在主账号或目标,则设置为“USER_RESOURCE_ACCESS”,否则设置为“GENERIC_EVENT”。

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