Security+ SY0-701 practice question 28 of 35

During a recent log review, an analyst found evidence of successful injection attacks. Which of the following will best address this issue?

Full set: 923 questions
Answer options
A: Authentication
B: Secure cookies
C: Static code analysis
D: Input validation Correct answer
Correct Answer:
D. Input validation
Explanation

Injection attacks, such as SQL injection or command injection, succeed when an application accepts untrusted input and processes it as part of a command or query. The most effective and fundamental countermeasure is input validation. This involves implementing strict checks and sanitization routines on all user-supplied data to ensure it conforms to expected formats, types, and lengths, and to neutralize potentially malicious characters before the data is used by the application's backend. This prevents the malicious input from being executed.

Why Incorrect

A. Authentication verifies a user's identity but does not prevent an authenticated user from submitting malicious input to exploit an injection vulnerability.
B. Secure cookies are used to protect session data from being stolen (e.g., via XSS) and do not address server-side injection vulnerabilities in application code.
C. Static code analysis is a tool used to find vulnerabilities in source code before deployment, but it is not the remediation itself. The fix is to implement controls like input validation.

References

1. National Institute of Standards and Technology (NIST). (2020). Security and Privacy Controls for Information Systems and Organizations (NIST Special Publication 800-53, Revision 5). Control SI-10, "Information Input Validation," p. 238. "The organization validates information input from external sources to detect and reject input that could compromise the information system."

2. Purdue University. (2019). CS 42600: Computer Security, Lecture 13: Web Security. Discusses SQL injection and states that the primary defense is to "validate/sanitize/escape all user input."

3. MITRE. (2023). CWE-20: Improper Input Validation. Common Weakness Enumeration. This entry describes the fundamental failure to validate input as the root cause for many vulnerabilities, including injection. "When software does not validate input properly, an attacker is able to craft the input in a form that is not expected by the rest of the application."

Scroll to Top