Which of the following directives in a Content-Security-Policy HTTP response header, can be used to prevent a Clickjacking attack?
Clickjacking is an attack where a malicious site overlays a transparent iframe containing a legitimate site, tricking users into interacting with it unintentionally (e.g., clicking a button). The Content-Security-Policy (CSP) HTTP response header is used to mitigate various client-side attacks, including clickjacking, through specific directives. The frame-ancestors directive is the correct choice for preventing clickjacking. This directive specifies which origins are allowed to embed the webpage in an iframe, <frame>, or <object>. For example, setting frame-ancestors 'self' restricts framing to the same origin, effectively blocking external sites from embedding the page. This is a standard defense mechanism recommended by OWASP and other security frameworks.
Option A ('script-src') controls the sources from which scripts can be loaded, addressing XSS (Cross-Site Scripting) vulnerabilities but not clickjacking. Option B ('object-src') restricts the sources of plugins or embedded objects (e.g., Flash), which is unrelated to iframe-based clickjacking. Option D ('base-uri') defines the base URL for relative URLs in the document, offering no protection against framing attacks. The use of CSP with the frame-ancestors directive is a critical topic in the CAP syllabus under 'Security Headers' and 'OWASP Top 10' (UI Redressing).
Terrilyn
3 months agoGilbert
3 months agoJoesph
4 months agoBambi
4 months agoJoesph
4 months agoCrista
5 months agoLoren
5 months agoSusy
5 months agoStarr
5 months agoGearldine
5 months agoSerina
6 months agoNenita
6 months agoElmer
6 months agoTeresita
6 months agoRonny
7 months agoFabiola
3 months agoMicaela
3 months agoLeonor
4 months agoEdmond
4 months agoKenda
8 months agoLonna
8 months agoAleta
7 months agoLelia
7 months agoPaola
7 months agoCordelia
8 months ago