Building Trust in the Security of Software } int main( int argc, char ** argv) {
char buf [ 5012 ]; memcpy( buf, argv [ 1 ], 5012); printWrapper( argv [ 1 ]); return( 0);
}
A1: This code snippet is not vulnerable to eternal control
A2: This code snippet is vulnerable to external control if the value of‘ argv’ is provided by an unauthorized user
A3: This code snippet is vulnerable to eternal control if the string at‘ argv [ 1 ]’ is longer than 5012 bytes
A4: This code snippet is vulnerable to external control because the call to printf() in the printWrapper() function is sent argv [ 1 ] as a parameter by main
A5: It is not possible to determine if this code snippet is vulnerable to external control
To answer this question correctly, the developer would have to understand how program control is managed in this snippet. They would need to recognize that the snippet could be controlled by an external source because the call to‘ printf()’ in the‘ printwrapper’ function is sent‘ argv [ 1 ]’ as a parameter by main. Questions in the exam will range from easy to extremely difficult. These questions probe more than whether developers understand the structure of a programming language, but rather whether they understand how program structures interact within an operational context to create a security weakness.
This additional knowledge and understanding is critical to recognizing, avoiding, and repairing security weaknesses. A’ Dependable Developer’ is one step beyond a merely competent developer because of their deeper knowledge of vulnerable structures in code that are not always obvious.
4 TRUSTING THE SOFTWARE
Finally, and most crucially, there is trusting the software product. The security and other quality characteristics built into the code are the ground truth on which trust in a software system must ultimately rest. Penetration testing is one approach to identifying security problems in software. Static analysis at both the component and architectural levels is an additional method to evaluate the security of a software system. The data presented in this section are based on static analysis of software applications from the Appmarq Repository( see Annex B). Static analyzers parse the code and evaluate relationships among its elements to detect patterns that represent violations
Journal of Innovation 9