nerdexam
EC-Council

312-92 · Question #53

EC-Council 312-92 Exam After learning from an external auditor that his code was susceptible to attack, George decided to rewrite some of his code to look like the following. What is George preventing

The correct answer is B. XSS attack. See the full explanation below for the reasoning.

Question

EC-Council 312-92 Exam After learning from an external auditor that his code was susceptible to attack, George decided to rewrite some of his code to look like the following. What is George preventing by changing the code? public voif doContent(...) { ... String s; if ((s = getUsernameByID("userid")) != null) { s = StringUtils.encodeToHTML(s, 50); response.write("<br>Applicant:<u>" + s + "</u>"); } ... }

Options

  • AQuery string manipulation
  • BXSS attack
  • CCookie poisoning
  • DSQL injection

How the community answered

(38 responses)
  • A
    8% (3)
  • B
    76% (29)
  • C
    3% (1)
  • D
    13% (5)

Community Discussion

No community discussion yet for this question.

Full 312-92 Practice