针对 Meshtastic 直接消息中 CVE-2025-52464 的纯软件概念验证
本项目是一个纯软件概念验证,演示 CVE-2025-52464,这是影响 Meshtastic 固件版本 2.5.0 至 2.6.10 的一个漏洞。
该实现复现了受影响固件的加密行为,并演示了重复或低熵的加密密钥如何使攻击者能够解密加密的直接消息(DM)。它还演示了固件版本 2.6.11 中引入的修复行为,在该版本中,正确的密钥生成和低熵密钥检测可阻止此类攻击。
crypto_engine.py Cryptographic operations (X25519, HKDF, AES-GCM)
node.py Simulated Meshtastic node
packet.py Encrypted Direct Message packet
attacker.py Passive attacker simulation
security_checker.py Low-entropy public key detection
compromised_keys.py Database of compromised public keys
simulation.py Coordinates the complete simulation
demo.py Runs the vulnerable and patched demonstrations
test_node.py
test_packet.py
test_vulnerable_key.py
test_attacker_decrypt.py
test_fixed_case.py
创建虚拟环境(可选):
python -m venv venv
激活虚拟环境。
Windows:
venv\Scripts\activate
安装所需软件包:
pip install -r requirements.txt
执行:
python demo.py
该演示会执行两个实验:
存在漏洞的固件
已修复的固件
以下脚本可以独立执行:
python test_node.py
python test_packet.py
python test_vulnerable_key.py
python test_attacker_decrypt.py
python test_fixed_case.py
本项目是作为达姆施塔特工业大学(Technische Universität Darmstadt)的安全移动网络实验室(SEEMOO)在2026年夏季学期开设的网络安全课程的加分项目而开发的。
该项目仅供教育和研究目的使用。该实现通过模拟导致该漏洞的加密工作流程,为 CVE-2025-52464 提供了一个纯软件概念验证。它并未实现完整的 Meshtastic 固件、LoRa 物理层或完整的 Meshtastic 通信协议栈。
本项目旨在帮助学习和理解安全密钥生成及加密漏洞,不得用于未经授权或恶意的活动。
Masoud Mehdipour
Network Security Bonus Challenge
Secure Mobile Networking Lab
TU Darmstadt