Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
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
Tools/GitHubGitHub/george0papasotiriou/cve-2026-21009-ecdsa-nonce-reuse-in-iot-firmware-signing
IoT SecurityVulnerability AnalysisExploitationCryptographyLearning & EducationFirmware Analysis
GitHubgeorge0papasotiriou/cve-2026-21009-ecdsa-nonce-reuse-in-iot-firmware-signing

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

Share

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.

View Repository
1603 months agoNot yet reviewed

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

Program Code (Python)

# 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 – ECDSA Nonce Reuse in IoT Firmware Signing

Severity: Critical

Overview

An IoT device signs firmware updates using ECDSA, but due to a weak random number generator, the same nonce (k) is reused for two signatures. An attacker who observes both signatures can compute the private key and sign malicious firmware.

Vulnerability Details

  • Type: Cryptographic Key Recovery
  • Impact: Full bypass of firmware authentication.
  • Root Cause: Nonce reuse breaks ECDSA: given two signatures with the same k, the private key can be derived algebraically.

Exploit Demonstration

Run the simulation:

pip install ecdsa
python ecdsa_nonce_reuse_sim.py

The script demonstrates the creation of two signatures with the same k. A real attacker would recover the key using the formula k = (h1 - h2) / (s1 - s2) and then d = (s1*k - h1) / r.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    647
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    421
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    389
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    333
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    331

Explore all tools

Browse our collection of tools

View all tools →