Welcome Guest, Not a member yet? Register   Sign In
CSRF and double posting
#20

(06-20-2016, 02:32 PM)spjonez Wrote:
(06-20-2016, 01:49 PM)Narf Wrote: blah blah blah

It's one thing to disagree because of misunderstanding or lack of knowledge, but to dismiss facts as "blah blah blah"?
Are you seriously being that ignorant?

(06-20-2016, 02:32 PM)spjonez Wrote: What does the "A" stand for in AJAX?

This is in no way related to CSRF. What a moronic straw-man, indeed.

What does the "X" in "AJAX" stand for? XML you say?
Are you going to call everybody doesn't use XML a moron?

(06-20-2016, 02:32 PM)spjonez Wrote: If you're making synchronous AJAX calls you've failed on so many levels I don't even know where to begin.

Because you're the judge of everything? Features are features, they all have use cases.
Even if it is a bad feature, you're exaggerating big time and it's beside the point - I've stated what asynchronicity is what creates a problem for you, not that you should use blocking AJAX calls.

Again, nothing related to CSRF.

(06-20-2016, 02:32 PM)spjonez Wrote: I'd love to see how you manage concurrent AJAX requests with this enabled since CI's implementation uses a single valid token.

Still, you don't understand how the CSRF protection mechanism works and/or what concurrency means. You don't need to do any extra work for concurrent requests to work.

What matters is the cookie value at the time of submission. If it was possible to have 1000 concurrent (meaning: simultaneous) requests, they'd all pass, because they would all carry a matching cookie + form token pair.

(06-20-2016, 02:32 PM)spjonez Wrote: I'm astounded I even had to say asynchronous as only a complete moron would send synchronous AJAX calls.

I'm astounded by your insistence that how AJAX works best is somehow a security consideration.

(06-20-2016, 02:32 PM)spjonez Wrote: The spec is even deprecating this behaviour and for good reason.

I'm sure there's a good reason for that. In fact, I'm sure there's more than one reason.
However, you talk too much smack and present yourself as a credible authority on the subject, while not showing much substance, and I'm not convinced that you know that "good reason" yourself.

(06-20-2016, 02:32 PM)spjonez Wrote: Let's lock browser threads! Yay!

... I don't even want to know what you mean by that.

(06-20-2016, 02:32 PM)spjonez Wrote: If you aren't vulnerable to XSS attacks, can you provide an example of a security hole created by using a single token vs a token that changes per request?

First of all - per POST request, not per any request.
You know you're cherry picking here and by doing that you're ignoring a very reasonable trade-off, playing up "hard to implement" types of problems that you create for yourself, and that your whole argument is based around.

Second, "if you aren't vulnerable to XSS attacks" is a somewhat valid point to dismiss immediate threats, but also a very sneaky way of trying to control the narrative. We're talking about information security - consider all cases, don't assume that nothing will break; assumptions are the evil.

Third, nobody has said that not regenerating automatically creates a critical security flaw, like you're implying.
It's mitigation for lesser evils, but evils nonetheless.

And to answer your question: CSRF tokens can not only be stolen, but also planted. That is way worse if it happens, because even if I'm charitable enough to assume that at least you have a sane cookie expiry time configured, an attacker can override that and make you a target for years.

(06-20-2016, 07:00 PM)spjonez Wrote: I'd love to hear it because apparently the security company we paid to smash away at our app for 3 days straight wasn't able to find one.

I don't know your app, but judging by your earlier suggestion of X-Frame-Options - if you use that, of course they aren't going to find an issue.
I don't know the company, team & expertise level of those who audited it - there are a lot of crappy security auditors.
I don't know what you consider a "hole" and how honest you are here - many potential issues are raised as "info" or "warning" items on audit reports. Judging by your behavior so far, you may be twisting this all kinds of ways.

(06-20-2016, 07:00 PM)spjonez Wrote: And please, don't say "in theory if they get your token"... if they can steal it once they can steal it 100 times.

You don't know that.

I may stumble upon it by accident.
I may read it once while having limited-time access.
I may not be able to re-steal it less time than it takes to regenerate.

(06-20-2016, 07:00 PM)spjonez Wrote: ...

I said concurrent AJAX requests, you can't send concurrent synchronous AJAX requests since JS is single threaded so I'm not sure what else to take from that. Yes you can multi-thread with web workers but the DOM paints in a single blocking thread.

...

I'm not arguing the theory, that would be pedantic

Oh, now we don't want to be pedantic? What happened to the A in AJAX?

Here's something pedantic: JS and DOM aren't single-threaded, and the latter is not even a relevant term. Browser implementations may be single-threaded - that's a different thing.

(06-20-2016, 07:00 PM)spjonez Wrote: but in reality the limits imposed by per request CSRF tokens simply aren't worth the theoretical security advantages.

So we went from "adds nothing to security" to "theoretical security advantages" ... I guess that's some progress at least.

Here's the thing about theory though: opinions, everybody has them. And what isn't worth it for you is not the definitive answer for everybody.

(06-20-2016, 07:00 PM)spjonez Wrote: Can you imagine how an app like Google Docs would function without multiple concurrent requests? Our app is an editor that's very similar and it wouldn't be worth building under those constraints.

See, the same thing again: Different use cases, different considerations, different trade-offs, different solutions.
Just because you don't believe it's worth it for you, doesn't mean that the double-submit cookie mechanism was even the right solution for you in the first place.

(06-20-2016, 07:00 PM)spjonez Wrote: Having a user click back and being unable to submit a form provides a bad user experience

Have you heard of the PRG pattern? And applying different solutions to different problems in general?

(06-20-2016, 07:00 PM)spjonez Wrote: and security should never trump usability.

Sorry, but this quote alone disqualifies you from talking about security. You don't get it, you don't take it seriously enough.

(06-20-2016, 07:00 PM)spjonez Wrote: If it does another approach to security is needed not the other way around.

You're not suggesting another approach, you're telling people to decrease security.
Reply


Messages In This Thread
CSRF and double posting - by PaulD - 06-18-2016, 11:03 PM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 12:05 AM
RE: CSRF and double posting - by John_Betong - 06-20-2016, 09:25 PM
RE: CSRF and double posting - by skunkbad - 06-20-2016, 10:55 PM
RE: CSRF and double posting - by PaulD - 06-19-2016, 12:43 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 01:00 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 03:19 AM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 09:30 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 03:06 PM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 03:35 PM
RE: CSRF and double posting - by PaulD - 06-19-2016, 05:59 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 11:18 AM
RE: CSRF and double posting - by Narf - 06-20-2016, 12:26 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 12:37 PM
RE: CSRF and double posting - by Narf - 06-20-2016, 01:49 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 02:32 PM
RE: CSRF and double posting - by PaulD - 06-20-2016, 01:46 PM
RE: CSRF and double posting - by PaulD - 06-20-2016, 04:02 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 07:00 PM
RE: CSRF and double posting - by Narf - 06-21-2016, 03:38 AM
RE: CSRF and double posting - by spjonez - 06-21-2016, 08:54 AM
RE: CSRF and double posting - by Narf - 06-22-2016, 05:14 AM
RE: CSRF and double posting - by Martin7483 - 06-23-2016, 03:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB