StrongWind1/Kerberos
GitHub: StrongWind1/Kerberos
一份关于 Active Directory 中 Kerberos 认证协议、配置与攻击技术的全面参考指南。
Stars: 1 | Forks: 0
Kerberos 在 Active Directory 中
Kerberos 在 Active Directory 中的协议内部机制、安全配置和攻击技术。 ## 快速开始 **RC4 强制实施从 2026 年 4 月开始。** 没有明确设置 `msDS-SupportedEncryptionTypes` 的账户将无法获取 RC4 票据。2026 年 7 月将变为永久且不可回滚。修复方法是两个设置:每个承载 SPN 的账户上设置 `msDS-SupportedEncryptionTypes = 24`,以及每个域控制器上设置 `DefaultDomainSupportedEncTypes = 24`。 不确定域的状态如何?[快速入门指南](https://strongwind1.github.io/Kerberos/security/quick-start/) 涵盖了您需要了解的 5 分钟内容。准备好运行迁移了吗?直接前往 [标准化指南](https://strongwind1.github.io/Kerberos/security/aes-standardization/)。 ## 协议 Kerberos 在 Active Directory 中的实际工作原理。线协议、票据结构、密钥派生,基于 RFC 4120 和 MS-KILE 规范。 | 页面 | 涵盖内容 | |---|---| | [活动目录组件](https://strongwind1.github.io/Kerberos/protocol/active-directory/) | 域控制器、KDC、全局编录,以及 AD 如何映射到 Kerberos 概念 | | [主体与域](https://strongwind1.github.io/Kerberos/protocol/principals/) | UPN、SPN、域信任和主体命名约定 | | [协议概述](https://strongwind1.github.io/Kerberos/protocol/overview/) | 三方模型以及完整的 AS/TGS/AP 票据交换流程 | | [AS 交换](https://strongwind1.github.io/Kerberos/protocol/as-exchange/) | TGT 获取、预认证、PA-ETYPE-INFO2 以及 krbtgt 密钥 | | [TGS 交换](https://strongwind1.github.io/Kerberos/protocol/tgs-exchange/) | 服务票据颁发、etypes 选择以及 KDC 的决策逻辑 | | [AP 交换](https://strongwind1.github.io/Kerberos/protocol/ap-exchange/) | 认证器构造、双向认证和会话密钥建立 | | [票据结构](https://strongwind1.github.io/Kerberos/protocol/tickets/) | 线格式、PAC 内容、PAC 签名以及 KB5008380 的影响 | | [预认证](https://strongwind1.github.io/Kerberos/protocol/preauth/) | PA-DATA 类型、FAST 封装以及预认证被禁用时的情况 | | [加密类型](https://strongwind1.github.io/Kerberos/protocol/encryption/) | DES、RC4、AES128、AES256:密钥派生、用法与协商规则 | | [S4U 扩展](https://strongwind1.github.io/Kerberos/protocol/s4u/) | S4U2Self、S4U2Proxy、FORWARDABLE 标志以及 RBCD 与约束性委派 | | [跨域认证](https://strongwind1.github.io/Kerberos/protocol/cross-realm/) | 森林间引用、信任密钥和跨域票据流程 | | [委派](https://strongwind1.github.io/Kerberos/protocol/delegation/) | 无约束委派、约束委派和资源约束委派 | ## 安全 RC4 弃用截止日期为 2026 年 4 月,强制实施在 7 月。本节介绍如何审核域、配置内容以及在影响发生前进行迁移。 ### 加密 | 页面 | 涵盖内容 | |---|---| | [加密协商](https://strongwind1.github.io/Kerberos/security/etype-negotiation/) | KDC、客户端和服务账户标志如何组合以选择 etype | | [Etype 决策指南](https://strongwind1.github.io/Kerberos/security/etype-decision-guide/) | 决定票据中 etype 的全部 12 个输入 | | [算法与密钥](https://strongwind1.github.io/Kerberos/security/algorithms/) | DES / RC4 / AES 密钥派生、破解速度比较以及双重重置问题 | ### 配置 | 页面 | 涵盖内容 | |---|---| | [msDS-SupportedEncryptionTypes](https://strongwind1.github.io/Kerberos/security/msds-supported/) | 比特标志、每种账户类型的默认值、批量查询和批量更新脚本 | | [注册表设置](https://strongwind1.github.io/Kerberos/security/registry/) | DC 和客户端上与 Kerberos 相关的每个注册表值及安全默认值 | | [注册表审计](https://strongwind1.github.io/Kerberos/security/registry-audit/) | 实验室验证的注册表参考及每个键的观察行为 | | [组策略](https://strongwind1.github.io/Kerberos/security/group-policy/) | 影响 Kerberos 的 GPO 设置、覆盖优先级以及注意事项 | ### 强化 | 页面 | 涵盖内容 | |---|---| | [RC4 弃用](https://strongwind1.github.io/Kerberos/security/rc4-deprecation/) | CVE-2026-20833 时间线、Kdcsvc 事件 201-209 以及预强制检查清单 | | [审核 Kerberos 密钥](https://strongwind1.github.io/Kerberos/security/account-key-audit/) | 在强制实施前查找具有弱密钥或缺失密钥的账户 | | [标准化指南](https://strongwind1.github.io/Kerberos/security/aes-standardization/) | AES 迁移操作手册:两条路径、每个命令及每个验证步骤 | | [缓解措施](https://strongwind1.github.io/Kerberos/security/mitigations/) | 按影响排序的防御措施,从 gMSA 部署到 KRBTGT 轮换 | ### 参考 | 页面 | 涵盖内容 | |---|---| | [故障排除](https://strongwind1.github.io/Kerberos/security/troubleshooting/) | 常见 Kerberos 错误、事件 ID 以及诊断流程 | | [快速入门指南](https://strongwind1.github.io/Kerberos/security/quick-start/) | 带图表的加密类型概述,适合想要快速了解的用户 | ## 交互式工具 | 工具 | 功能 | |---|---| | [加密类型计算器](https://strongwind1.github.io/Kerberos/security/etype-calculator/) | 根据账户标志和注册表设置计算获胜的 etype | | [事件解码器](https://strongwind1.github.io/Kerberos/security/event-decoder/) | 将 Kerberos 事件日志条目(ID 4768、4769、4770)解码为可读输出 | ## 攻击 涵盖足够详细以理解其原理的每种主要 Kerberos 攻击,而不仅仅是运行工具的方法。 ### 脱机凭证破解(烘烤) | 攻击 | 目标 | 哈希破解模式 | |---|---|---| | [Kerberoasting](https://strongwind1.github.io/Kerberos/attacks/roasting/kerberoasting/) | TGS-REP enc-part(用户服务账户密钥) | 13100(RC4),19700(AES256) | | [AS-REP 烘烤](https://strongwind1.github.io/Kerberos/attacks/roasting/asrep-roasting/) | AS-REP enc-part(无预认证账户) | 18200(RC4),32200(AES256) | | [AS-REQ 烘烤](https://strongwind1.github.io/Kerberos/attacks/roasting/asreq-roasting/) | PA-ENC-TIMESTAMP(被动捕获) | 7500(RC4),19900(AES256) | ### 凭证盗窃 | 攻击 | 滥用的对象 | |---|---| | [传递票据](https://strongwind1.github.io/Kerberos/attacks/credential-theft/pass-the-ticket/) | 窃取 TGT 或服务票据并注入到会话中 | | [传递密钥](https://strongwind1.github.io/Kerberos/attacks/credential-theft/pass-the-key/) | 直接使用 RC4/AES 密钥而无需明文密码 | | [密码喷洒](https://strongwind1.github.io/Kerberos/attacks/credential-theft/password-spraying/) | 以 AS-REQ 预认证失败作为低噪声枚举手段 | | [用户枚举](https://strongwind1.github.io/Kerberos/attacks/credential-theft/user-enumeration/) | 通过 KDC 错误代码区分有效与无效用户名 | ### 票据伪造 | 攻击 | 伪造内容 | |---|---| | [黄金票据](https://strongwind1.github.io/Kerberos/attacks/forgery/golden-ticket/) | 使用 krbtgt 密钥的任意 TGT | | [白银票据](https://strongwind1.github.io/Kerberos/attacks/forgery/silver-ticket/) | 使用目标账户密钥的任意服务票据 | | [钻石票据](https://strongwind1.github.io/Kerberos/attacks/forgery/diamond-ticket/) | 带有伪造 PAC 的合法 TGT 修改版 | | [蓝宝石票据](https://strongwind1.github.io/Kerberos/attacks/forgery/sapphire-ticket/) | 通过 SU2Self 携带合法 PAC 的伪造 TGT | ### 委派滥用 | 攻击 | 滥用的对象 | |---|---| | [委派攻击](https://strongwind1.github.io/Kerberos/attacks/delegation/delegation-attacks/) | 无约束委派、约束委派和 RBCD 配置错误 | | [S4U2Self 滥用](https://strongwind1.github.io/Kerberos/attacks/delegation/s4u2self-abuse/) | 计算机账户的 S4U 用于本地权限提升 | | [SPN 劫持](https://strongwind1.github.io/Kerberos/attacks/delegation/spn-jacking/) | 通过移动 SPN 到其他账户进行委派重定向 | ## 开发 ``` git clone https://github.com/StrongWind1/Kerberos.git cd Kerberos uv sync --group docs # install dependencies uv run --group docs mkdocs serve # live preview at http://127.0.0.1:8000 uv run --group docs mkdocs build --strict # full build with link checking ``` ## 许可证 [Apache License 2.0](LICENSE)标签:Active Directory, AES, Apache License 2.0, CI, DefaultDomainSupportedEncTypes, GitHub Advanced Security, KDC, MkDocs, msDS-SupportedEncryptionTypes, Plaso, RC4, TGT, 加密类型, 协议分析, 协议逆向工程, 合规配置, 域控制器, 安全加固, 安全治理, 安全配置, 密钥派生, 开源框架, 快速迁移指南, 持续集成, 攻击技术, 攻防演练, 文档生成, 权限提升, 标准化指南, 模拟器, 票据授予票据, 网络认证, 自定义脚本, 认证协议, 逆向工具, 防御加固