Difference between revisions of "Information Leakage"

From OWASP
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Template:Vulnerability}}
 
{{Template:Vulnerability}}
 +
{{Template:Fortify}}
 +
 +
==Abstract==
 +
 +
Revealing system data or debugging information helps an adversary learn about the system and form a plan of attack.
  
 
==Description==
 
==Description==
 +
 +
An information leak occurs when system data or debugging information leaves the program through an output stream or logging function.
  
 
==Examples ==
 
==Examples ==
 +
 +
'''Example 1:'''
 +
 +
The following code prints the path environment variable to the standard error stream:
 +
 +
<pre>
 +
char* path = getenv("PATH");
 +
...
 +
sprintf(stderr, "cannot find exe on path %s\n", path);
 +
</pre>
 +
 +
'''Example 2:'''
 +
 +
The following code prints an exception to the standard error stream:
 +
 +
<pre>
 +
try {
 +
...
 +
} catch (Exception e) {
 +
e.printStackTrace();
 +
}
 +
</pre>
 +
 +
Depending upon the system configuration, this information can be dumped to a console, written to a log file, or exposed to a remote user. In some cases the error message tells the attacker precisely what sort of an attack the system will be vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In the example above, the search path could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.
 +
 +
==Related Principles==
 +
 +
[[Use encapsulation]]
  
 
==Related Threats==
 
==Related Threats==
Line 14: Line 49:
  
 
==Categories==
 
==Categories==
 
+
[[Category:Error Handling Vulnerability]]
{{Template:Stub}}
+
[[Category:Logging and Auditing Vulnerability]]
 
+
 
[[Category:Sensitive Data Protection Vulnerability]]
 
[[Category:Sensitive Data Protection Vulnerability]]
 +
[[Category:Java]]
 +
[[Category:C]]
 +
[[Category:Implementation]]
 +
[[Category:Code Snippet]]

Revision as of 11:20, 21 July 2006

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.

Abstract

Revealing system data or debugging information helps an adversary learn about the system and form a plan of attack.

Description

An information leak occurs when system data or debugging information leaves the program through an output stream or logging function.

Examples

Example 1:

The following code prints the path environment variable to the standard error stream:

	char* path = getenv("PATH");
	... 
	sprintf(stderr, "cannot find exe on path %s\n", path);

Example 2:

The following code prints an exception to the standard error stream:

	try {
		...
	} catch (Exception e) {
		e.printStackTrace();
	}

Depending upon the system configuration, this information can be dumped to a console, written to a log file, or exposed to a remote user. In some cases the error message tells the attacker precisely what sort of an attack the system will be vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In the example above, the search path could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.

Related Principles

Use encapsulation

Related Threats

Related Attacks

Related Vulnerabilities

Related Countermeasures

Categories