Chrome 18 Anti-XSS Bypass

Type packetstorm
Reporter Keith Makan
Modified 2012-06-02T00:00:00


                                            `# Exploit Title: Chrome 18 anti-XSS bypass  
# Date: 2012-05-31  
# Author: k3170makan  
# Vendor or Software Link: [download link if available]  
# Version: 18.0.1025.162  
# Category:: local  
# Google dork: N/A  
# Tested on: Ubuntu 10.04  
# Demo site: N/A  
Chrome 18---and possibly 19--- versions anti-XSS filter or XSSAuditor as  
its called does not pick up certain XSS vectors.  
Its possible to by pass the XSSAuditor by fooling it into believing that  
the javascript you inject is commented out.  
To do this you need to use both in line and multiline comment tags after  
one another in the injection:  
Code Snippet:  
else if (startsMultiLineCommentAt(string, startPosition)) {  
if ((foundPosition = string.find("*/", startPosition)) != notFound)  
startPosition = foundPosition + 2; /*<--- skips 2 chars here*/  
Because the Auditor skips two chars you can fool it by add another  
slash to an inline incomment that succeeds a multiline comment e.g  
So you need to make sure that in your injection---before any actual  
javascript syntax---you include "/*///" and make sure to close the comment  
as well  
Some examples would be:  
<script>/*///*/alert(1);</script> #it will pick up the multiline comment  
here and skip to the next 2 chars, which will again be comments, so the  
check will pass leaving the javascript alone!  
you can add whatever chars you want to the vector after the '/*///' part as  
long as you close the comment obviously.  
Chrome Issue track --->  
gr33ts Telspace Systems ;)