what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Google Chrome Cross Site Scripting Protection Bypass

Google Chrome Cross Site Scripting Protection Bypass
Posted May 26, 2011
Authored by Manuel Fernandez

A bypass vulnerability has been discovered in the Google Chrome cross site scripting filter.

tags | exploit, xss, bypass
SHA-256 | b886bd58cbc97af25ae7bfe032c24f90a0af6592e1298754105810d537a22a39

Google Chrome Cross Site Scripting Protection Bypass

Change Mirror Download
Hello,

During the creation of a hacking challenge about XSS we had to figure out how to bypass the new AntiXSS filter in Google Chrome. It was included in the latest release and we were in the middle of a hacking challenge about XSS and Sesion Fixation. We were thinking about to change the rules of the game, but, we managed to bypass the filter in an easy way, so we didn´t change it and players were also able to discover it. This is the "how":

When a string that can execute any kind of javascript which it is injected, like could be <img src=”noexist” onerror=”alert();”/>, Google Chrome fix the source code in runtime, replacing the original string by the following, <img src="noexist" onerror="">, so the injected javascript code is missed and it’s not possible to execute any attack.

Chrome also has a function to fix or rewrite HTML source code that isn’t well-formed. If a website that contains a tag like ‘’, it will try to rewrite the source code to construct a proper HTML code. For example, if we introduce a string like <img src="noexist" onerror=alert, Chrome will try to close the img tag with the following closing tag, in this case <html>.
<img src="noexist" onerror="alert!!!</html">

It can give to an attacker a vector to bypass the Anti-XSS filter, due to it applies first the filter and then checks whether the HTML code is well-formed or not, modifying it if needed..

So, it’s possible to create a non-well-formed tag, that after being rewritten, it will be a properly XSS.
An example of it may be this one: <img src="noexist" onerror=alert();//, due that it would be rewrote as <img src="noexist" onerror="alert();//!!!</html">, bypassing the AntiXSS filter.

Best Regards,

Manu "The Sur" and Rodolfo Bordon from Informatica64.com

Manuel Fernández
Informática 64
Dep. Desarrollo y Seguridad
C/ Juan Ramón Jiménez, 8 Bajo Post. Local
28932 Móstoles - Madrid
Telf. 91 146 20 00 – Fax: 91 146 20 03
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close