Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
GIAC (SANS) logo

GIAC Web Application Penetration Tester

Domain 5Objective 2

Cross Site Request Forgery, Cross Site Scripting and Client Injection Attack GWAPT Practice Questions (Page 10)

Part of the Injection and Client-Side Attacks domain, which makes up ~23% of our current practice bank. GIAC (SANS) does not publish an official question count, but from its 180-minute exam (~70–120 total, ~16–28 in this domain), expect 8–14 from this objective — we provide 54 practice questions to prepare you well beyond it. (estimate)

54questions here
11free pages
11concepts

Questions 46–50

  1. 46application · medium

    A developer wrote a search page that reads the `q` parameter and writes it into `document.getElementById('results').innerHTML` after a client-side fetch. A tester discovers that submitting `?q=<img src=x onerror=alert(1)>` triggers an alert. The application's server-side API correctly encodes all responses. Which of the following is the most effective remediation?

    Select an answer first
  2. 47expert · hard

    A security team is reviewing a legacy web application that uses a global JavaScript variable named `user` to store the current user's role. An attacker discovers that they can inject an HTML element with `id="user"` into the page. Which of the following best describes the vulnerability and its most effective mitigation?

    Select an answer first
  3. 48expert · hard

    A development team is using a JavaScript framework that automatically escapes data in templates. They need to render a user-controlled rich-text field that allows basic formatting (bold, italic, links). Which of the following approaches is the most secure way to implement this feature?

    Select an answer first
  4. 49expert · hard

    A penetration tester discovers a stored XSS vulnerability in a web application that uses HttpOnly and Secure cookies. The application also has a strict Content Security Policy that blocks inline scripts and eval. Which of the following is the most likely impact the tester can demonstrate?

    Select an answer first
  5. 50foundation · easy

    How can an attacker exploit a client-side injection vulnerability to steal data?

    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 GIAC (SANS). “GWAPT” is a trademark of its owner, used for identification only.