结构: Simple
Abstraction: Class
状态: Draft
被利用可能性: High
An information exposure is the intentional or unintentional disclosure of information to an actor that is not explicitly authorized to have access to that information.
The information either:
Many information exposures are resultant (e.g. PHP script error revealing the full path of the program), but they can also be primary (e.g. timing discrepancies in cryptography). There are many different types of problems that involve information exposures. Their severity can range widely depending on the type of information that is revealed.
Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}
Paradigm: {'cwe_Name': 'Mobile', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Confidentiality | Read Application Data |
According to SOAR, the following detection techniques may be useful:
According to SOAR, the following detection techniques may be useful:
According to SOAR, the following detection techniques may be useful:
According to SOAR, the following detection techniques may be useful:
According to SOAR, the following detection techniques may be useful:
According to SOAR, the following detection techniques may be useful:
策略: Separation of Privilege
Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design and that the compartmentalization serves to allow for and further reinforce privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide when it is appropriate to use and to drop system privileges.
The following code checks validity of the supplied username and password and notifies the user of a successful or failed login.
bad Perl
In the above code, there are different messages for when an incorrect username is supplied, versus when the username is correct but the password is wrong. This difference enables a potential attacker to understand the state of the login function, and could allow an attacker to discover a valid username by trying different values until the incorrect password message is returned. In essence, this makes it easier for an attacker to obtain half of the necessary authentication credentials.
While this type of information may be helpful to a user, it is also useful to a potential attacker. In the above example, the message for both failed cases should be the same, such as:
result
This code tries to open a database connection, and prints any exceptions that occur.
bad Java
If an exception occurs, the printed message exposes the location of the configuration file the script is using. An attacker can use this information to target the configuration file (perhaps exploiting a Path Traversal weakness). If the file can be read, the attacker could gain credentials for accessing the database. The attacker may also be able to replace the file with a malicious one, causing the application to use an arbitrary database.
In the example below, the method getUserBankAccount retrieves a bank account object from a database using the supplied username and account number to query the database. If an SQLException is raised when querying the database, an error message is created and output to a log file.
bad Java
The error message that is created includes information about the database query that may contain sensitive information about the database or query logic. In this case, the error message will expose the table name and column names used in the database. This data could be used to simplify other attacks, such as SQL injection (CWE-89) to directly access the database.
This code stores location information about the current user:
bad Java
When the application encounters an exception it will write the user object to the log. Because the user object contains location information, the user's location is also written to the log.
标识 | 说明 | 链接 |
---|---|---|
CVE-2001-1483 | Enumeration of valid usernames based on inconsistent responses | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1483 |
CVE-2001-1528 | Account number enumeration via inconsistent responses. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-1528 |
CVE-2004-2150 | User enumeration via discrepancies in error messages. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2150 |
CVE-2002-0515 | Product sets a different TTL when a port is being filtered than when it is not being filtered, which allows remote attackers to identify filtered ports by comparing TTLs. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0515 |
CVE-2004-0778 | Version control system allows remote attackers to determine the existence of arbitrary files and directories via the -X command for an alternate history file, which causes different error messages to be returned. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-0778 |
CVE-2000-1117 | Virtual machine allows malicious web site operators to determine the existence of files on the client by measuring delays in the execution of the getSystemResource method. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2000-1117 |
CVE-2003-0190 | Product immediately sends an error message when a user does not exist, which allows remote attackers to determine valid usernames via a timing attack. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-0190 |
CVE-2008-2049 | POP3 server reveals a password in an error message after multiple APOP commands are sent. Might be resultant from another weakness. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2049 |
CVE-2007-5172 | Program reveals password in error message if attacker can trigger certain database errors. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-5172 |
CVE-2007-1409 | Direct request to library file in web application triggers pathname leak in error message. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1409 |
CVE-2005-0603 | Malformed regexp syntax leads to information exposure in error message. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-0603 |
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
PLOVER | Information Leak (information disclosure) | ||
OWASP Top Ten 2007 | A6 | CWE More Specific | Information Leakage and Improper Error Handling |
WASC | 13 | Information Leakage |