
EC-CouncilWeb Application Hacking and Security
Domain 3Objective 3
DOM-based XSS WAHS Practice Questions (Page 4)
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 16–20
- 16
A QA engineer is testing a web application for DOM-based XSS. The app has a search feature that updates results dynamically without page reloads. The engineer suspects the search term is being written to the DOM unsafely. Which testing approach would most reliably confirm the vulnerability?
Select an answer first - 17
A penetration tester is reviewing a web page's JavaScript and finds the following code: var userInput = window.name; document.getElementById('output').innerHTML = userInput;. The tester wants to exploit this. Which statement correctly describes the source and sink, and how to exploit it?
Select an answer first - 18
A security engineer is analyzing a vulnerability report. The report states that a web application is vulnerable to XSS, but the payload is never observed in the HTTP request or response. The payload is delivered via a URL fragment and executed by client-side JavaScript. Which type of XSS is this, and why is it not visible in the HTTP traffic?
Select an answer first - 19
A developer is refactoring a legacy web application. The current code reads a value from location.search and writes it to the page using document.write. The developer wants to eliminate the DOM-based XSS risk while maintaining the same functionality. Which code change is the most appropriate?
Select an answer first - 20
A penetration tester finds that a web app reads `window.name` and inserts it into `document.getElementById('msg').innerHTML` on page load. The tester wants to craft a proof-of-concept that steals a victim's session cookie. Which payload delivery method is most appropriate?
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.