Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-21009-ECDSA-Nonce-Reuse-in-IoT-Firmware-Signing — Educational Python simulation demonstrating ECDSA nonce reuse in IoT firmware signing, showing how an attacker can recover private keys from two signatures sharing the same k. | Kitploit
工具/GitHubGitHub/george0papasotiriou/cve-2026-21009-ecdsa-nonce-reuse-in-iot-firmware-signing
物联网安全漏洞分析漏洞利用密码学学习与教育固件分析
GitHubgeorge0papasotiriou/cve-2026-21009-ecdsa-nonce-reuse-in-iot-firmware-signing

CVE-2026-21009-ECDSA-Nonce-Reuse-in-IoT-Firmware-Signing

Educational Python simulation demonstrating ECDSA nonce reuse in IoT firmware signing, showing how an attacker can recover private keys from two signatures sharing the same k.

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
17天前尚未审核

CVE-2026-21009 – IoT 固件签名中的 ECDSA Nonce 重用

程序代码(Python)

root@kitploit:~
# ecdsa_nonce_reuse_sim.py - Signing firmware with repeated nonce (k)
import ecdsa, hashlib

sk = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p)
vk = sk.get_verifying_key()

# Sign two different firmware images with same nonce due to bad RNG
# In reality, this can happen with deterministic k if seed is constant.
# We'll simulate by using the same k manually (not possible with ecdsa library, so fake it)
def sign_with_fixed_k(sk, msg_hash, k):
    # Simplified: return signature (r,s) using fixed k (for educational purposes)
    # Not actual ECDSA, but shows concept.
    r = (k * ecdsa.NIST256p.generator).x()
    k_inv = pow(k, -1, ecdsa.NIST256p.order)
    s = k_inv * (int.from_bytes(msg_hash, 'big') + r * sk.privkey.secret_multiplier) % ecdsa.NIST256p.order
    return ecdsa.ecdsa.Signature(r, s)

msg1 = b"Firmware v1.0"
msg2 = b"Firmware v2.0"
h1 = hashlib.sha256(msg1).digest()
h2 = hashlib.sha256(msg2).digest()

# Use same k
k = 123456789
sig1 = sign_with_fixed_k(sk, h1, k)
sig2 = sign_with_fixed_k(sk, h2, k)

print("Two signatures with same k. Attacker can recover private key from (r,s1) and (r,s2).")

CVE-2026-21009 – IoT 固件签名中的 ECDSA Nonce 重用

Severity: Critical

概述

某 IoT 设备使用 ECDSA 对固件更新进行签名,但由于随机数生成器薄弱,两个签名复用了同一个 nonce(k)。观察到这两个签名的攻击者可以计算出私钥,并签署恶意固件。

漏洞详情

  • 类型: 加密密钥恢复
  • 影响: 完全绕过固件身份验证。
  • 根本原因: Nonce 重用会破坏 ECDSA:给定两个使用相同 k 的签名,可以通过代数方法推导出私钥。

漏洞利用演示

运行模拟:

root@kitploit:~
pip install ecdsa
python ecdsa_nonce_reuse_sim.py

该脚本演示了使用相同 k 创建两个签名的过程。真实的攻击者会利用公式 k = (h1 - h2) / (s1 - s2) 恢复密钥,然后通过 d = (s1*k - h1) / r 计算私钥。

下载工具