Weak Cryptography for Passwords |
Weakness ID: 261 (Weakness Variant) | Status: Incomplete |
Description Summary
Example 1
The following code reads a password from a properties file and uses the password to connect to a database.
This code will run successfully, but anyone with access to config.properties can read the value of password and easily determine that the value has been base 64 encoded. If a devious employee has access to this information, they can use it to break into the system.
Example 2
The following code reads a password from the registry and uses the password to create a new network credential.
This code will run successfully, but anyone who has access to the registry key used to store the password can read the value of password. If a devious employee has access to this information, they can use it to break into the system.
Passwords should be encrypted with keys that are at least 128 bits in length for adequate security. |
Password management issues occur when a password is stored in plaintext in an application's properties or configuration file. A programmer can attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password. The "crypt" family of functions uses weak cryptographic algorithms and should be avoided. It may be present in some projects for compatibility. |
Nature | Type | ID | Name | View(s) this relationship pertains to |
---|---|---|---|---|
ChildOf | Category | 254 | Security Features | Seven Pernicious Kingdoms (primary)700 |
ChildOf | Category | 255 | Credentials Management | Development Concepts (primary)699 |
ChildOf | Weakness Class | 326 | Inadequate SecurityDatabase\Encrypt\Encryption Strength | Development Concepts699 Research Concepts (primary)1000 |
ChildOf | Category | 729 | OWASP Top Ten 2004 Category A8 - Insecure Storage | Weaknesses in OWASP Top Ten (2004) (primary)711 |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
7 Pernicious Kingdoms | Password Management: Weak Cryptography | ||
OWASP Top Ten 2004 | A8 | CWE More Specific | Insecure Storage |
CAPEC-ID | Attack Pattern Name | (CAPEC Version: 1.4) |
---|---|---|
55 | Rainbow Table Password Cracking |
J. Viega and G. McGraw. "Building Secure Software: How to Avoid Security Problems the Right Way". 2002. |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
7 Pernicious Kingdoms | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-08-15 | Veracode | External | ||
Suggested OWASP Top Ten 2004 mapping | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Other Notes, Taxonomy Mappings | ||||
2009-07-27 | CWE Content Team | MITRE | Internal | |
updated Demonstrative Examples |