D385 Software And Security Testing WGU: Questions
With Correct Solutions
Which Python function is prone to a potential code injection attack? Correct
Answer - eval()
How do you prevent log injection? Correct Answer - validate()
What are two common defensive coding techniques? Correct Answer -
Check functional preconditions and postconditions
What is checking functional preconditions and post conditions best practice
for? Correct Answer - Defensive Coding
What happens when an attacker exploits a cross-site scripting vulnerability?
Correct Answer - Access to the User's data
A user masquerades as (or pretends to be) another user. What type of attack
is this? Correct Answer - Cross-Site Scripting
Which method is used for a SQL injection attack? Correct Answer -
Exploiting query parameters
What kind of attack does exploiting query parameters cause? Correct
Answer - SQL Injection
What is returned when using response.content? Correct Answer - The raw
binary content of the HTTP response is returned as bytes
Which response method, when sent a request, returns information about the
server's response and is delivered back to the console? Correct Answer -
Response.content
What can an attacker do with a log injection attack? Correct Answer -
Inject commands a parser can execute
What is the primary defense against log injection attacks? Correct Answer -
Sanitize outbound log messages
With Correct Solutions
Which Python function is prone to a potential code injection attack? Correct
Answer - eval()
How do you prevent log injection? Correct Answer - validate()
What are two common defensive coding techniques? Correct Answer -
Check functional preconditions and postconditions
What is checking functional preconditions and post conditions best practice
for? Correct Answer - Defensive Coding
What happens when an attacker exploits a cross-site scripting vulnerability?
Correct Answer - Access to the User's data
A user masquerades as (or pretends to be) another user. What type of attack
is this? Correct Answer - Cross-Site Scripting
Which method is used for a SQL injection attack? Correct Answer -
Exploiting query parameters
What kind of attack does exploiting query parameters cause? Correct
Answer - SQL Injection
What is returned when using response.content? Correct Answer - The raw
binary content of the HTTP response is returned as bytes
Which response method, when sent a request, returns information about the
server's response and is delivered back to the console? Correct Answer -
Response.content
What can an attacker do with a log injection attack? Correct Answer -
Inject commands a parser can execute
What is the primary defense against log injection attacks? Correct Answer -
Sanitize outbound log messages