Secure Software Final Exam: Questions With Correct
Solutions
True or False? Defining a default case is not necessary for most switch
statements Accurate Answer:- False
True or False? According to CERT, approximately 50% of computer attacks
are caused by buffer overflow Accurate Answer:- True
The information in error logs should be sufficient for ___ and insufficient for
___ Accurate Answer:- internal use, external use
True or False? A data canary can actively signal that it has been rewritten
Accurate Answer:- False
True or False? An operator can be overloaded to define functionality that is
drastically different from the original operator Accurate Answer:- True
________________ is when a high-level language is converted to machine code
prior to installation and execution Accurate Answer:- Compiled code
True or False? Regular expressions can be used to validate input in any
circumstance Accurate Answer:- False
A ___ is an attack that stores more information in a location than it can hold
Accurate Answer:- buffer overflow
______________ is when a high-level language is converted to an intermediary
language for execution. Accurate Answer:- Interpreted code
True or False? An API can allow a system to call functionality from another
executable or external library. Accurate Answer:- True
True or False? Unsafe input characters should be removed from input strings
provided by any user Accurate Answer:- True
,True or False? A just-in-time compiled system is being constantly recompiled
before each execution and may not contain the same code between executions
Accurate Answer:- True
True or False? Error logs can be used by an attacker to gather information
about the internal workings of a system. Accurate Answer:- True
A ___ is used to prevent a return value from being overwritten. Accurate
Answer:- data canary
A ___ is a type of host that processes most of the business logic of a system
with only occasional connections to a server Accurate Answer:- thick
clien
True or False? Programming languages are designed as an intermediary
between human language and binary Accurate Answer:- True
True or False? Array bounds checking should be directly coded into a system
rather than assumed Accurate Answer:- True
________ is the process of translating high level programming languages into
machine code Accurate Answer:- Compiling
True or False? Manipulated pointer associations can allow unintended
variables to be rewritten Accurate Answer:- True
True or False? It is safe to execute user input directly Accurate Answer:-
False
True or False? The output of a program is not important from a security
perspective; only the input matters Accurate Answer:- False
_____________ is a redefinition of an existing operation for a new class
Accurate Answer:- Overload
True or False? Data sent outside of a system boundary that is meant to be
secret should be encrypted. Accurate Answer:- True
, __________ is a humanly readable structure that is compiled for use on a
computer Accurate Answer:- Programming language
The main reason we limit error log size is that we only need so many years of
data to prosecute attackers. Accurate Answer:- False
True or False? Leaving input on the incoming line can affect the next
command or program that is executed. Accurate Answer:- True
Pseudocode is a mix between human language and machine code
Accurate Answer:- False
A data canary is a value located at the end of an assigned buffer length. Which
of these are true? Accurate Answer:- If the canary is altered, the data
preceding it may be compromised
____________ is necessary for protecting a system against malicious input
Accurate Answer:- All of the above
True or False? A coding library that has existed for a long time can be assumed
to be secure to use. Accurate Answer:- False
Match the following secure coding issues with their definition. Accurate
Answer:- Buffer Overflow - Exists when a product
Integer promotion Error - Inapprpriately assigns
Directory Restriction - Improper use of this
Statistical Psuedo Random Number - Approximate random
Deadlock - Multiple Threads
Null Pointers - UIninitialized objects
Missing Release of Memory - Application does not.
Match the following deadlock causes and solutions Accurate Answer:-
Mutual Exclusion - Only one process can
Hold and Wait - Some processes must
No Preemption - The held resources can
Circular Wait - Processes in deadlock
Deadlock Prevention - Directly prevent Circular
Deadlock Avoidance - Track resource usage.
Bankers Algorithm - Simulates the Allocation
Solutions
True or False? Defining a default case is not necessary for most switch
statements Accurate Answer:- False
True or False? According to CERT, approximately 50% of computer attacks
are caused by buffer overflow Accurate Answer:- True
The information in error logs should be sufficient for ___ and insufficient for
___ Accurate Answer:- internal use, external use
True or False? A data canary can actively signal that it has been rewritten
Accurate Answer:- False
True or False? An operator can be overloaded to define functionality that is
drastically different from the original operator Accurate Answer:- True
________________ is when a high-level language is converted to machine code
prior to installation and execution Accurate Answer:- Compiled code
True or False? Regular expressions can be used to validate input in any
circumstance Accurate Answer:- False
A ___ is an attack that stores more information in a location than it can hold
Accurate Answer:- buffer overflow
______________ is when a high-level language is converted to an intermediary
language for execution. Accurate Answer:- Interpreted code
True or False? An API can allow a system to call functionality from another
executable or external library. Accurate Answer:- True
True or False? Unsafe input characters should be removed from input strings
provided by any user Accurate Answer:- True
,True or False? A just-in-time compiled system is being constantly recompiled
before each execution and may not contain the same code between executions
Accurate Answer:- True
True or False? Error logs can be used by an attacker to gather information
about the internal workings of a system. Accurate Answer:- True
A ___ is used to prevent a return value from being overwritten. Accurate
Answer:- data canary
A ___ is a type of host that processes most of the business logic of a system
with only occasional connections to a server Accurate Answer:- thick
clien
True or False? Programming languages are designed as an intermediary
between human language and binary Accurate Answer:- True
True or False? Array bounds checking should be directly coded into a system
rather than assumed Accurate Answer:- True
________ is the process of translating high level programming languages into
machine code Accurate Answer:- Compiling
True or False? Manipulated pointer associations can allow unintended
variables to be rewritten Accurate Answer:- True
True or False? It is safe to execute user input directly Accurate Answer:-
False
True or False? The output of a program is not important from a security
perspective; only the input matters Accurate Answer:- False
_____________ is a redefinition of an existing operation for a new class
Accurate Answer:- Overload
True or False? Data sent outside of a system boundary that is meant to be
secret should be encrypted. Accurate Answer:- True
, __________ is a humanly readable structure that is compiled for use on a
computer Accurate Answer:- Programming language
The main reason we limit error log size is that we only need so many years of
data to prosecute attackers. Accurate Answer:- False
True or False? Leaving input on the incoming line can affect the next
command or program that is executed. Accurate Answer:- True
Pseudocode is a mix between human language and machine code
Accurate Answer:- False
A data canary is a value located at the end of an assigned buffer length. Which
of these are true? Accurate Answer:- If the canary is altered, the data
preceding it may be compromised
____________ is necessary for protecting a system against malicious input
Accurate Answer:- All of the above
True or False? A coding library that has existed for a long time can be assumed
to be secure to use. Accurate Answer:- False
Match the following secure coding issues with their definition. Accurate
Answer:- Buffer Overflow - Exists when a product
Integer promotion Error - Inapprpriately assigns
Directory Restriction - Improper use of this
Statistical Psuedo Random Number - Approximate random
Deadlock - Multiple Threads
Null Pointers - UIninitialized objects
Missing Release of Memory - Application does not.
Match the following deadlock causes and solutions Accurate Answer:-
Mutual Exclusion - Only one process can
Hold and Wait - Some processes must
No Preemption - The held resources can
Circular Wait - Processes in deadlock
Deadlock Prevention - Directly prevent Circular
Deadlock Avoidance - Track resource usage.
Bankers Algorithm - Simulates the Allocation