Controls for Incomplete Parameter Checking and Enforcement
Measures are put in place to address and prevent the security vulnerability of incomplete or absent validation of user-supplied input (parameters).
2 slides · 2 min read · Domain 8
Buffer overflows and malformed input attacks are just two of the many ways that data and control values get passed as parameters between elements of a software system.
Logically, the designer has built the receiving software unit to test the full set of values passed to it for consistency, validity, and completeness, which goes beyond simply checking each parameter in sequence to see if it is within allowable range. A false invoice attack, for example, might use a nonexistent customer ID, but an ID that fits the format and range rules for an otherwise valid one.
Buffer overflows can be prevented at several levels. Proper attention in software design can enforce bounds checking by preventing attempts to access locations beyond the buffer. Design frameworks for secure coding can provide a policy framework that supports this. Using a programming language that enforces strong data typing while isolating code from data should also be considered. Design should also address detecting, intercepting, and properly responding to error conditions. (Even a simple divide-by-zero error can open a poorly designed application to exploitation.)
Protecting against buffer overflows is an example of the larger security opportunity to ensure proper parameter validation across all interfaces.
Many websites allow query access to databases but place filters on the requests to control access as part of access control. When requests using the SQL are allowed, the use of certain syntactical structures in the query can fool the filters into seeing the query as a comment instead of an instruction, and as a result, the resulting query may be submitted to the database engine and retrieve more information than was intended. In another instance, a site that allows users to input information for later retrieval by other users, such as a blog, may fail to detect when such input comes in the form of active scripting.
This is the basis of a well-known type of attack known as cross-site scripting. As we have seen above, technically, buffer overflows are also a form of malformed input.
