nerdexam
Cisco

350-901 · Question #8

Which two techniques protect against injection attacks? (Choose two.)

The correct answer is A. input validation D. string escaping of user free text and data entry. To protect against injection attacks, it is crucial to implement robust input validation to ensure data conforms to expected formats and to perform string escaping on all user-supplied free text before it is processed by an interpreter.

Application Deployment and Security

Question

Which two techniques protect against injection attacks? (Choose two.)

Options

  • Ainput validation
  • Btrim whitespace
  • Climit text areas to 255 characters
  • Dstring escaping of user free text and data entry
  • Eonly use dropdown, checkbox, and radio button fields

How the community answered

(19 responses)
  • A
    89% (17)
  • B
    5% (1)
  • C
    5% (1)

Why each option

To protect against injection attacks, it is crucial to implement robust input validation to ensure data conforms to expected formats and to perform string escaping on all user-supplied free text before it is processed by an interpreter.

Ainput validationCorrect

Input validation is a critical defense that ensures user-supplied data conforms to expected types, formats, and ranges, rejecting any malicious input that could exploit injection vulnerabilities.

Btrim whitespace

Trimming whitespace from user input is a form of sanitization but does not directly protect against the malicious code or commands characteristic of injection attacks.

Climit text areas to 255 characters

Limiting text areas to a specific character count, such as 255 characters, may constrain the size of an injection payload but does not inherently prevent the injection of malicious commands within that limit.

Dstring escaping of user free text and data entryCorrect

String escaping of user free text involves converting special characters within the input into their literal representations, preventing them from being interpreted as executable code or commands by backend systems or interpreters.

Eonly use dropdown, checkbox, and radio button fields

While restricting input to predefined options like dropdowns or checkboxes can prevent injection by removing free-text entry, it is a design constraint rather than a universally applicable technique when free-text input is required.

Concept tested: Injection attack prevention techniques

Source: https://learn.microsoft.com/en-us/azure/security/fundamentals/owasp-top-10#a03-2021-injection

Topics

#Injection attacks#Application Security#Input validation#String escaping

Community Discussion

No community discussion yet for this question.

Full 350-901 Practice