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?

【26個目】【DOM XSS】 DOM XSS using web messages and JSON.parse

Posted at

DOM XSS using web messages and JSON.parse

概要

画面で実行されるスクリプトを読み解いて、JSON値をメッセージで送る攻撃

攻撃手順

  • 開発ツールで、scriptタグが存在しているか確認し、存在していたらスクリプトの中身を確認
  • messageイベントリスナーが存在していることを確認
  • location.hrefにmessageで受け取ったデータを代入していることを確認
  • JSON.parseでパースした値をswitch文で判定し、location.hrefに代入していることを確認
  • `
`を仕込む

メモ

  • onload以降のクォーテーションに注意。onloadを囲むものはシングルである必要あり。

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

  • 30m
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?