结构: Simple
Abstraction: Variant
状态: Incomplete
被利用可能性: High
Nonces should be used for the present occasion and only once.
Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Access Control | ['Bypass 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. |
策略:
Refuse to reuse nonce values.
策略:
Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.
This code takes a password, concatenates it with a nonce, then encrypts it before sending over a network:
bad C
Because the nonce used is always the same, an attacker can impersonate a trusted party by intercepting and resending the encrypted password. This attack avoids the need to learn the unencrypted password.
This code sends a command to a remote server, using an encrypted password and nonce to prove the command is from a trusted party:
bad C++
Once again the nonce used is always the same. An attacker may be able to replay previous legitimate commands or execute new arbitrary commands.
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
CLASP | Reusing a nonce, key pair in encryption |