312-50V12 · Question #259
During a penetration test, an ethical hacker is exploring the security of a complex web application. The application heavily relies on JavaScript for client-side input sanitization, with an apparent a
The correct answer is D. Launch a Cross-Site Scripting (XSS) attack, aiming to bypass the client-side sanitization and. The application's reliance on client-side sanitization and lack of the HttpOnly flag on cookies creates an ideal environment for a Cross-Site Scripting (XSS) attack. This attack can bypass the inadequate sanitization and exploit exposed session cookies.
Question
Options
- AInstigate a Distributed Denial of Service (DDoS) attack to overload the server, capitalizing on
- BImplement an SQL Injection attack to take advantage of potential unvalidated input and gain
- CEmploy a brute-force attack to decipher user credentials, considering the lack of server-side
- DLaunch a Cross-Site Scripting (XSS) attack, aiming to bypass the client-side sanitization and
How the community answered
(26 responses)- A8% (2)
- B15% (4)
- C4% (1)
- D73% (19)
Why each option
The application's reliance on client-side sanitization and lack of the HttpOnly flag on cookies creates an ideal environment for a Cross-Site Scripting (XSS) attack. This attack can bypass the inadequate sanitization and exploit exposed session cookies.
A DDoS attack targets application availability and does not directly leverage the specific vulnerabilities of client-side sanitization bypass or the HttpOnly flag absence described in the scenario.
While SQL Injection exploits unvalidated input, the combined vulnerabilities of client-side sanitization bypass and HttpOnly flag absence are more directly and effectively leveraged by an XSS attack, which can lead to session hijacking.
Brute-force attacks target weak authentication or account lockout policies and are not related to the described vulnerabilities concerning client-side sanitization or cookie HttpOnly flag settings.
A Cross-Site Scripting (XSS) attack directly exploits both identified vulnerabilities. The reliance on client-side sanitization means an attacker can bypass it by submitting malicious input directly to the server, and the absence of the HttpOnly flag allows the injected script to access and potentially steal user session cookies.
Concept tested: Cross-Site Scripting (XSS) exploitation and prevention
Source: https://learn.microsoft.com/en-us/aspnet/core/security/cross-site-scripting?view=aspnetcore-8.0
Topics
Community Discussion
No community discussion yet for this question.