C'è un modo per bypassare l'intestazione delle opzioni del frame x senza usare un MitM o cambiare i pacchetti in un altro modo?
Quindi, in realtà otteniamo un sito con le opzioni x-frame: DENY da mostrare in un iframe.
C'è un avvertimento quando si usa l'intestazione X-Frame-Options : controlla solo il frame di livello superiore . Ciò significa che se hai fotogrammi annidati, ovvero fotogrammi all'interno di fotogrammi, è ancora possibile che un'altra origine includa un sito con un'intestazione X-Frame-Options: SAMEORIGIN .
A questo proposito l'intestazione Content-Security-Policy: frame-ancestors 'self' è migliore, perché controlla tutti gli antenati del frame.
So actually getting a site that has x-frame-options: DENY to be shown in an iframe.
Non è possibile incorporare un sito inviando un'intestazione X-Frame-Options: DENY in qualsiasi frame.
Da RFC 7034 :
DENY
A browser receiving content with this header field MUST NOT
display this content in any frame.
Tuttavia, in alcuni casi potrebbe essere possibile ignorare la direttiva SAMEORIGIN poiché alcuni browser controllano solo l'origine di primo livello e non il genitore del frame diretto:
SAMEORIGIN
A browser receiving content with this header field MUST NOT
display this content in any frame from a page of different origin
than the content itself. [...]
Please note that current implementations vary on the
interpretation of this criteria. In some, it only allows a page
to be framed if the origin of the top-level browsing context is
identical to the origin of the content using the X-Frame-Options
directive; in others, it may consider the origin of the framing
page instead.
(Enfasi personali.)
È possibile ignorare X-Frame-Options: deny/sameorigin - dare un'occhiata al mio componente Web X-Frame-Bypass e la demo di Hacker News .
Leggi altre domande sui tag vulnerability penetration-test clickjacking