Sentinel Queries
S

Sentinel Queries

This project provides a series of KQL queries to detect abuse behaviors related to the BloodHound BARK toolkit in Azure AD tenants. These queries aim to identify behaviors simulated by BARK rather than the use of the tool itself. The content includes detection queries for different BARK functions, control suggestions, and relevant resource links.
2 points
7.7K

What is BARK Detection?

These detection queries help identify suspicious activities in Azure AD that could indicate privilege escalation attempts, similar to what the BARK toolkit can perform. They monitor for actions like password resets, credential additions, role assignments and other sensitive operations.

How to Use These Detections?

The queries should be run in Microsoft Sentinel or Log Analytics against your Azure AD logs. It's recommended to first test them in your environment to tune for accuracy.

When to Use These Detections?

Use these queries for continuous monitoring of your Azure AD environment, especially if you have privileged users/service principals or want to detect potential compromise.

Key Detection Capabilities

Password Reset Detection
Identifies password reset operations performed via PowerShell which could indicate compromise.
Application Secret Creation
Detects when new credentials are added to application objects.
Role Assignment Monitoring
Tracks when users or service principals are added to privileged roles.
Ownership Changes
Monitors for changes to owners of applications and service principals.
Strengths
Provides visibility into potential privilege escalation paths
Covers both user and service principal activities
Uses native Azure AD logs requiring no additional instrumentation
Helps detect abuse of legitimate tools and permissions
Limitations
May generate false positives in environments with legitimate automation
Requires tuning to match your specific environment
Only detects actions after they occur (not preventive)
Some legitimate admin activities may appear similar to malicious ones

Implementation Guide

Set up logging
Ensure Azure AD logs are being collected in your Log Analytics workspace.
Test queries
Run the detection queries against your environment to establish baselines.
Create alerts
Configure alerts for suspicious activities in Microsoft Sentinel.
Implement controls
Apply the recommended prevention controls from the documentation.

Detection Scenarios

Detecting Application Secret Creation
Monitoring when new credentials are added to applications, which could allow attackers to persist in the environment.
Identifying Suspicious Role Assignments
Detecting when service principals are added to privileged roles, which could indicate privilege escalation.

Frequently Asked Questions

Are these queries specific to the BARK toolkit?
How often should I run these detection queries?
What permissions do I need to use these detections?
How can I reduce false positives?

Additional Resources

BloodHound BARK GitHub
The official BARK toolkit repository
Azure AD Privilege Escalation Detection
Blog post on detecting Azure AD privilege escalation
Microsoft Azure AD Documentation
Official Microsoft documentation for Azure Active Directory

Installation

Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

A
Aderyn
Aderyn is an open - source Solidity smart contract static analysis tool written in Rust, which helps developers and security researchers discover vulnerabilities in Solidity code. It supports Foundry and Hardhat projects, can generate reports in multiple formats, and provides a VSCode extension.
Rust
6.1K
5 points
M
MCP Scan
MCP-Scan is a security scanning tool for MCP servers, used to detect common security vulnerabilities such as prompt injection, tool poisoning, and cross-domain escalation.
Python
15.8K
5 points
A
Agentic Radar
Agentic Radar is a security scanning tool for analyzing and assessing agentic systems, helping developers, researchers, and security experts understand the workflows of agentic systems and identify potential vulnerabilities.
Python
13.0K
5 points
E
Edgeone Pages MCP Server
EdgeOne Pages MCP is a service that quickly deploys HTML content to EdgeOne Pages via the MCP protocol and obtains a public URL
TypeScript
16.1K
4.8 points
K
Kubernetes
An MCP server based on Kubernetes for managing and operating Kubernetes clusters
TypeScript
9.7K
5 points
A
Awslabs Cost Analysis MCP Server
The AWS MCP Servers are a set of dedicated servers based on the Model Context Protocol, offering various AWS-related functions, including document retrieval, knowledge base query, CDK best practices, cost analysis, image generation, etc., aiming to enhance the integration of AI applications with AWS services through a standardized protocol.
Python
13.4K
5 points
M
MCP K8s Go
An MCP server based on Golang for connecting to Kubernetes clusters, providing resource query and operation functions.
Go
10.1K
4 points
I
Ida Pro MCP
Certified
IDA Pro MCP is a server plugin for reverse engineering. It interacts with client tools through the MCP protocol, providing functions such as function analysis, comment modification, variable renaming, etc., and supports multiple MCP clients such as Cline, Roo Code, etc.
Python
17.3K
5 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
15.0K
4.5 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
24.0K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
17.0K
4.3 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
45.0K
4.3 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
20.5K
5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
45.5K
4.5 points
M
Minimax MCP Server
The MiniMax Model Context Protocol (MCP) is an official server that supports interaction with powerful text-to-speech, video/image generation APIs, and is suitable for various client tools such as Claude Desktop and Cursor.
Python
31.0K
4.8 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
15.1K
4.5 points
AIBase
Zhiqi Future, Your AI Solution Think Tank
© 2025AIBase