Difference between revisions of "Password Plaintext Storage"

From OWASP
Jump to: navigation, search
m (Plaintext Storage moved to Password Plaintext Storage: Make it more clear.)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{Template:Fortify}}
 
{{Template:Fortify}}
  
==Abstract==
+
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
Storing a password in plaintext may result in a system compromise.
+
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
  
 
==Description==
 
==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.
 
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.
Line 12: Line 14:
 
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.
 
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.
  
==Examples ==
+
 
 +
 
 +
==Risk Factors==
 +
 
 +
TBD
 +
 
 +
 
 +
==Examples==
  
 
The following code reads a password from a properties file and uses the password to connect to a database.
 
The following code reads a password from a properties file and uses the password to connect to a database.
Line 26: Line 35:
 
</pre>
 
</pre>
  
==Related Threats==
 
  
==Related Attacks==
+
==Related [[Attacks]]==
  
==Related Vulnerabilities==
+
* [[Attack 1]]
 +
* [[Attack 2]]
  
==Related Countermeasures==
 
  
[[Password Management Countermeasure]]
+
==Related [[Vulnerabilities]]==
  
==Categories==
+
* [[Vulnerability 1]]
 +
* [[Vulnerabiltiy 2]]
  
[[Category:Sensitive Data Protection Vulnerability]]
+
==Related [[Controls]]==
  
[[Category:Java]]
+
* [[Password Management Countermeasure]]
  
[[Category:Code Snippet]]
 
  
 +
==Related [[Technical Impacts]]==
 +
 +
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
 +
 +
 +
==References==
 +
 +
TBD
 +
 +
[[Category:FIXME|add links
 +
 +
In addition, one should classify vulnerability based on the following subcategories: Ex:<nowiki>[[Category:Error Handling Vulnerability]]</nowiki>
 +
 +
Availability Vulnerability
 +
 +
Authorization Vulnerability
 +
 +
Authentication Vulnerability
 +
 +
Concurrency Vulnerability
 +
 +
Configuration Vulnerability
 +
 +
Cryptographic Vulnerability
 +
 +
Encoding Vulnerability
 +
 +
Error Handling Vulnerability
 +
 +
Input Validation Vulnerability
 +
 +
Logging and Auditing Vulnerability
 +
 +
Session Management Vulnerability]]
 +
 +
__NOTOC__
 +
 +
 +
[[Category:OWASP ASDR Project]]
 +
[[Category:Sensitive Data Protection Vulnerability]]
 +
[[Category:Java]]
 +
[[Category:Code Snippet]]
 
[[Category:Password Management Vulnerability]]
 
[[Category:Password Management Vulnerability]]
 +
[[Category:Vulnerability]]

Latest revision as of 08:29, 27 February 2009

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


This article includes content generously donated to OWASP by Fortify.JPG.

Last revision (mm/dd/yy): 02/27/2009

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