开源项目 Sentinel-Queries 使用教程
Sentinel-Queries Collection of KQL queries 项目地址: https://gitcode.com/gh_mirrors/se/Sentinel-Queries
1. 项目介绍
Sentinel-Queries 是一个开源项目,它收集了大量的 Kusto 查询语言(KQL)查询示例。这些查询主要用于 Microsoft Sentinel,可以帮助安全分析师在 Azure Sentinel 中发现威胁、检测模式和分析异常。KQL 是 Azure Monitor、Azure Data Explorer 和 Azure Log Analytics(Azure Sentinel 底层的组件)使用的查询语言。
2. 项目快速启动
要开始使用 Sentinel-Queries,请按照以下步骤操作:
首先,确保您已经安装了 Azure Sentinel 和相关的 Kusto 工具。
# 克隆项目仓库
git clone https://github.com/reprise99/Sentinel-Queries.git
# 进入项目目录
cd Sentinel-Queries
接下来,您可以选择一个查询示例,例如 Anamoly-HigherThanExpectedSysLog.kql
,并在 Azure Sentinel 中运行它。
# 在 Azure Sentinel 中运行查询
SigninLogs
| where TimeGenerated > ago(14d)
| where UserPrincipalName == "reprise_99@testdomain.com"
| where ResultType == "0"
| where AppDisplayName == "Microsoft Teams"
| project TimeGenerated, Location, IPAddress, UserAgent
这个查询将会返回过去 14 天内,用户 reprise_99@testdomain.com
成功登录到 Azure AD 并使用 Microsoft Teams 应用的记录。
3. 应用案例和最佳实践
应用案例
- 异常检测:使用 KQL 查询检测系统日志中的异常模式。
- 安全事件分析:分析安全事件日志,识别潜在的安全威胁。
- 用户行为分析:跟踪用户行为,检测异常登录活动。
最佳实践
- 时间过滤:在查询中尽早使用时间过滤,以提高查询效率。
- 精确匹配:使用
==
进行精确匹配,对于不区分大小写的匹配使用=~
。 - 字段投影:仅选择需要的字段,以减少查询结果的数据量。
4. 典型生态项目
- Azure Sentinel:用于企业级安全操作的 Azure 服务。
- Kusto Explorer:一个强大的 KQL 查询工具,用于 Azure Data Explorer 和 Azure Log Analytics。
- Log Analytics:提供强大的日志搜索和数据分析功能。
以上是 Sentinel-Queries 项目的使用教程。希望这些信息能帮助您更好地利用 KQL 查询来加强您的安全分析能力。
Sentinel-Queries Collection of KQL queries 项目地址: https://gitcode.com/gh_mirrors/se/Sentinel-Queries
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考