ilyess-sellami/KQL-Hunter

GitHub: ilyess-sellami/KQL-Hunter

面向 Microsoft Sentinel 的开源 KQL 威胁狩猎查询集合,与 MITRE ATT&CK 技术对齐,帮助安全团队快速构建检测能力。

Stars: 1 | Forks: 0

# KQL-Hunter **适用于 Microsoft Sentinel 的威胁狩猎 KQL 查询,与 MITRE ATT&CK 对齐** ![KQL](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/3d433262f8063809.png) ## 概述 **KQL Hunter** 是一个开源的 **Kusto Query Language (KQL)** 狩猎查询仓库,专为 **Microsoft Sentinel** 设计,并丰富了 **MITRE ATT&CK 映射**。它提供了一组经过整理的即用型狩猎查询,按领域(端点、网络、云等)组织,并映射到 MITRE ATT&CK 技术。 无论您是安全分析师、网络爱好者还是紫队从业者,KQL Hunter 都能通过一种与真实攻击对齐的结构化、实用方法,帮助您**检测威胁**、**演练检测场景**、**构建 SOC 用例**以及**学习威胁狩猎**。 ## KQL 介绍 ![KQL](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/dab376c605063810.png) **[KQL (Kusto Query Language)](https://learn.microsoft.com/en/kusto/query/?view=microsoft-fabric)** 是 **Azure Log Analytics** 和 **Microsoft Sentinel** 的查询语言。它允许您高效地搜索和分析结构化日志数据,以获取洞察并进行威胁狩猎。 **KQL 查询示例:** ``` SecurityEvent | where EventID == 4625 | summarize count() by Account, bin(TimeGenerated, 1h) | order by count_ ``` ## Microsoft Sentinel ![Microsoft Sentinel](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/2e6438691a063812.png) **[Microsoft Sentinel](https://www.microsoft.com/en/security/business/siem-and-xdr/microsoft-sentinel)** 是一种**云原生 SIEM/SOAR**,**使用 KQL 分析**您环境中的日志。 借助 KQL Hunter,您可以: - 检测可疑行为 - 构建关联规则 - 将查询映射到 MITRE ATT&CK 战术 - 分享并协作开展狩猎技术 ## MITRE ATT&CK 框架 ![MITRE ATT&CK Framework](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/be55decf6d063813.png) **[MITRE ATT&CK](https://attack.mitre.org)** 是一个全球通用的知识库,包含基于真实世界攻击的**对手战术**、**技术**和**程序**。 KQL Hunter 将每个狩猎查询与相关的 MITRE ATT&CK 战术和技术对齐,使防御者能够: - 理解攻击者行为 - 将检测映射到对手技术 - 改进威胁覆盖和报告 - 支持紫队和威胁建模活动 每个查询都包含如下参考信息: - **Tactic**(战术,例如:Initial Access, Execution) - **Technique ID**(技术 ID,例如:T1059) - **Technique name**(技术名称) ## 项目结构 该仓库的组织结构力求**简单**、**可扩展**且**易于贡献**。 ``` KQL-Hunter/ ├── queries/ │ ├── ta0001-initial-access/ │ ├── ta0002-execution/ │ ├── ta0003-persistence/ │ ├── ta0004-privilege-escalation/ │ ├── ta0005-defense-evasion/ │ ├── ta0006-credential-access/ │ ├── ta0007-discovery/ │ ├── ta0008-lateral-movement/ │ ├── ta0009-collection/ │ ├── ta0010-exfiltration/ │ └── ta0011-command-and-control/ ├── docs/ │ ├── KQL-Hunter.png │ ├── KQL.png │ ├── Microsoft-Sentinel.png │ └── MITRE.png ├── README.md └── LICENSE ``` ## MITRE ATT&CK 覆盖范围 `queries/` 下的每个文件夹代表一个 MITRE ATT&CK 战术,并包含相关的 KQL 狩猎查询。 | MITRE ATT&CK Tactic | Folder Name | Description | | -------------------- | ----------------------- | ---------------------------------------------- | | Initial Access | [`ta0001-initial-access/`](/queries/ta0001-initial-access/README.md) | 检测钓鱼、暴力破解、暴露的服务| | Execution | [`ta0002-execution/`](/queries/ta0002-execution/README.md) | PowerShell, CMD, 脚本执行 | | Persistence | [`ta0003-persistence/`](/queries/ta0003-persistence/README.md) | 注册表、计划任务、启动项滥用 | | Privilege Escalation | [`ta0004-privilege-escalation/`](/queries/ta0004-privilege-escalation/README.md) | UAC 绕过、令牌滥用 | | Defense Evasion | [`ta0005-defense-evasion/`](/queries/ta0005-defense-evasion/README.md) | 混淆、禁用日志 | | Credential Access | [`ta0006-credential-access/`](/queries/ta0006-credential-access/README.md) | LSASS, 密码喷射 | | Discovery | [`ta0007-discovery/`](/queries/ta0007-discovery/README.md) | 网络、账户、系统发现 | | Lateral Movement | [`ta0008-lateral-movement/`](/queries/ta0008-lateral-movement/README.md) | SMB, RDP, 远程执行 | | Collection | [`ta0009-collection/`](/queries/ta0009-collection/README.md) | 屏幕截图、剪贴板、数据暂存 | | Exfiltration | [`ta0010-exfiltration/`](/queries/ta0010-exfiltration/README.md) | 数据传输异常 | | Command and Control | [`ta0011-command-and-control/`](/queries/ta0011-command-and-control/README.md) | 信标、可疑出站流量 | ## 查询格式与元数据 每个 KQL 文件都遵循**标准结构**,以确保一致性和清晰度: ``` // Title: Suspicious PowerShell Execution // Description: Detects encoded or obfuscated PowerShell commands // Data Source: DeviceProcessEvents // MITRE ATT&CK: // Tactic: Execution // Technique: T1059.001 - PowerShell // Severity: Medium DeviceProcessEvents | where FileName =~ "powershell.exe" | where ProcessCommandLine contains "-enc" ``` ## 许可证 本项目采用 **[MIT License](LICENSE)** 授权。 您可以自由使用、修改和分享,但请注明出处。
标签:AMSI绕过, Azure, BSD, BurpSuite集成, Cloudflare, DNS解析, KQL, KQL 查询, Kusto Query Language, Microsoft Sentinel, MITRE ATT&CK, SOAR, 威胁检测, 开源项目, 数据挖掘, 端点安全, 网络安全, 补丁管理, 隐私保护