nerdexam
CompTIA

CAS-001 · Question #183

A security consultant is evaluating forms which will be used on a company website. Which of the following techniques or terms is MOST effective at preventing malicious individuals from successfully…

The correct answer is D. Input validation. Input validation is the primary defense against web application attacks such as SQL injection and XSS by ensuring that only expected, well-formed data is accepted by the application.

Enterprise Security

Question

A security consultant is evaluating forms which will be used on a company website. Which of the following techniques or terms is MOST effective at preventing malicious individuals from successfully exploiting programming flaws in the website?

Options

  • AAnti-spam software
  • BApplication sandboxing
  • CData loss prevention
  • DInput validation

How the community answered

(63 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    6% (4)
  • D
    90% (57)

Why each option

Input validation is the primary defense against web application attacks such as SQL injection and XSS by ensuring that only expected, well-formed data is accepted by the application.

AAnti-spam software

Anti-spam software filters unwanted email content and has no relevance to validating data submitted through web forms.

BApplication sandboxing

Application sandboxing restricts an application's access to system resources but does not prevent malicious input from being processed within the application's own logic.

CData loss prevention

Data loss prevention tools detect and block sensitive data exfiltration but do not prevent attackers from exploiting web application input handling flaws.

DInput validationCorrect

Input validation prevents attackers from injecting malicious data - such as SQL commands, scripts, or path traversal strings - into application inputs by enforcing type, length, format, and range checks before data is processed. It directly addresses programming flaws like injection vulnerabilities and cross-site scripting at the source. Without proper input validation, all other controls are secondary mitigations that do not fix the underlying flaw.

Concept tested: Input validation preventing web application injection attacks

Source: https://owasp.org/www-project-proactive-controls/v3/en/c5-validate-inputs

Topics

#input validation#web application security#injection prevention#secure coding

Community Discussion

No community discussion yet for this question.

Full CAS-001 Practice