本文へスキップ
Skillpedia
セキュリティ6.5k · #14087

xs-leaks

できること

このガイドは、あるWebサイトが別サイトの利用者について、ブラウザの間接的な動作から情報を推測するサイドチャネルによる漏えいを扱います。ログイン状態や検索結果が外部サイトに知られていないかを確認したいWebチーム向けです。

使う場面

  • ✓サイトがログイン中の訪問者に別の内容を表示しており、外部サイトがそれを検知できるか確認したいとき。
  • ✓検索結果やアカウントページが、タイミングやフレーム数によって会員であることを明かしうるとき。
  • ✓許可されたレビューで、機密ページのブラウザレベルの分離をテストしたいとき。

スキルのリンク

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/xs-leaks/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/xs-leaks/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“別のWebサイトが、私たちの利用者がログイン中かどうかを判断できないか、アカウントページを確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、サイト間のリクエストに対してページがどう応答するかを確認します。タイミング、フレームの動作、エラー応答を含め、ログイン状態によって違う信号を報告します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

XS-Leaks (Cross-Site Leaks)

XS-Leaks abuse browser primitives that leak information ACROSS origins. Attacker page can observe whether a cross-origin GET returned different content based on victim's authenticated state. Smaller than full cross-origin read (which is blocked), but enough to enumerate identifiers, detect membership, learn search-result presence.

1. Categories

1.1 Timing oracles

Cross-origin fetch / image load timing varies by server response size. Attacker measures load time → infers content.

const start = performance.now();
const img = new Image();
img.onerror = () => console.log(performance.now() - start);
img.src = 'https://target.com/api/users/me/notifications';

1.2 Frame counting (window.frames.length)

Some pages embed N iframes when authenticated and 0 when not. Attacker iframes target page and reads iframe.contentWindow.frames.length.

1.3 Window name / postMessage leak

iframe.contentWindow.name is preserved across navigation. Some pages set it w/ user-identifying data.

1.4 Error-event oracle

<img src=target.com/api/user/{id}/data> triggers different onerror behavior based on response code (403 vs 404 vs 200 w/ image content-type).

1.5 CSS injection style oracle

<link rel=stylesheet href=target.com/page> — different applied styles leak state via getComputedStyle of attacker page.

1.6 Search result presence

Many search endpoints return cached/non-cached headers indicating hits. Attacker measures cache hit vs miss timing for guessed search terms.

1.7 ID guessability (XS-Search)

for (const guessed_id of guessable_set) {
    const url = `https://target.com/api/user/${guessed_id}`;
    // measure timing or frame-count differential
}

2. xsleaks.dev — canonical reference

Full taxonomy + browser-version compatibility matrix: https://xsleaks.dev/

Decepticon agents should consult this for current technique viability — browser mitigations evolve fast (COOP, COEP, Cross-Origin-Opener-Policy).

3. Detection

// Frame count
const f = document.createElement('iframe');
f.src = 'https://target.com/dashboard';   // attacker hosts this in own page
document.body.appendChild(f);
f.onload = () => {
    console.log('frames:', f.contentWindow.frames.length);
};

// Timing
async function timeFetch(url) {
    const t = performance.now();
    try { await fetch(url, {mode:'no-cors', credentials:'include'}); } catch {}
    return performance.now() - t;
}

4. PoC framing

XS-Leak PoCs require:

  • Attacker host (your own controlled domain)
  • Victim browser with authenticated session to target
  • Visual demonstration of leaked info (e.g. infer victim's email, search history, friend list)

Document the attack page, record video of victim browser visiting it → inferred information displayed.

5. Severity

Bug Severity
XS-Search enumerating victim's private documents High 7-8
Frame-count revealing logged-in state Medium 5-6
Timing oracle inferring victim email / ID High 7-8
Window.name leaking session info High 7-8
Cross-origin error-event leaking which users exist Medium 4-5

6. Defender

  • Set Cross-Origin-Opener-Policy: same-origin
  • Set Cross-Origin-Embedder-Policy: require-corp
  • Set Cross-Origin-Resource-Policy: same-origin
  • Disable iframe embedding for sensitive pages: X-Frame-Options: DENY or frame-ancestors 'none' in CSP
  • Constant-time responses for sensitive endpoints (esp. when state-dependent)
  • Vary: Cookie + careful caching

Cross-references

  • Upstream: skills/_corpus/payloads/XS-Leak/
  • xsleaks.dev — primary reference
  • DOM clobbering overlap (different class, same client-side mindset): skills/exploit/web/dom-clobbering/SKILL.md
よくある質問

クロスサイトリークとは何ですか?

ブラウザの間接的な動きを通じて、ある訪問者について別のサイトが何かを知ってしまうことです。

相手サイトの内容を直接読み取るのですか?

いいえ。これらの漏えいは、相手サイトの内容を読むのではなく、情報を推測するものだとガイドは説明しています。

チームはどのように減らせますか?

ブラウザのサイト間保護用ヘッダーを使い、すべての訪問者に対して応答が同じに見えるようにすることです。

詳細

作者による元の説明

XS-Leaks — cross-site information leaks via timing, frame counting, navigation, error oracles. Side-channel attacks against same-origin authenticated state.

repo: BitterSecurity/Decepticon

人気

GitHubのスター
6.5k
ランキング
#14087
ライセンス
Apache-2.0
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル