目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1325

100%

CWE-323 在加密中重用Nonce与密钥对 类漏洞列表 31

CWE-323 在加密中重用Nonce与密钥对 类弱点 31 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-323 属于加密实现缺陷,指在加密过程中重复使用非对称密钥对或一次性随机数(Nonce)。攻击者利用此漏洞,通过捕获并重放旧加密数据,或结合已知明文分析,从而恢复敏感信息或伪造身份。开发者应确保每次加密操作均生成唯一且不可预测的 Nonce,并严格轮换密钥,避免状态复用,以保障数据的机密性与完整性。

MITRE CWE 官方描述
CWE:CWE-323 在加密中重用 Nonce、Key Pair 英文:Nonce 应当仅用于当前场景,且只能使用一次。
常见影响 (1)
Access ControlBypass Protection Mechanism, Gain Privileges or Assume Identity
Potentially a replay attack, in which an attacker could send the same data twice, could be crafted if nonces are allowed to be reused. This could allow a user to send a message which masquerades as a valid message from a valid user.
缓解措施 (2)
ImplementationRefuse to reuse nonce values.
ImplementationUse techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.
代码示例 (2)
This code takes a password, concatenates it with a nonce, then encrypts it before sending over a network:
void encryptAndSendPassword(char *password){ char *nonce = "bad"; ... char *data = (unsigned char*)malloc(20); int para_size = strlen(nonce) + strlen(password); char *paragraph = (char*)malloc(para_size); SHA1((const unsigned char*)paragraph,parsize,(unsigned char*)data); sendEncryptedData(data) }
Bad · C
This code sends a command to a remote server, using an encrypted password and nonce to prove the command is from a trusted party:
String command = new String("some command to execute"); MessageDigest nonce = MessageDigest.getInstance("SHA"); nonce.update(String.valueOf("bad nonce")); byte[] nonce = nonce.digest(); MessageDigest password = MessageDigest.getInstance("SHA"); password.update(nonce + "secretPassword"); byte[] digest = password.digest(); sendCommand(digest, command)
Bad · C++
CVE ID标题CVSS风险等级Published
CVE-2017-7902 多款Rockwell Automation产品安全漏洞 — Rockwell Automation Allen-Bradley MicroLogix 1100 and 1400 9.8 -2017-06-30

CWE-323(在加密中重用Nonce与密钥对) 是常见的弱点类别,本平台收录该类弱点关联的 31 条 CVE 漏洞。