This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Password Plaintext Storage"

From OWASP
Jump to: navigation, search
m (fixes classification)
m (Moved page into the right category. See Java space page for me details. Content has not been reviewed in this edit.)
Line 93: Line 93:
 
[[Category:OWASP ASDR Project]]
 
[[Category:OWASP ASDR Project]]
 
[[Category:Sensitive Data Protection Vulnerability]]
 
[[Category:Sensitive Data Protection Vulnerability]]
[[Category:OWASP_Java_Project]]
+
[[Category:Java]]
 
[[Category:Code Snippet]]
 
[[Category:Code Snippet]]
 
[[Category:Password Management Vulnerability]]
 
[[Category:Password Management Vulnerability]]
 
[[Category:Vulnerability]]
 
[[Category:Vulnerability]]

Revision as of 21:49, 10 November 2017

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.

This article includes content generously donated to OWASP by MicroFocus Logo.png

Last revision (mm/dd/yy): 11/10/2017

Vulnerabilities Table of Contents

Description

Storing a password in plaintext may result in a system compromise.

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.

Storing a plaintext password in a configuration file allows anyone who can read the file access to the password-protected resource. Developers sometimes believe that they cannot defend the application from someone who has access to the configuration, but this attitude makes an attacker's job easier. Good password management guidelines require that a password never be stored in plaintext.


Risk Factors

TBD


Examples

The following code reads a password from a properties file and uses the password to connect to a database.

	...
	Properties prop = new Properties();
	prop.load(new FileInputStream("config.properties"));
	String password = prop.getProperty("password");
	
	DriverManager.getConnection(url, usr, password);
	...


Related Attacks


Related Vulnerabilities

Related Controls


Related Technical Impacts


References

TBD