Closed awh closed 7 years ago
Reproduced successfully on cloud.weave.works this morning; csrf_token
values are different in the two browser profiles I used to simulate the attacker & victim.
The verification used to work, See https://groups.google.com/a/weave.works/d/msg/security/R0R9O15NEoE/XkVFg9fxBQAJ
Last time I checked, I got the following error:
AFAICT, the request is a GET and we have exempted GETs from CSRF checks (for, iirc, good reasons).
Even if it's a GET request we check it explicitly. Note that we are invoking the verifier manually on the status parameter.
What you are suggesting would be true for any other GET requests.
On Apr 28, 2017 3:19 PM, "Matthias Radestock" notifications@github.com wrote:
AFAICT, the request is a GET and we have exempted GETs from CSRF checks (for, iirc, good reasons).
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/weaveworks/service/issues/1187#issuecomment-297995636, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQOJLzEAPCxRvPFzsj_NrlR1U_jWW68ks5r0ed6gaJpZM4NLSXM .
When linking my weave cloud, I get the state eyJ0b2tlbiI6IiJ9%3AeyJ0b2tlbiI6IiJ9zn4cLCTcVj-ianBlnRUlAJ8U9_kr_XOOEh4ZtDj8F3Q
. This is exactly the same state as the one from the video, which shows that we could be always creating the state hmac.New(sha256.New, []byte(a.Config.ClientSecret)).Sum("")
- the token always being "" because of the GET request exception.
So it looks like the problem is that the state is the same for everyone.
Well spotted, @aaron7!
So should we simply be adding a nonce here?
That could be it, although Tokens are initialized in GET requests (butt not verified), see how the safety of methods is checked after generating the token.
Either way, it's clear something is wrong. I will take it up
I get the state
eyJ0b2tlbiI6IiJ9%3AeyJ0b2tlbiI6IiJ9zn4cLCTcVj-ianBlnRUlAJ8U9_kr_XOOEh4ZtDj8F3Q
. This is exactly the same state as the one from the video
I can also reproduce (locally)
Actually, not true, the prefix is the same though eyJ0b2tlbiI6IiJ9%3AeyJ0b2tlbiI6IiJ9iHjSlN5vWsWe6ZIGAulGW12vzOlnjGc0gPSNQrBPKn4
Actually, not true, the prefix is the same though
eyJ0b2tlbiI6IiJ9%3AeyJ0b2tlbiI6IiJ9iHjSlN5vWsWe6ZIGAulGW12vzOlnjGc0gPSNQrBPKn4
is that from cloud.weave.works?
it's local
local probably has a different ClientSecret
- could you try and reproduce on cloud.weave.works?
You are right, I get the exact same state. I will look into this
https://groups.google.com/a/weave.works/d/msg/security/3yJ5xswqbkI/qlANg_aqBwAJ
Attack Preparation
Attack