当前位置:网站首页>X-Frame-Options(点击劫持) 网页劫持漏洞
X-Frame-Options(点击劫持) 网页劫持漏洞
2022-06-29 09:53:00 【隔壁老瓦】
漏洞描述:
点击劫持(ClickJacking)是一种视觉上的欺骗手段。攻击者使用一个透明的iframe,覆盖在一个网页上,然后诱使用户在网页上进行操作,此时用户将在不知情的情况下点击透明的iframe页面。通过调整iframe页面的位置,可以诱使用户恰好点击在iframe页面的一些功能性按钮上。
HTTP响应头信息中的X-Frame-Options,可以指示浏览器是否应该加载一个iframe中的页面。如果服务器响应头信息中没有X-Frame-Options,则该网站存在ClickJacking攻击风险。网站可以通过设置X-Frame-Options阻止站点内的页面被其他页面嵌入从而防止点击劫持。
解决方案:
修改web服务器配置,添加X-Frame-Options响应头。赋值有如下三种:
1、DENY:不能被嵌入到任何iframe或者frame中。
2、SAMEORIGIN:页面只能被本站页面嵌入到iframe或者frame中
3、ALLOW-FROM uri:只能被嵌入到指定域名的框架中
apache可配置http.conf如下:
复制
<IfModule headers_module>
Header always append X-Frame-Options "DENY"
</IfModule>
nginx配置
nginx分别通过http和server设置 X-Frame-Options ,防止网站被别人用iframe嵌入使用。需要说明的是,只需用其中一个方法即可,在http配置代码块或server配置代码块里设置。
- 在http配置里设置X-Frame-Options
边栏推荐
- By asp Net core downloading files according to the path
- QT writing IOT management platform 37- logic design
- SQL Server 数据库的统计查询
- 悬赏平台并没有WEB端开发,在原生开发和混合开发中哪种合适?
- 有人遇到FlinkCdc同步MySQL时候出现的这个问题吗?
- Summary after reading how to read a Book
- 全面理解MESI缓存一致性协议
- Contents of advanced mathematics
- Oracle reset sequence generator (non rebuild)
- The difference between & & and &
猜你喜欢
随机推荐
stream流(Collectors)用法
UserWarning: Usage of dash-separated ‘script-dir‘ will not be supported in future versions. note
Ora-01950 does not have permission on tablespace
Getting started with the lvgl Library - Animation
Analysis on the specific execution process of an insert statement in MySQL 8.0 (2)
BUUCTF RE-easyre
Agctfb partial solution
由ASP.NET Core根据路径下载文件异常引发的探究
Luoqingqi: has high-end household appliances become a red sea? Casati took the lead in breaking the game
BUUCTF--reverse2
By asp Net core downloading files according to the path
各位大佬 请教下mysqlcdc的数据不支持开窗函数吗 像row_number ,lead这种
IIS server related error
Binary tree
BUUCTF--reverse1
打印100~200之间的素数(C语言)
Alibaba cloud server is installed and configured with redis. Remote access is unavailable
October 17, 2020: question brushing 1
Analysis of reentrantlock source code of AQS
Vmware的下载与安装(基本思路+详细过程)









