收集 Microsoft Sentinel 日志
本文档介绍了如何配置 Microsoft Sentinel,以使用 Logic Apps 和 Webhook 将突发事件和提醒发送到 Google Security Operations。
Microsoft Sentinel 是一种云原生安全信息和事件管理 (SIEM) 以及安全编排、自动化和响应 (SOAR) 解决方案。它可在整个企业范围内提供智能安全分析和威胁情报。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- 对 Microsoft Azure 门户的特权访问权限,包括:
- 创建 Logic Apps
- 配置 Microsoft Sentinel 自动化规则
- 管理资源组权限
- 创建和管理服务主账号
- 访问 Google Cloud 控制台(用于创建 API 密钥)
在 Google SecOps 中创建 Webhook Feed
创建 Feed
- 前往 SIEM 设置 > Feed。
- 点击 Add New Feed (添加新 Feed)。
- 在下一页上,点击 Configure a single feed (配置单个 Feed)。
- 在 Feed 名称 字段中,输入 Feed 的名称(例如
Microsoft Sentinel Incidents)。 - 选择 Webhook 作为来源类型 。
- 选择 Microsoft Sentinel 作为日志类型 。
- 点击下一步 。
- 为以下输入参数指定值:
- 拆分定界符 (可选):留空(每个突发事件或提醒都是一个事件)。
- 资产命名空间:资产命名空间。
- 提取标签:要应用于此 Feed 中事件的标签。
- 点击下一步 。
- 在 Finalize (完成)屏幕中查看新 Feed 配置,然后点击提交 。
生成并保存密钥
创建 Feed 后,您必须生成密钥以进行身份验证:
- 在 Feed 详情页面上,点击 Generate Secret Key (生成密钥)。
- 系统会显示一个对话框,其中包含密钥。
复制并妥善保存密钥。
获取 Feed 端点网址
- 前往 Feed 的详情 标签页。
- 在 Endpoint Information (端点信息)部分,复制 Feed endpoint 网址 (Feed 端点网址)。
网址格式为:
https://malachiteingestion-pa.googleapis.com/v2/unstructuredlogentries:batchCreate或
https://<REGION>-malachiteingestion-pa.googleapis.com/v2/unstructuredlogentries:batchCreate保存此网址以供在后续步骤中使用。
点击完成 。
创建 Google Cloud API 密钥
Google SecOps 需要 API 密钥进行身份验证。在 Google Cloud 控制台中创建受限 API 密钥。
创建 API 密钥
- 前往Google Cloud 控制台的“凭据”页面。
- 选择您的项目(与您的 Google SecOps 实例关联的项目)。
- 点击创建凭据 > API 密钥。
- 系统会创建一个 API 密钥,并在对话框中显示该密钥。
- 点击 Edit API key (修改 API 密钥)以限制该密钥。
限制 API 密钥
- 在 API 密钥 设置页面中:
- 名称:输入描述性名称(例如
Google SecOps Webhook API Key)。
- 名称:输入描述性名称(例如
- 在 API 限制 下:
- 选择限制密钥 。
- 在 Select APIs (选择 API)列表中,搜索并选择 Google SecOps API (或 Chronicle API )。
- 点击保存 。
- 从页面顶部的 API 密钥 字段中复制 API 密钥值。
妥善保存 API 密钥。
为 Microsoft Sentinel 突发事件配置 Logic App
本部分将配置 Logic App,以将 Microsoft Sentinel 突发事件发送到 Google SecOps。
创建 Logic App
- 登录 Azure 门户 。
- 点击创建资源 。
- 搜索 Logic App 。
- 点击创建 以开始创建过程。
- 为以下输入参数指定值:
- 订阅:选择订阅。
- 资源组:选择资源组。
- 名称:输入 Logic App 的名称(例如
Sentinel-Incidents-to-SecOps)。 - 区域:选择区域。
- 日志分析工作区:选择日志分析工作区。
- 点击 Review + create (检查 + 创建)。
- 点击创建 。
- 创建 Logic App 后,点击 Go to resource (前往资源)。
配置 Logic App 设计器
- 点击 Development Tools > Logic App Designer (开发工具 > Logic App 设计器)。
- 点击 Add a trigger (添加触发器)。
- 搜索 Microsoft Sentinel 。
- 选择 Microsoft Sentinel incident (Microsoft Sentinel 突发事件)作为触发器。
- 如果您尚未创建与 Microsoft Sentinel 的连接,则需要立即创建。
- 点击 Create new (新建),然后按照提示进行身份验证:
- 选择 Sign in with managed identity (使用托管身份登录,推荐)或 Sign in (登录)以使用您的凭据。
- 点击 Insert a new step (插入新步骤)。
- 点击 Add an action (添加操作)。
- 搜索并选择 HTTP 作为操作。
- 为以下输入参数指定值:
- URI:粘贴 Google SecOps Feed 中的 Feed 端点网址。
- 方法:选择 POST。
- 标头:添加以下标头:
- 标头名称:
X-goog-api-key - 值:粘贴之前创建的 API 密钥。
- 标头名称:
X-Webhook-Access-Key - 值:粘贴在创建 Feed 时生成的密钥。
- 标头名称:
- 点击正文 字段。
- 在动态内容面板中,点击表达式 标签页。
在表达式字段中输入
@{triggerBody()},然后点击确定 。点击保存 以保存 Logic App。
授予 Microsoft Sentinel 运行 Logic App 的权限
自动化规则需要两项单独的权限分配才能成功触发 Logic App。
权限 1:授予 Logic App 托管身份对 Sentinel 工作区的访问权限
Logic App 的托管身份需要获得从 Microsoft Sentinel 工作区读取突发事件的权限。
为 Logic App 启用托管身份
- 在 Azure 门户 中,前往您的 Logic App 资源 (
Sentinel-Incidents-to-SecOps)。 - 在左侧导航栏中,选择设置 下的身份 。
- 在 System assigned (系统分配)标签页中,将状态 设置为 On (开启)。
- 点击保存 。
- 点击是 进行确认。
- 启用后,记下显示的对象(主账号)ID 。
向 Logic App 授予 Microsoft Sentinel Responder 角色
- 在 Azure 门户 中,前往您的 Microsoft Sentinel 工作区 。
- 在左侧导航栏中,选择设置 下的 Access control (IAM) (访问权限控制 (IAM))。
- 点击 + Add > Add role assignment (\+ 添加 > 添加角色分配)。
- 在角色 标签页中,搜索并选择 Microsoft Sentinel Responder:
- 替代方案:如果剧本仅读取突发事件,请使用 Microsoft Sentinel Reader 角色。
- 点击下一步 。
- 在成员 标签页中,配置以下内容:
- 分配权限:选择 Managed identity(托管身份)。
- 点击 + Select members (+ 选择成员)。
- 在 Managed identity (托管身份)列表中,选择 Logic App 。
- 从列表中选择您的 Logic App (
Sentinel-Incidents-to-SecOps)。
- 点击选择 。
- 点击 Review + assign (检查 + 分配)。
- 再次点击 Review + assign (检查 + 分配)进行确认。
权限 2:授予 Microsoft Sentinel 对资源组的自动化权限
Microsoft Sentinel 需要对包含 Logic App 的资源组具有 Microsoft Sentinel Automation Contributor (Microsoft Sentinel 自动化贡献者)角色。如果没有此权限,自动化规则将无法触发剧本。
通过 Sentinel 界面授予自动化权限
- 在 Azure 门户 中,前往您的 Microsoft Sentinel 工作区 。
- 依次前往 Settings > Automation(设置 > 自动化)。
- 点击页面顶部的 Manage playbook permissions (管理剧本权限)。
- 在 Manage permissions (管理权限)窗格中,配置以下内容:
- 选择包含 Logic App (
Sentinel-Incidents-to-SecOps) 的资源组 。
- 选择包含 Logic App (
点击应用 。
验证自动化权限(可选)
- 在 Azure 门户 中,前往包含 Logic App 的资源组 。
- 在左侧导航栏中,选择 Access control (IAM) (访问权限控制 (IAM))。
- 点击 Role assignments (角色分配)。
- 搜索 Azure Security Insights 。
验证 Azure Security Insights 是否具有 Microsoft Sentinel Automation Contributor (Microsoft Sentinel 自动化贡献者)角色。
:前往包含 Logic App 的资源组 。
选择 Access control (IAM) > Add role assignment (访问权限控制 (IAM) > 添加角色分配)。
选择 Microsoft Sentinel Automation Contributor (Microsoft Sentinel 自动化贡献者)角色。
在成员中,选择用户、组或服务正文。
点击 + Select members (\+ 选择成员),然后搜索 Azure Security Insights 。
选择 Azure Security Insights ,然后点击选择 。
点击 Review + assign (检查 + 分配)两次进行确认。
为 Microsoft Sentinel 提醒配置 Logic App
本部分将配置单独的 Logic App,以将 Microsoft Sentinel 提醒发送到 Google SecOps。
为提醒创建 Logic App
- 前往 Azure 门户首页 。
- 点击创建资源 。
- 搜索 Logic App 。
- 点击创建 以开始创建过程。
- 为以下输入参数指定值:
- 订阅:选择订阅。
- 资源组:选择资源组。
- 名称:输入 Logic App 的名称(例如
Sentinel-Alerts-to-SecOps)。 - 区域:选择区域。
- 日志分析工作区:选择日志分析工作区。
- 点击 Review + create (检查 + 创建)。
- 点击创建 。
- 创建 Logic App 后,点击 Go to resource (前往资源)。
为提醒配置 Logic App 设计器
- 点击 Development Tools > Logic App Designer (开发工具 > Logic App 设计器)。
- 点击 Add a trigger (添加触发器)。
- 搜索 Microsoft Sentinel 。
- 选择 Microsoft Sentinel alert (Microsoft Sentinel 提醒)作为触发器。
- 如果您尚未创建与 Microsoft Sentinel 的连接,则需要立即创建。
- 点击 Create new (新建),然后按照提示进行身份验证:
- 选择 Sign in with managed identity (使用托管身份登录,推荐)或 Sign in (登录)以使用您的凭据。
- 点击 Insert a new step (插入新步骤)。
- 点击 Add an action (添加操作)。
- 搜索并选择 HTTP 作为操作。
- 为以下输入参数指定值:
- URI:粘贴 Google SecOps Feed 中的 Feed 端点网址。
- 方法:选择 POST。
- 标头:添加以下标头:
- 标头名称:
X-goog-api-key - 值:粘贴之前创建的 API 密钥。
- 标头名称:
X-Webhook-Access-Key - 值:粘贴在创建 Feed 时生成的密钥。
- 标头名称:
- 点击正文 字段。
- 在动态内容面板中,点击表达式 标签页。
在表达式字段中输入
@{triggerBody()},然后点击确定 。点击保存 以保存 Logic App。
授予 Microsoft Sentinel 运行提醒 Logic App 的权限
提醒 Logic App 需要两项单独的权限分配,与突发事件 Logic App 配置相同。
权限 1:授予提醒 Logic App 托管身份对 Sentinel 工作区的访问权限
提醒 Logic App 的托管身份需要获得从 Microsoft Sentinel 工作区读取提醒的权限。
为提醒 Logic App 启用托管身份
- 在 Azure 门户 中,前往您的提醒 Logic App 资源 (
Sentinel-Alerts-to-SecOps)。 - 在左侧导航栏中,选择设置 下的身份 。
- 在 System assigned (系统分配)标签页中,将状态 设置为 On (开启)。
- 点击保存 。
- 点击是 进行确认。
- 启用后,记下显示的对象(主账号)ID 。
向提醒 Logic App 授予 Microsoft Sentinel Responder 角色
- 在 Azure 门户 中,前往您的 Microsoft Sentinel 工作区 。
- 在左侧导航栏中,选择设置 下的 Access control (IAM) (访问权限控制 (IAM))。
- 点击 + Add > Add role assignment (\+ 添加 > 添加角色分配)。
- 在角色 标签页中,搜索并选择 Microsoft Sentinel Responder:
- 替代方案:如果剧本仅读取提醒,请使用 Microsoft Sentinel Reader 角色。
- 点击下一步 。
- 在成员 标签页中,配置以下内容:
- 分配权限:选择 Managed identity(托管身份)。
- 点击 + Select members (+ 选择成员)。
- 在 Managed identity (托管身份)列表中,选择 Logic App 。
- 从列表中选择您的提醒 Logic App (
Sentinel-Alerts-to-SecOps)。
- 点击选择 。
- 点击 Review + assign (检查 + 分配)。
- 再次点击 Review + assign (检查 + 分配)进行确认。
权限 2:授予 Microsoft Sentinel 对资源组的自动化权限(针对提醒)
Microsoft Sentinel 需要对包含提醒 Logic App 的资源组具有 Microsoft Sentinel Automation Contributor (Microsoft Sentinel 自动化贡献者)角色。
通过 Sentinel 界面授予自动化权限
- 在 Azure 门户 中,前往您的 Microsoft Sentinel 工作区 。
- 依次前往 Settings > Automation(设置 > 自动化)。
- 点击页面顶部的 Manage playbook permissions (管理剧本权限)。
- 在 Manage permissions (管理权限)窗格中,配置以下内容:
- 选择包含提醒 Logic App (
Sentinel-Alerts-to-SecOps) 的资源组 。- 如果此资源组与突发事件 Logic App 的资源组相同,则可能已选中。
- 选择包含提醒 Logic App (
点击应用 。
验证提醒 Logic App 的自动化权限(可选)
- 在 Azure 门户 中,前往包含提醒 Logic App 的资源组 。
- 在左侧导航栏中,选择 Access control (IAM) (访问权限控制 (IAM))。
- 点击 Role assignments (角色分配)。
- 搜索 Azure Security Insights 。
- 验证 Azure Security Insights 是否具有 Microsoft Sentinel Automation Contributor (Microsoft Sentinel 自动化贡献者)角色。
为 Microsoft Sentinel 配置自动化规则
当在 Microsoft Sentinel 中创建或更新突发事件时,Automation 规则会触发 Logic Apps。
为突发事件创建创建自动化规则
- 前往您的 Microsoft Sentinel 工作区 。
- 点击 Configuration > Automation (配置 > 自动化)。
- 点击创建 。
- 选择 Automation rule (自动化规则)。
- 为以下输入参数指定值:
- 名称:输入自动化规则的名称(例如
Send New Incidents to SecOps)。 - 触发器 :选择 When incident is created (创建突发事件时)。
- 操作:从列表中选择 Run playbook(运行剧本)。
- 选择为突发事件创建的 Logic App (
Sentinel-Incidents-to-SecOps)。
- 名称:输入自动化规则的名称(例如
- 点击应用 。
为突发事件更新创建自动化规则
- 前往您的 Microsoft Sentinel 工作区 。
- 点击 Configuration > Automation (配置 > 自动化)。
- 点击创建 。
- 选择 Automation rule (自动化规则)。
- 为以下输入参数指定值:
- 名称:输入自动化规则的名称(例如
Send Updated Incidents to SecOps)。 - 触发器:选择 When incident is updated(更新突发事件时)。
- 条件:依次点击 Add > Condition (And) > Status > Changed(添加 > 条件 (And) > 状态 > 已更改)。
- 名称:输入自动化规则的名称(例如
- 在操作 部分,配置以下内容:
- 从列表中选择 Run playbook (运行剧本)。
- 选择为突发事件创建的 Logic App (
Sentinel-Incidents-to-SecOps)。
- 点击应用 。
为提醒创建自动化规则
- 前往您的 Microsoft Sentinel 工作区 。
- 点击 Configuration > Automation (配置 > 自动化)。
- 点击创建 。
- 选择 Automation rule (自动化规则)。
- 为以下输入参数指定值:
- 名称:输入自动化规则的名称(例如
Send Alerts to SecOps)。 - 触发器:选择 When alert is created(创建提醒时)。
- 操作:从列表中选择 Run playbook(运行剧本)。
- 选择为提醒创建的 Logic App (
Sentinel-Alerts-to-SecOps)。
- 名称:输入自动化规则的名称(例如
- 点击应用 。
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。