News for hackers. Stuff that matters.
Re:What will happen when you commit secrets to a public Git ... by the_duke on Saturday November 07, 2020 @06:41AM (#25014524)
Couldn't auto-revokation be used for a "DOS" attack of sorts by generating a lot of randomized tokens and pushing them to any repo?

I realize that the search space is huge for many tokens types, but it seems viable.

Re:What will happen when you commit secrets to a public Git ... by thdrdt on Saturday November 07, 2020 @06:44AM (#25014540)
Selecting (reading) data is very fast most of the time. So if no token matches I don't think this will result in a DOS.
Re:What will happen when you commit secrets to a public Git ... by spydum on Saturday November 07, 2020 @07:02AM (#25014601)
I think they meant it would autoinvalidate the tokens which might be valid. I think the math on an AWS secret and access key would be ridiculous to brute force.. but other types of keys might be an interesting attack vector.
Re:What will happen when you commit secrets to a public Git ... by OJFord on Saturday November 07, 2020 @10:11AM (#25015482)
If you were guessing valid tokens why would DoSing be more valuable to you than use of the token?
Re:What will happen when you commit secrets to a public Git ... by chaorace on Sunday November 08, 2020 @12:28AM (#25023291)
Bypassing rate limits and amplification, presumably. Just generate a huge list of keys and push once to attack many services at once with the whole set.
Re:What will happen when you commit secrets to a public Git ... by gingerlime on Saturday November 07, 2020 @08:03AM (#25014834)
what about the birthday paradox however? i.e. the attacker doesn’t need to brute force a specific key, but just any key... I guess for AWS the search space is still huge enough for it not to be a problem still (but didn’t do the math)
Re:What will happen when you commit secrets to a public Git ... by time0ut on Saturday November 07, 2020 @09:14AM (#25015170)
I believe AWS secrets are 240 bits. That is a pretty massive space. I don't know how many active secrets are out there, but I think someone would need to get very lucky to collide before the attack was noticed and stopped.

Other partner's secrets may be more susceptible.

Edit: I did not consider the paired access key which is another 70 or so bits. I think you'd need to collide on both to make someone have a bad day.

Re:What will happen when you commit secrets to a public Git ... by remram on Saturday November 07, 2020 @11:27AM (#25015984)
You need to guess both to use them, but you only need to guess the secret to get it revoked. GitHub does not check that the corresponding access key is somewhere in the repo too before taking action. You are right about this being impractical though.
Re:What will happen when you commit secrets to a public Git ... by time0ut on Saturday November 07, 2020 @11:58AM (#25016257)
Ah ok. I wasn't sure how that part worked.
Re:What will happen when you commit secrets to a public Git ... by Hello71 on Saturday November 07, 2020 @09:08AM (#25015145)
seems like you could just log in directly at that rate
Re:What will happen when you commit secrets to a public Git ... by the_duke on Saturday November 07, 2020 @07:50AM (#25014781)
As spydium suggests in a sibling comment, I was not referring to overwhelming Github infrastructure but to mass invalidation of guessed tokens.
Re:What will happen when you commit secrets to a public Git ... by benburleson on Saturday November 07, 2020 @07:54AM (#25014797)
If you can guess keys and secrets, you probably wouldn't use that power to invalidate them!
Re:What will happen when you commit secrets to a public Git ... by delecti on Saturday November 07, 2020 @08:53AM (#25015073)
I suspect this is relying more on a "birthday paradox" approach. The goal wouldn't be to invalidate a particular secret, but rather that with a relatively small number of randomly generated secrets, you would be taking advantage of this setup to invalidate at least some.
Re:What will happen when you commit secrets to a public Git ... by chmod775 on Saturday November 07, 2020 @09:47AM (#25015344)
The point still stands: If you could do that, you would use them, not invalidate them.
Re:What will happen when you commit secrets to a public Git ... by the_duke on Saturday November 07, 2020 @10:12AM (#25015486)
Trying to use millions of generated tokens is not really feasible. Most services will throttle or block you quickly. Also often you would need to know the permissions the token has to get any access.

Writing millions of generated tokens to a text file and pushing them to Github is easy.

There is obviously no meaningful benefit to doing this, except potentially breaking some random deployments until they can replace the keys.