Simon
Simon

Reputation: 5698

XSS in IE - Way to bypass?

Since IE 8 has an XSS filter, is there really no way to exploit an XSS exploit using this browser? For example, a cookie stealer isn't a threat to my site anymore?

(If you think this is not correct and you have a possible flaw in the filter, I'd like to know)

Upvotes: 2

Views: 3459

Answers (3)

Vaibs
Vaibs

Reputation: 2106

Ie basic XSS filter processes the outgoing request by first checking where the request is been generated.I mean for a reflective XSS the request may be generating from attackers system in order do put malicious script. So by extension there should be no point in looking at requests that originate from the same domain as this would be a waste of resources.

However IE is making an incorrect assumption, XSS can come from anywhere and there for any reflective XSS vulnerability can become exploitable due to this incorrect assumption. IE has taken “location:” HTTP header redirects into consideration as well as meta refresh HTML tags. There are however other redirection methods which can be used in an attack.

Now let us assume there is a straight forward XSS vulnerability in our target application found in the xss.php file:

<?php
//xss.php
print $_GET['var'];
?>

Assume OWASP a10 violation found in the redir.php file.

<?php
//redir.php
print “<script>”;
print “document.location='”.htmlspecialchars($_GET['redir'],ENT_QUOTES).”'”;
print “</script>”;
?>

The Proof of Concept exploit for an application like this is as follows:

http://abc.com/redir.php?redir=http%3A%2F%2Fabc.com%2Fxss.php%3Fvar%3D%253Cscript
%253Ealert%2528%2Fxss%2F%2529%253C%2Fscript%253E

Above link could originate from anywhere, including a url shrinking services . The XSS payload is the “var” GET variable. This part of the PoC has been double url encoded. There for an angled bracket “>” becomes “%253E”. This is encoding fools both the htmlspecialchars() on the server as well as IE's filter. This encoded payload is unaffected by the call to htmlspecialchars() and would behave in the same way with its absence.

Upvotes: 4

EricLaw
EricLaw

Reputation: 57095

There are several types of XSS attack; the IE XSS filter is designed to block the most common form of Reflected XSS attacks. See http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx for background on what the filter does.

You absolutely should continue to follow best-practices for XSS prevention.

Upvotes: 1

orbital
orbital

Reputation: 139

The XSS-Filter in IE8 can sure be beaten. It depends on the XSS-Vuln in the page whether it's possible or not. For example you can use weird encodings or a double XSS attack. Edit: This is an in-the-wild example of an XSS-Attack that would pass the IE8-Filter: XSS on esrb.org

Upvotes: 4

Related Questions