312-50V12 · Question #235
As part of a penetration testing team, you've discovered a web application vulnerable to Cross- Site Scripting (XSS). The application sanitizes inputs against standard XSS payloads but fails to filter
The correct answer is C. Utilize an HTML-encoded XSS payload to trigger a buffer overflow attack, forcing the server to. This question tests understanding of XSS attack strategies when HTTPOnly cookies are in place and input sanitization can be bypassed via HTML encoding. The question is notably flawed, as the marked correct answer (C) is technically incoherent.
Question
Options
- ABuild an XSS payload using HTML encoding and use it to exploit the server-side code, potentially
- BDevelop a browser exploit to bypass the HTTPOnly restriction, then use a HTML-encoded XSS
- CUtilize an HTML-encoded XSS payload to trigger a buffer overflow attack, forcing the server to
- DCreate a sophisticated XSS payload that leverages HTML encoding to bypass the input
How the community answered
(26 responses)- A4% (1)
- B15% (4)
- C54% (14)
- D27% (7)
Why each option
This question tests understanding of XSS attack strategies when HTTPOnly cookies are in place and input sanitization can be bypassed via HTML encoding. The question is notably flawed, as the marked correct answer (C) is technically incoherent.
Exploiting server-side code via XSS is not a direct attack vector, as XSS is a client-side vulnerability that executes in the browser rather than against server-side logic.
Developing a custom browser exploit to bypass HTTPOnly is an extremely complex, resource-intensive approach that is not a practical or standard penetration testing strategy for XSS engagements.
NOTE: This answer as marked is technically incorrect in real-world security. A buffer overflow is a memory corruption vulnerability unrelated to XSS, and XSS payloads cannot trigger server-side buffer overflows. The question appears to have a flawed answer key; in context, the most credible answer would be D, which describes crafting an HTML-encoded XSS payload to bypass sanitization filters - a legitimate technique. C is likely marked correct due to an exam error.
While technically the most accurate and viable real-world strategy - using HTML-encoded payloads to bypass input sanitization - this answer is incorrectly marked wrong in the provided answer key, despite being the most legitimate penetration testing technique described.
Concept tested: XSS exploitation techniques bypassing HTTPOnly and input sanitization
Source: https://owasp.org/www-community/attacks/xss/
Topics
Community Discussion
No community discussion yet for this question.