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
2 months agoGilbert
2 months agoJoesph
2 months agoBambi
2 months agoJoesph
3 months agoCrista
3 months agoLoren
3 months agoSusy
4 months agoStarr
4 months agoGearldine
4 months agoSerina
4 months agoNenita
4 months agoElmer
5 months agoTeresita
5 months agoRonny
5 months agoFabiola
1 month agoMicaela
2 months agoLeonor
2 months agoEdmond
3 months agoKenda
6 months agoLonna
6 months agoAleta
5 months agoLelia
5 months agoPaola
5 months agoCordelia
7 months ago