News for hackers. Stuff that matters.
Re:Running Rails? Defend yourself against BREACH by beambot on Saturday August 03, 2013 @01:07AM (#6151198)
I'm a bit confused.... In the mitigation section, the paper states: "However, we remark that requiring a valid CSRF token for all requests that reflect user input would defeat the attack."

Isn't that the point of CSRF? That's the advice Django provides anyway...

Re:Running Rails? Defend yourself against BREACH by sdevlin on Saturday August 03, 2013 @06:48AM (#6151749)
Typically CSRF tokens are only required for state-changing requests - POSTs, PUTs, DELETEs.

They're broadening that recommendation also to include pages that reflect input. Think GET requests that take query string parameters. So e.g. https://google.com/search?q=pajamas would become https://google.com/search?q=pajamas&csrf=etcetc.

It seems like a pretty impractical mitigation to me. For one thing, it would make it very difficult to share links; a link containing my CSRF token wouldn't work for you. It would also make it much easier to give up your CSRF token. We would need to retrain people to think of the URLs they're viewing as personal and secret.

Re:Running Rails? Defend yourself against BREACH by btilly on Saturday August 03, 2013 @01:23AM (#6151235)
The first version of the attack, yes.

But as http://arstechnica.com/security/2013/08/gone-in-30-seconds-n... makes clear, another variant lets you get the CSRF token, and after that the CSRF token is no protection at all against anything else that people try.

Re:Running Rails? Defend yourself against BREACH by homakov on Saturday August 03, 2013 @01:43PM (#6152712)
obviously second version (when CSRF token is stolen) is not possible to mitigate.
Re:Running Rails? Defend yourself against BREACH by btilly on Saturday August 03, 2013 @02:07PM (#6152780)
There is a way that the CSRF attack could be prevented. And that is if only every other byte of the CSRF token was part of the token, and the others were random every time.

In that case it would be impossible to predict common text in the CSRF based on past compression rounds.

Re:Running Rails? Defend yourself against BREACH by homakov on Saturday August 03, 2013 @02:11PM (#6152798)
XOR-based masking, yes, but I thought we were talking about currently common systems.

Until BREACH nobody masked tokens, did they?

Re:Running Rails? Defend yourself against BREACH by btilly on Saturday August 03, 2013 @04:17PM (#6153217)
Nobody did, but that is how life goes. An attack is found. A defense is found. And you can't build a secure system without knowing all of the attacks and corresponding defenses.
Re:Running Rails? Defend yourself against BREACH by homakov on Saturday August 03, 2013 @06:31PM (#6153681)
i wouldn't call it a proper defense, rather a work around. besides CSRF tokens there are lots of secret strings, and it's not website's problem to avoid wiretapping
Re:Running Rails? Defend yourself against BREACH by homakov on Saturday August 03, 2013 @12:48PM (#6152574)
Django is vulnerable to cookie forcing. BREACH is not needed, CSRF token can be replaced with active MITM