结构: Simple
Abstraction: Base
状态: Draft
被利用可能性: High
The use of a hard-coded cryptographic key significantly increases the possibility that encrypted data may be recovered.
cwe_Nature: ChildOf cwe_CWE_ID: 798 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 798 cwe_View_ID: 699 cwe_Ordinal: Primary
Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Access Control | ['Bypass Protection Mechanism', 'Gain Privileges or Assume Identity'] | If hard-coded cryptographic keys are used, it is almost certain that malicious users will gain access through the account in question. |
策略:
Prevention schemes mirror that of hard-coded password storage.
The following code examples attempt to verify a password using a hard-coded cryptographic key.
bad C
bad Java
bad C#
The cryptographic key is within a hard-coded string value that is compared to the password. It is likely that an attacker will be able to read the key and compromise the system.
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
CLASP | Use of hard-coded cryptographic key | ||
OWASP Top Ten 2007 | A8 | CWE More Specific | Insecure Cryptographic Storage |
OWASP Top Ten 2007 | A9 | CWE More Specific | Insecure Communications |
OWASP Top Ten 2004 | A8 | CWE More Specific | Insecure Storage |
Software Fault Patterns | SFP33 | Hardcoded sensitive data |