Answers
Which Python function is prone to a potential code injection attack? - ✔✔✔eval()
How do you prevent log injection? - ✔✔✔validate()
What are two common defensive coding techniques? - ✔✔✔Check functional preconditions and
postconditions
What is checking functional preconditions and post conditions best practice for? - ✔✔✔Defensive
Coding
What happens when an attacker exploits a cross-site scripting vulnerability? - ✔✔✔Access to the User's
data
A user masquerades as (or pretends to be) another user. What type of attack is this? - ✔✔✔Cross-Site
Scripting
Which method is used for a SQL injection attack? - ✔✔✔Exploiting query parameters
What kind of attack does exploiting query parameters cause? - ✔✔✔SQL Injection
What is returned when using response.content? - ✔✔✔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? - ✔✔✔Response.content
What can an attacker do with a log injection attack? - ✔✔✔Inject commands a parser can execute