News for hackers. Stuff that matters.
Re:Security advisory: Breach and Django by level09 on Tuesday August 06, 2013 @10:59AM (#6166914)
This would cause a big problem for us. we mobile web service serves around 3-4k concurrent requests on average. without compression our API would take 300% - 900% increase in the delay.

is there any alternatives ? would like to know what Cloud Flare would do as their CDN is based on compressed nginx responses.

Re:Security advisory: Breach and Django by pudquick on Tuesday August 06, 2013 @11:32AM (#6167126)
As gzip compression only applies to the content of the page, not the headers, I would assume that prefixing your page with content that is variably compressible and of varying lengths would throw a monkey wrench in the attacks.

The compressed content of any part of a page very much depends on what came before it. Altering the content to include a script comment block full of random text and various common HTML and JavaScript elements (Markov chains anyone?) would definitely change how a page is compressed.

If the compressed length of the replies varies significantly with every request - even if the request content is identical - attacks like this can no longer reveal hidden information.

Edit:

You could improve this significantly by including false positive matches as well. If your HTML content has: csrf="45a7..." in it, you could hash that content into enough material to generate 19 or so identical looking code blocks embedded in a script comment. You've now provided a 95% chance they attack the wrong one / increased the number of attacks they'll need to try by 20x.

This method (minus the above part) would actually be cacheable by smart CDNs like Cloudflare.

Re:Security advisory: Breach and Django by Daniel_Newby on Tuesday August 06, 2013 @04:47PM (#6169062)
Random padding can be averaged out. It increases the work factor of the attack, but not by much.