【40】WEB安全学习----URL跳转漏洞

xiaoxiao2025-08-05  107

URL跳转漏洞/开放重定向漏洞

由于应用越来越多的需要和其他的第三方应用交互,以及在自身应用内部根据不同的逻辑将用户引向到不同的页面,如果实现不好就可能导致一些安全问题,特定条件下可能引起严重的安全漏洞。

对于URL跳转的实现一般会有几种实现方式:

META标签内跳转javascript跳转header头跳转

通过以GET或者POST的方式接收将要跳转的URL,然后通过上面的几种方式的其中一种来跳转到目标URL。一方面,由于用户的输入会进入Meta,javascript,http头所以都可能发生相应上下文的漏洞,如xss等等,但是同时,即使只是对于URL跳转本身功能方面就存在一个缺陷,因为会将用户浏览器从可信的站点导向到不可信的站点,同时如果跳转的时候带有敏感数据一样可能将敏感数据泄漏给不可信的第三方。

危害

恶意用户完全可以借用URL跳转漏洞来欺骗安全意识低的用户,从而导致“中奖”之类的欺诈,这对于一些有在线业务的企业如淘宝等,危害较大,同时借助URL跳转,也可以突破常见的基于“白名单方式”的一些安全限制,如传统IM里对于URL的传播会进行安全校验,但是对于大公司的域名及URL将直接允许通过并且显示会可信的URL,而一旦该URL里包含一些跳转漏洞将可能导致安全限制被绕过。

绕过方法

1. 单斜线"/"绕过 https://www.landgrey.me/redirect.php?url=/www.evil.com 2. 缺少协议绕过 https://www.landgrey.me/redirect.php?url=//www.evil.com 3. 多斜线"/"前缀绕过 https://www.landgrey.me/redirect.php?url=///www.evil.com https://www.landgrey.me/redirect.php?url=www.evil.com 4. 利用"@"符号绕过 https://www.landgrey.me/redirect.php?url=https://www.landgrey.me@www.evil.com 5. 利用反斜线"\"绕过 https://www.landgrey.me/redirect.php?url=https://www.evil.com\www.landgrey.me 6. 利用"#"符号绕过 https://www.landgrey.me/redirect.php?url=https://www.evil.com#www.landgrey.me 7. 利用"?"号绕过 https://www.landgrey.me/redirect.php?url=https://www.evil.com?www.landgrey.me 8. 利用"\\"绕过 https://www.landgrey.me/redirect.php?url=https://www.evil.com\\www.landgrey.me 9. 利用"."绕过 https://www.landgrey.me/redirect.php?url=.evil (可能会跳转到www.landgrey.me.evil域名) https://www.landgrey.me/redirect.php?url=.evil.com (可能会跳转到evil.com域名) 10.重复特殊字符绕过 https://www.landgrey.me/redirect.php?url=///www.evil.com//.. https://www.landgrey.me/redirect.php?url=www.evil.com//..

其它绕过思路

跳转到IP地址,而不是域名;跳转到IPV6地址,而不是IPv4地址;将要跳转到的IP地址用10进制、8进制、16进制形式表示;更换协议,使用ftp、gopher协议等;借鉴SSRF漏洞绕过的tricks;CRLF注入不能xss时,转向利用任意URL跳转漏洞;
转载请注明原文地址: https://www.6miu.com/read-5034342.html

最新回复(0)