一种有趣的安全隐患——界面劫持

2017 年 2 月 28 日
 kindjeff
这是一个演示链接: https://www.kindjeff.com/static/for_fun/v2ex_0.html

在这个链接里点击按钮之后,再来看我的 V2EX 主页: https://www.v2ex.com/member/kindjeff

会发现特别关注了我。思路很简单但是很有效。
8707 次点击
所在节点    V2EX
58 条回复
Livid
2017 年 3 月 1 日
谢谢楼主的提醒 :)
Izual_Yang
2017 年 3 月 1 日
对于 uBlockOrigin 或 uMatrix (或者类似的 noscript 类扩展)用户而言并无卵用
http://ww1.sinaimg.cn/large/53c2ce22gy1fd7a8c2wm2j20wc07dmzz
Izual_Yang
2017 年 3 月 1 日
更何况就算 uMatrix 放行了,仍然只看到一个空白网页上的按钮,浏览器 console 提示:
Refused to display 'https://www.v2ex.com/member/kindjeff' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, SAMEORIGIN'.
lyragosa
2017 年 3 月 1 日
按钮无法点击

控制台提示

Refused to display 'https://www.v2ex.com/member/kindjeff' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, SAMEORIGIN'.

Chrome 56.0.2924.87 (64-bit)
aristotll
2017 年 3 月 1 日
chrome 拦截了汗
paradoxs
2017 年 3 月 1 日
OSX + 56.0.2924.87 (64-bit) 劫持失败
zhouyg
2017 年 3 月 1 日
确实很有意思
zpf124
2017 年 3 月 1 日
Refused to display 'https://www.v2ex.com/member/kindjeff' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Chrome 浏览器识别了 X-Frame-Options 请求头,拒绝载入对应的页面。
用新版的 edge 和 ie 也是如此。

我想这个请求头 现代浏览器应该都能识别。
kindjeff
2017 年 3 月 1 日
@zpf124 可能站长改过了~~昨天是没有的。
moonkiller
2017 年 3 月 1 日
你的 button 没法点击啊。。。
nodeath
2017 年 3 月 1 日
这是点击劫持啊,好老的东西了,一般浏览器都会做拦截
luanluan
2017 年 3 月 1 日
这个怎么实现的呢?
Arrowing
2017 年 3 月 1 日
我弄了之后,被 V2 403 了。。。好久进不来。
menc
2017 年 3 月 1 日
这不叫界面劫持,叫 click jacking ,很老的东西了
Felldeadbird
2017 年 3 月 1 日
失效了。 a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
看来是 V2 更新了设置啊
leots
2017 年 3 月 1 日
完全无法点击.....
anthozoan77
2017 年 3 月 1 日
Refused to display 'https://www.v2ex.com/member/kindjeff' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

虽然无法关注,有意思哈哈。
tammy
2017 年 3 月 9 日
没人用 FF 吗,根本没反应啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/343894

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX