Skip to content

Instantly share code, notes, and snippets.

@tarunama
Last active September 6, 2016 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarunama/90eb518e2b813c4bd57f5a8690da8473 to your computer and use it in GitHub Desktop.
Save tarunama/90eb518e2b813c4bd57f5a8690da8473 to your computer and use it in GitHub Desktop.
[security] クリックジャッキング

クリックジャッキングとは

無害なサイトを表示しておいて、表示していない悪意のあるリンクをクリックさせる

対策

  • HTTPレスポンスヘッダにX−Frame-Optionsを設定して、frameタグとiframeタグの表示を無効にする

なぜframe/iframeを無効にするのか

事実上現在のページに他の HTML ページを埋め込むことができます

つまり、frameやiframeで有害なサイトを表示されることができるため、悪意のあるリンクをクリックさせることが可能になる?

でも、上と同様のことがJavaScriptのDOM生成とかで可能なのでは?

参考

https://www.ipa.go.jp/files/000026479.pdf

iframe 要素 - HTML | MDN

https://developer.mozilla.org/ja/docs/Web/HTML/Element/iframe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment