
EC-CouncilWeb Application Hacking and Security
Domain 3Objective 3
DOM-based XSS WAHS Practice Questions (Page 5)
Part of the Cross-Site Scripting (XSS) domain, which makes up ~11% of our current practice bank. EC-Council does not publish an official question count, but from its 360-minute exam (~145–240 total, ~16–26 in this domain), expect 5–9 from this objective — we provide 32 practice questions to prepare you well beyond it. (estimate)
32questions here
7free pages
7concepts
Questions 21–25
- 21
A security consultant is assessing the risk of a DOM-based XSS vulnerability in a banking application. The vulnerable code is on the account summary page and uses location.hash to display a user's selected tab. The application uses HttpOnly cookies for session management. Which statement best describes the realistic impact of this vulnerability?
Select an answer first - 22
A security analyst is reviewing a JavaScript-heavy single-page application. The code reads the value of `location.search` and passes it directly to `document.getElementById('output').innerHTML` without any validation. The analyst wants to confirm whether this is exploitable by testing in a browser. Which action would most directly demonstrate the vulnerability?
Select an answer first - 23
An application uses the following code: ``` var url = window.location.hash.substring(1); document.write('<a href="' + url + '">Click</a>'); ``` Which payload would exploit this DOM-based XSS to execute JavaScript?
Select an answer first - 24
Which static analysis approach is most effective for identifying potential DOM-based XSS vulnerabilities in a JavaScript codebase?
Select an answer first - 25
A development team is fixing a DOM-based XSS vulnerability where user input from window.name is used to set an element's innerHTML. The team wants to implement a robust fix that addresses the root cause. Which approach is the most effective?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “WAHS” is a trademark of its owner, used for identification only.