nerdexam
CompTIA

SY0-301 · Question #110

Which of the following can BEST help prevent cross-site scripting attacks and buffer overflows on a production system?

The correct answer is A. Input validation. Input validation is the most effective control against both cross-site scripting (XSS) and buffer overflows at the application level. XSS attacks inject malicious scripts through unsanitized input fields; input validation rejects or sanitizes such data before it is processed or…

Threats, vulnerabilities, and mitigations

Question

Which of the following can BEST help prevent cross-site scripting attacks and buffer overflows on a production system?

Options

  • AInput validation
  • BNetwork intrusion detection system
  • CAnomaly-based HIDS
  • DPeer review

How the community answered

(62 responses)
  • A
    92% (57)
  • B
    2% (1)
  • C
    5% (3)
  • D
    2% (1)

Explanation

Input validation is the most effective control against both cross-site scripting (XSS) and buffer overflows at the application level. XSS attacks inject malicious scripts through unsanitized input fields; input validation rejects or sanitizes such data before it is processed or rendered. Buffer overflows occur when more data is accepted than the buffer can hold; input validation enforces length and type constraints to prevent this. A network IDS can detect attacks but cannot prevent application-layer coding flaws. Anomaly-based HIDS identifies suspicious behavior after the fact. Peer review can catch vulnerabilities during development but does not protect a production system.

Topics

#input validation#XSS#buffer overflow#application security

Community Discussion

No community discussion yet for this question.

Full SY0-301 Practice