Hacking With XSS Auditor

Today's topic is really interesting. We are not hacking XSS Auditor anymore, we are hacking with it.
I'll tell you how to steal referers with sensitive information.

First of all, there are three values of 'X-XSS-Protection' header which control XSS Auditor: 0; 1; and1;mode=block.
First one just switches it off(I recommend it, lol).
1; is default, it detects XSS and tries to remove malicious code.
1;mode=block means basically if anything has been detected - redirect to about:blank. People used to think about it as the most secure one. Actually, no!
Steps for the hack are very simple(TL;DR is point 5):

  1. choose URL which redirects automatically(or with some user interaction) to another URL, and also carries both Private Info and Custom Payload.

    For OAuth and Single Sign On implementations Private Info is code/token/signed_request. It can be also kind of SID if it was added automatically to original URL, not removing Custom Payload.

    Custom Payload - part of redirect_uri if it's not static or some kind of 'state', which is used in OAuth to prevent CSRF and basically returned back along with code(And I found the Most Common Vulnerability with it another day).
  2. Look at the source code of the final page which user is redirected to. Choose some  or  or  or etc. Anything, that will look like an "injection" for Mr. Auditor. Copy it and encode.
  3. Now put it in the original URL in your Custom Payload. for example 'state=%3Cscript%3Esetup()%3C%2Fscript%3E'
  4. create MalloryPage. You can use
Hacking With XSS Auditor Hacking With XSS Auditor Reviewed by Krutik on 10:14:00 Rating: 5

No comments:

Powered by Blogger.