返回 MCP 目录
public公开dns本地运行

sentinel-queries

该项目提供了一系列KQL查询,用于检测Azure AD租户中与BloodHound BARK工具包相关的滥用行为。这些查询旨在识别BARK模拟的行为,而非工具本身的使用。内容包括针对不同BARK功能的检测查询、控制建议以及相关资源链接。

article

README

🚀 BARK

BARK 是一款用于检测 Azure Active Directory (Azure AD) 中潜在特权提升攻击的工具。它通过分析 Microsoft Sentinel 中的审核日志,能够精准识别异常或高风险活动,为系统安全保驾护航。

🚀 快速开始

以下将详细介绍 BARK 在不同场景下的检测查询方法以及控制/预防措施。

✨ 主要特性

  • 可对 Azure Active Directory (Azure AD) 进行潜在特权提升攻击检测。
  • 通过分析 Microsoft Sentinel 中的审核日志识别异常或高风险活动。

💻 使用示例

基础用法

检测查询(用户作为行为者,用户作为目标)

AuditLogs
| where OperationName == "Add member to group"
| extend Actor = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend ['Actor IP Address'] = tostring(parse_json(tostring(InitiatedBy.user)).ipAddress)
| extend GroupName = tostring(parse_json(tostring(parse_json(tostring(TargetResources[0].modifiedProperties))[1].newValue)))
| where TargetResources[0].type == "User"
| extend Target = tostring(TargetResources[0].userPrincipalName)
| where GroupName in~ ("PrivilegedGroup1","PrivilegedGroup2")
| project TimeGenerated, OperationName, Actor, ['Actor IP Address'], Target, GroupName

检测查询(用户作为行为者,服务主体作为目标)

AuditLogs
| where OperationName == "Add member to group"
| extend Actor = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend ['Actor IP Address'] = tostring(parse_json(tostring(InitiatedBy.user)).ipAddress)
| extend GroupName = tostring(parse_json(tostring(parse_json(tostring(TargetResources[0].modifiedProperties))[1].newValue)))
| where TargetResources[0].type == "ServicePrincipal"
| where GroupName in~ ("PrivilegedGroup1","PrivilegedGroup2")
| project TimeGenerated, OperationName, Actor, ['Actor IP Address'], ['Target Service Principal Name'], ['Target Service Principal ObjectId'], GroupName

检测查询(服务主体作为行为者,用户作为目标)

AuditLogs
| where OperationName == "Add member to group"
| extend ['Actor Service Principal Name'] = tostring(parse_json(tostring(InitiatedBy.app)).displayName)
| extend ['Actor Service Principal ObjectId'] = tostring(parse_json(tostring(InitiatedBy.app)).servicePrincipalId)
| where isnotempty(['Actor Service Principal ObjectId'])
| where ['Actor Service Principal Name'] != "MS-PIM"
| where TargetResources[0].type == "User"
| where GroupName in~ ("PrivilegedGroup1","PrivilegedGroup2")
| extend Target = tostring(TargetResources[0].userPrincipalName)
| project TimeGenerated, OperationName, ['Actor Service Principal Name'], ['Actor Service Principal ObjectId'], Target, GroupName

检测查询(服务主体作为行为者,服务主体作为目标)

AuditLogs
| where OperationName == "Add member to group"
| extend ['Actor Service Principal Name'] = tostring(parse_json(tostring(InitiatedBy.app)).displayName)

🔧 控制/预防

文档中未提及具体的控制/预防内容,但在实际使用 BARK 时,可根据检测结果及时采取相应的安全措施,如限制异常用户或服务主体的权限等。

📚 相关链接

文档中未给出具体的相关链接,若有需要可进一步补充相关资源链接,以便用户获取更多信息。

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端