312-50V11 · Question #13
Identify the web application attack where the attackers exploit vulnerabilities in dynamically generated web pages to inject client-side script into web pages viewed by other users.
The correct answer is B. Cross-Site Scripting (XSS). Cross-Site Scripting (XSS) is the attack where malicious client-side scripts are injected into dynamically generated web pages and executed in the browsers of other users who visit those pages.
Question
Identify the web application attack where the attackers exploit vulnerabilities in dynamically generated web pages to inject client-side script into web pages viewed by other users.
Options
- ASQL injection attack
- BCross-Site Scripting (XSS)
- CLDAP Injection attack
- DCross-Site Request Forgery (CSRF)
How the community answered
(34 responses)- A6% (2)
- B88% (30)
- C3% (1)
- D3% (1)
Why each option
Cross-Site Scripting (XSS) is the attack where malicious client-side scripts are injected into dynamically generated web pages and executed in the browsers of other users who visit those pages.
SQL injection targets back-end database queries by injecting malicious SQL syntax, not client-side scripts delivered to other users' browsers.
XSS exploits insufficient output encoding or input validation in web applications to inject malicious JavaScript or HTML into pages served to other users. When a victim's browser renders the page, it executes the attacker's script in the context of the trusted site, enabling session hijacking, credential theft, or defacement. This precisely matches the description of exploiting dynamically generated pages to inject client-side script.
LDAP injection manipulates LDAP queries sent to directory services by injecting special characters, affecting server-side directory lookups rather than injecting client-side scripts.
CSRF tricks an authenticated user's browser into sending unintended requests to a trusted site, but does not involve injecting scripts into web pages viewed by other users.
Concept tested: Cross-Site Scripting (XSS) attack mechanism
Source: https://owasp.org/www-community/attacks/xss/
Topics
Community Discussion
No community discussion yet for this question.