News for hackers. Stuff that matters.
Re:An XSS on Facebook via PNGs and Wonky Content Types by PeCaN on Wednesday March 16, 2016 @08:38PM (#11301830)
That is incredibly clever, particularly exploiting DEFLATE to generate text. I would've never thought of that.
Re:An XSS on Facebook via PNGs and Wonky Content Types by viraptor on Wednesday March 16, 2016 @09:07PM (#11301940)
They didn't use DEFLATE to generate the text. They used a known text and prepended garbage to it until it DEFLATEd correctly (to any result). Small difference, but still.
Re:An XSS on Facebook via PNGs and Wonky Content Types by deathanatos on Wednesday March 16, 2016 @09:55PM (#11302111)
The author seems aware that it is possible, however:

> Rather than trying to create this by hand, I used a brute-force solution (I’m sure there are much better ways, but I wanted to whip up a script and leave it running):

He just didn't want to learn DEFLATE right then, right there. He got the same result.

FWIW, I don't think this is actually hard. DEFLATE has a small header that tells you want type of compressed data follows; one of the types is "literally, this data" which is up to 64KiB long. (i.e., a plenty long enough string to get the job done.)