News for hackers. Stuff that matters.
Re:Abusing JSONP with Rosetta Flash by Sephr on Tuesday July 08, 2014 @12:09PM (#8005226)
The mitigation strategy falls short of current best practices.

> if possible use a dedicated sandbox domain.

It's 2014. You don't have to use JSONP and open up your domain to XSS; just use standard and safe XHR with CORS[1]. Every major browser has supported it for years, and for very old browsers that don't support CORS (IE 8), I wrote pmxdr[2] five years ago.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_con...

[2]: https://github.com/eligrey/pmxdr

Re:Abusing JSONP with Rosetta Flash by idbehold on Tuesday July 08, 2014 @04:14PM (#8006528)
> There is one drawback though--it requires that a pmxdr host endpoint be on the target domain

That's one substantial drawback.

Re:Abusing JSONP with Rosetta Flash by simonw on Tuesday July 08, 2014 @12:24PM (#8005304)
Re:Abusing JSONP with Rosetta Flash by jes5199 on Tuesday July 08, 2014 @02:34PM (#8005974)
this is one of those times where the people using badly configured proxies just need to live with a broken internet rather than drag the rest of us down
Re:Abusing JSONP with Rosetta Flash by simonw on Tuesday July 08, 2014 @10:48AM (#8004748)
This is a really, really nasty attack. If you allow JSONP on your domain you are almost certainly vulnerable.
Re:Abusing JSONP with Rosetta Flash by btown on Tuesday July 08, 2014 @11:49AM (#8005096)
Given the nastiness of this attack (a fully interactive client-side backdoor!), the non-trivial nature of the algorithms and coding theory required, and the slow uptake of Flash patches especially in enterprise [1], this seems like downright irresponsible disclosure to share such a detailed post (with a repository and detailed instructions for script kiddies!) so quickly after notifying companies. I can understand all too well how excited the researcher must have been to discover this and share it with the world, but jeez: wait until the Flash patch hits an inflection point on the adoption curve at least!

[1](http://krebsonsecurity.com/2014/05/the-mad-mad-dash-to-updat...)

Re:Abusing JSONP with Rosetta Flash by amenghra on Tuesday July 08, 2014 @08:05PM (#8007424)
Nice to see the exploit finally out.

I gave a talk about the potential for this to happen about a year ago: http://quaxio.com/jsonp_handcrafted_flash_files/

Re:Abusing JSONP with Rosetta Flash by Eridrus on Tuesday July 08, 2014 @09:17PM (#8007632)
People have known about the potential for much longer than a year:

http://www.slideshare.net/guest2821a2/web-browsers-and-other...

http://www.slideshare.net/guest2821a2/web-browsers-and-other...

Actually going out and doing it is something else.

Re:Abusing JSONP with Rosetta Flash by simonw on Tuesday July 08, 2014 @12:28PM (#8005322)
The article suggests a 32 character length limit on callback parameters. Unfortunately this looks to be too short - from examining log files it appears jQuery often uses callbacks of 40 or even 44 characters.
Re:Abusing JSONP with Rosetta Flash by spacemanmatt on Tuesday July 08, 2014 @10:44AM (#8004726)
Why is JSONP any less than an XSS exploit waiting to happen?
Re:Abusing JSONP with Rosetta Flash by simonw on Tuesday July 08, 2014 @10:47AM (#8004744)
I don't think you can use JSONP for XSS. The JavaScript does to execute on the domain that hosts the JS, it executes in the context of the page that loaded the code using a script tag. Allowing attacker-controlled script tags is definitely an XSS hole.
Re:Abusing JSONP with Rosetta Flash by eli on Tuesday July 08, 2014 @11:47AM (#8005081)
The linked article demonstrates even just allowing attacker-controlled function name can allow an XSS hole!
Re:Abusing JSONP with Rosetta Flash by simonw on Tuesday July 08, 2014 @12:27PM (#8005314)
That's due to an extremely complex (albeit easy to exploit) SWF reflection attack.

JSONP itself, though yucky, should still be safe from XSS given a /-star-star-/ prefix and a validated callback parameter.

Re:Abusing JSONP with Rosetta Flash by spacemanmatt on Tuesday July 08, 2014 @12:45PM (#8005402)
> given a /-star-star-/ prefix and a validated callback parameter.

I think that is the "waiting to happen" part of my initial comment.

Re:Abusing JSONP with Rosetta Flash by wmil on Wednesday July 09, 2014 @01:11AM (#8008174)
It seems to me that the real problem is that flash has access to browser cookies without following the browser security model.