News for hackers. Stuff that matters.
Re:Hacking a Virtual Power Plant by ckwalsh on Friday August 09, 2024 @05:08PM (#41205415)
> the legitimate ones I’d initially generated still worked

This spooks me. I take this to mean either:

- They are still using the compromised key for validation, meaning if you have access to any old token, you can still mutate that, maybe needing to play around with the issuing times

- They built an allowlist of all permitted tokens, and check that list first. In which case, might as well use random session ids instead of JWTs, and at the same point where the allowlist is being checked, mutate the request to inject a JWT that the backend can use.

Also, kind of curious why the switch to RSA4096 instead of elliptic curves, since they are generally faster / smaller.

Re:Hacking a Virtual Power Plant by ryan-c on Friday August 09, 2024 @05:33PM (#41205556)
I think very few customers had ever generated API keys, and as best I can tell they made an allowlist for them.

One of my suggestions to them was to switch to elliptic curve, but I imagine RSA 4096 "just worked".

I suspect they'll rework it later now that it's not "on fire".

Re:Hacking a Virtual Power Plant by ckwalsh on Friday August 09, 2024 @06:03PM (#41205730)
Ah that makes sense. For sufficiently small values of N, a hardcoded allowlist isn't a problem.

You're probably right that RSA 4096 "just worked", and some library in their stack doesn't have elliptic curve support. And again, if N is small, the verification performance doesn't matter that much.

Nice find and writeup!

Re:Hacking a Virtual Power Plant by selecsosi on Friday August 09, 2024 @05:38PM (#41205580)
My guess is they are still accepting keys signed with the old 512 key but are currently generating new tokens with a 4096 key.
Re:Hacking a Virtual Power Plant by rahkiin on Saturday August 10, 2024 @03:24AM (#41207911)
No because Ryan says he is not able to create his own tokens anymore. And he has the same private key as the supplier.
Re:Hacking a Virtual Power Plant by bo0tzz on Saturday August 10, 2024 @12:01PM (#41210381)
FYI, Ryan uses they/them pronouns (https://rya.nc/about.html).
Re:Hacking a Virtual Power Plant by rahkiin on Wednesday August 14, 2024 @02:16AM (#41243123)
Ah sorry and stupid for assuming, I would edit but cannot anymore.