LasCC/MicrosoftSentinel-Userscript
GitHub: LasCC/MicrosoftSentinel-Userscript
一款为Microsoft Sentinel和Defender高级狩猎页面添加威胁查询菜单的Tampermonkey用户脚本,整合多个社区KQL规则源实现快速查询注入。
Stars: 0 | Forks: 0
# Microsoft Sentinel & Defender:威胁狩猎查询
Tampermonkey 用户脚本,为 **Microsoft Sentinel** 和 **Microsoft Defender** 高级狩猎页面添加威胁狩猎查询菜单。
浏览、搜索、固定并直接将 KQL 查询注入到 Monaco 编辑器中。
## 截图
| Defender (暗色模式) | Sentinel | Sentinel (弹窗) |
|---|---|---|
|  |  |  |
## 功能特性
- 命令栏中的内嵌“威胁狩猎查询”按钮
- 标签页:**User Rules**(内置)、**Reprise99**、**Bert-JanP**、**FalconFriday**(从 GitHub 获取)
- 类别筛选标签,用于在每个仓库标签页内快速筛选
- 支持跨查询名称、描述、类别和 KQL 内容进行搜索
- 固定查询以便快速访问(结果上方的水平胶囊栏)
- 点击任意查询行将其注入编辑器
- 同时适用于 Sentinel (reactblade iframe) 和 Defender (security.microsoft.com)
- 通过 Azure Portal CSS 变量支持亮色/暗色主题
## 安装
1. 安装 [Tampermonkey](https://www.tampermonkey.net/)
2. 点击 **[安装 Userscript](https://raw.githubusercontent.com/LasCC/MicrosoftSentinel-Userscript/main/dist/sentinel-userscript.user.js)** (在 Tampermonkey 中自动安装)
3. 前往 Sentinel 或 Defender 中的高级狩猎页面
## 公共规则来源
| 仓库 | 查询数 | 格式 |
|------|---------|--------|
| [reprise99/Sentinel-Queries](https://github.com/reprise99/Sentinel-Queries) | ~460 | `.kql` 文件 |
| [Bert-JanP/Hunting-Queries-Detection-Rules](https://github.com/Bert-JanP/Hunting-Queries-Detection-Rules) | ~445 | 带有 KQL 代码块的 `.md` 文件 |
| [FalconForceTeam/FalconFriday](https://github.com/FalconForceTeam/FalconFriday) | ~40 | 带有 KQL 代码块的 `.md` 文件 |
规则在首次点击标签页时延迟获取,并在本地缓存 12 小时。
## 构建
```
npm install
npm run build
```
输出:`dist/sentinel-userscript.user.js`
## 相关项目
- [SentinelOne Userscript](https://github.com/LasCC/SentinelOne-Userscript) - 针对 SentinelOne 的类似项目
标签:Azure, KQL, Kusto 查询语言, Microsoft Defender, Microsoft Sentinel, Monaco Editor, Tampermonkey, Threat Hunting, Userscript, 前端增强, 安全运营, 扫描框架, 数据可视化, 检测规则, 油猴脚本, 浏览器插件, 策略控制器, 网络安全, 网络资产发现, 自动化攻击, 防御工程, 隐私保护, 高级搜寻