RayRRT/ESC1-unPAC

GitHub: RayRRT/ESC1-unPAC

一个用于执行完整ESC1攻击链的Beacon Object File,在单次执行中完成证书请求、PKINIT认证和NT哈希提取。

Stars: 116 | Forks: 19

# ESC1-unPAC BOF 请求具有任意 SAN(以及用于绕过 [KB5014754](https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16) 即 Strong Mapping 的 SID)的证书,通过 PKINIT 进行身份验证,并提取 NT hash ## 演示 ### Havoc: https://github.com/user-attachments/assets/806cfbed-2d64-4256-bc2b-0f93bc6c8e08 ### CS: https://github.com/user-attachments/assets/9ecfdfbc-4300-482e-9229-69d7fcd6dcd8 ## 功能 | 功能 | 描述 | |---------|-------------| | **ESC1 Exploitation** | 请求具有任意 Subject Alternative Name 的证书 | | **KB5014754 Bypass** | 自动包含 SID 以实现 Strong Certificate Mapping | | **PKINIT Authentication** | 完整实现 RFC 4556 及 DH key exchange | | **UnPAC-the-hash** | 从 PAC credentials 中提取 NT hash | | **U2U Fallback** | 当 PA-PAC-CREDENTIALS 不可用时的 User-to-User 回退机制 | | **Single BOF** | 一条命令完成完整攻击链 | | **Rubeus Compatible** | Kirbi 输出兼容 Rubeus/Mimikatz | ## 构建 ``` git clone https://github.com/RayRRT/ESC1-unPAC.git && cd ESC1-unPAC && chmod +x build.sh && ./build.sh ``` ## 用法 ### Havoc 1. Scripts → Load Script → `havoc/esc1-unpac.py` ### Cobalt Strike 1. Script Manager → Load → `cobaltstrike/esc1-unpac.cna` ### 命令 ``` esc1-unpac