descambiado/entra-id-detection-engineering

GitHub: descambiado/entra-id-detection-engineering

针对Microsoft Entra ID身份攻击场景的KQL狩猎查询与SIGMA检测规则集合,由具备攻防双重视角的SOC分析师构建,覆盖完整身份攻击生命周期。

Stars: 2 | Forks: 0

# Entra ID 检测工程 针对 Microsoft Entra ID (Azure AD) 威胁场景的检测内容 —— 包含用于 Microsoft Sentinel 的 KQL 搜索查询,以及覆盖完整身份攻击生命周期的供应商中立 SIGMA 规则。 由一位首先从攻击者角度学习安全知识的 SOC 分析师构建。 ## 为什么会有这个代码库 大多数检测内容是由那些只阅读过攻击文章的人编写的。而本仓库的内容是由真正理解攻击实际运作机制的人编写的——包括规避逻辑、时机把握、攻击者犯下的运维安全错误,以及为什么标准检测会漏掉它们。 重点聚焦于 **Entra ID**,因为它是现代企业入侵事件中最受攻击的单一组件。在云优先环境中攻陷身份,就相当于在本地环境中掌控整个网络。这里的每一项检测都映射到了在 Storm-0558、Midnight Blizzard 和 AiTM 钓鱼活动等威胁组织的入侵后活动中观察到的真实技术。 ## MITRE ATT&CK 覆盖范围 | 技术 | 名称 | 检测项 | |-----------|------|------------| | T1528 | 窃取应用程序访问令牌 | [OAuth 同意高风险权限](detections/credential-access/oauth-consent-high-risk-permission.md) | | T1556.006 | 修改身份验证过程:多因素身份验证 | [来自未知 IP 的 MFA 注册](detections/persistence/mfa-registration-from-unseen-ip.md) · [管理员为用户注册 MFA](detections/persistence/admin-mfa-registration-for-user.md) · [身份验证方法策略被修改](detections/persistence/authentication-methods-policy-modified.md) | | T1098 | 账户操纵 | [跨租户访问设置被修改](detections/persistence/cross-tenant-access-setting-modified.md) | | T1098.003 | 账户操纵:额外的云凭证 | [来宾用户被添加到特权角色](detections/privilege-escalation/guest-user-added-to-privileged-role.md) · [短时间内批量分配角色](detections/privilege-escalation/bulk-role-assignments.md) | | T1078.004 | 有效账户:云账户 | [来自新国家/地区的登录伴随敏感操作](detections/privilege-escalation/sign-in-new-country-sensitive-operation.md) · [在工作时间外激活 PIM](detections/defense-evasion/pim-activation-outside-business-hours.md) | | T1562.001 | 削弱防御:禁用或修改工具 | [命名位置被删除或修改](detections/defense-evasion/named-location-deleted-or-modified.md) · [条件访问策略被禁用或删除](detections/defense-evasion/conditional-access-policy-disabled.md) | | T1484.002 | 域信任修改:信任修改 | [联合域被添加到租户](detections/defense-evasion/federated-domain-added.md) | ## 检测索引 ### 凭证访问 | 检测项 | 平台 | 严重性 | PR | |-----------|----------|----------|----| | [OAuth 同意高风险权限](detections/credential-access/oauth-consent-high-risk-permission.md) | Sentinel + SIGMA | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) · [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | ### 持久化 | 检测项 | 平台 | 严重性 | PR | |-----------|----------|----------|----| | [来自未知 IP 的 MFA 注册](detections/persistence/mfa-registration-from-unseen-ip.md) | Sentinel | 中 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14262) | | [管理员为其他用户注册了 MFA 方法](detections/persistence/admin-mfa-registration-for-user.md) | Sentinel + SIGMA | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14262) · [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | | [身份验证方法策略被修改](detections/persistence/authentication-methods-policy-modified.md) | SIGMA | 高 | [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | | [跨租户访问设置被修改](detections/persistence/cross-tenant-access-setting-modified.md) | SIGMA | 高 | [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | ### 权限提升 | 检测项 | 平台 | 严重性 | PR | |-----------|----------|----------|----| | [来宾用户被添加到特权 Entra ID 角色](detections/privilege-escalation/guest-user-added-to-privileged-role.md) | Sentinel + SIGMA | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) · [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | | [短时间内批量分配角色](detections/privilege-escalation/bulk-role-assignments.md) | Sentinel | 中 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14262) | | [来自新国家/地区的登录伴随敏感操作](detections/privilege-escalation/sign-in-new-country-sensitive-operation.md) | Sentinel | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14262) | ### 防御规避 | 检测项 | 平台 | 严重性 | PR | |-----------|----------|----------|----| | [命名位置被删除或修改](detections/defense-evasion/named-location-deleted-or-modified.md) | Sentinel + SIGMA | 中 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) · [SigmaHQ](https://github.com/SigmaHQ/sigma/pull/6012) | | [条件访问策略被禁用或删除](detections/defense-evasion/conditional-access-policy-disabled.md) | Sentinel | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) | | [在工作时间外激活 PIM 角色](detections/defense-evasion/pim-activation-outside-business-hours.md) | Sentinel | 中 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) | | [联合域被添加到租户 (Golden SAML)](detections/defense-evasion/federated-domain-added.md) | Sentinel | 高 | [Azure-Sentinel](https://github.com/Azure/Azure-Sentinel/pull/14240) | ## 方法论 本代码库中的每一项检测都遵循相同的流程: 1. **从攻击者的目标出发** —— 攻击者需要完成什么,以及实现该目标的最小足迹是什么? 2. **寻找突破口** —— Entra ID 总是会记录操作。问题在于标准检测是否查看了正确的字段、正确的关联时间窗口或正确的基线。 3. **构建基线** —— 异常胜过签名。来自新国家/地区的登录是噪音。来自新国家/地区的登录,*随后在一小时内执行了特权操作*,才是真正的信号。 4. **验证空白** —— 在编写之前,在目标代码库中搜索现有的覆盖范围。此处的每一项检测都经过验证,确实填补了真实的空白。 5. **刻意降低噪音** —— 对所有事情都发出警报的检测是毫无用处的。此处的每一个查询都具有特定的阈值、关联时间窗口或过滤器,以确保其可执行性。 ## 开源贡献 本代码库中的所有内容均已向上游贡献给社区: - **Microsoft Azure-Sentinel** — [github.com/Azure/Azure-Sentinel](https://github.com/Azure/Azure-Sentinel) - **SigmaHQ** — [github.com/SigmaHQ/sigma](https://github.com/SigmaHQ/sigma) ## 作者 **descambiado** — 专注于 Entra ID 身份威胁检测的 SOC 分析师。 拥有深厚的进攻性安全背景,现在致力于构建能够捕获我过去研究的攻击技术的检测机制。 [GitHub](https://github.com/descambiado)
标签:AMSI绕过, Azure AD, Azure Sentinel, IAM, KQL查询, MFA绕过, Microsoft Entra ID, Microsoft Sentinel, OAuth, SIGMA规则, 凭证访问, 协议分析, 多因素认证, 威胁检测, 安全运营, 扫描框架, 攻击生命周期, 权限提升, 红队思维, 网络安全, 身份与访问管理, 身份安全, 隐私保护