nerdexam
CompTIA

PT0-001 · Question #91

A penetration tester notices that the X-Frame-Optjons header on a web application is not set. Which of the following would a malicious actor do to exploit this configuration setting?

The correct answer is B. Create a frame that overlays the application. A missing X-Frame-Options header leaves a web application vulnerable to clickjacking, where an attacker embeds the legitimate site in a transparent frame to trick users into unintended actions.

Attacks and exploits

Question

A penetration tester notices that the X-Frame-Optjons header on a web application is not set. Which of the following would a malicious actor do to exploit this configuration setting?

Options

  • AUse path modification to escape the application's framework.
  • BCreate a frame that overlays the application.
  • CInject a malicious iframe containing JavaScript.
  • DPass an iframe attribute that is malicious.

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    83% (33)
  • C
    3% (1)
  • D
    10% (4)

Why each option

A missing X-Frame-Options header leaves a web application vulnerable to clickjacking, where an attacker embeds the legitimate site in a transparent frame to trick users into unintended actions.

AUse path modification to escape the application's framework.

Path modification to escape an application framework describes a path traversal or framework-escape vulnerability class that is entirely unrelated to the X-Frame-Options header.

BCreate a frame that overlays the application.Correct

The X-Frame-Options header instructs browsers to prevent the page from being embedded in a frame by another origin. Without it, an attacker can load the target application inside an iframe on a malicious page, overlay deceptive UI elements on top, and manipulate users into performing actions - such as clicking buttons or submitting forms - without their knowledge.

CInject a malicious iframe containing JavaScript.

Injecting a malicious iframe containing JavaScript describes a cross-site scripting vector and is not the direct exploitation of a missing X-Frame-Options header, which specifically enables clickjacking.

DPass an iframe attribute that is malicious.

Passing a malicious iframe attribute relates to HTML attribute injection, not the clickjacking risk that arises specifically from an absent X-Frame-Options header.

Concept tested: Clickjacking exploitation via missing X-Frame-Options header

Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

Topics

#clickjacking#X-Frame-Options#web security headers#iframe attack

Community Discussion

No community discussion yet for this question.

Full PT0-001 Practice