-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAASgBwYFK4EEACKhZANiAAQTglHNUqySmMHIqtl3Mh3rl+cJvQtMoKyl
XcitUdz8nRWJoVl+OlEg4e/WMcY+GDXKyuKYaaYuFjHoooGBq1ZhbcRdkYq8CfOr
DmPPeSqk3O1zh743u6VpVJ8cArJw7Wc=
-----END EC PRIVATE KEY-----
Replying to @fluepke@chaos.social
Private Key für "C=US, O=eMudhra Inc, CN=EM OV TLS CA - G3C" #emudhra
Replying to @fluepke@chaos.social
The private key (D) is 4.
No joke.
Verification:
openssl pkey -in key.pem -pubout -outform DER | openssl dgst -sha256
openssl x509 -in cert.pem -pubkey -noout | openssl pkey -pubin -outform DER | openssl dgst -sha256
Replying to @fluepke@chaos.social
Supporting materials (e.g. cert.pem): https://gist.github.com/Fluepke/9a103c7f990c3cc2fb5002f7476f2f48
gist.github.com/Fluepke/9a103c7f990c3cc2fb5002f7476f2f48
GistC=US, O=eMudhra Inc, CN=EM OV TLS CA - G3CC=US, O=eMudhra Inc, CN=EM OV TLS CA - G3C. GitHub Gist: instantly share code, notes, and snippets.Replying to @fluepke@chaos.social
All compromised intermediates + keys: https://github.com/Fluepke/emudrahahahahaha
github.com/Fluepke/emudrahahahahaha
GitHubGitHub - Fluepke/emudrahahahahaha: Private KeysPrivate Keys. Contribute to Fluepke/emudrahahahahaha development by creating an account on GitHub.Replying to @fluepke@chaos.social
@fluepke private keys von wem oder was?
Irgend eine NL Firma:
eMudhra BV,C=NL.pem
klingt etwas indisch.
Und jetzt?
Ich toure auch nicht mit einem gefundenen funkschlüssel durchs land und sehe nach an welchem auto der passt.
Replying to @luja@chaos.social
Replying to @luja@chaos.social
@luja l0l
Replying to @fluepke@chaos.social
@fluepke amazing repo name
Replying to @fluepke@chaos.social
@fluepke @hipsterelectron omg look 
Replying to @mooooooo@qaf.men
@fluepke @hipsterelectron I feel much better about my key generation ideas now 
Replying to @fluepke@chaos.social
emudhra.we-have-a-problem.com/
there're patches for cert lists and checkers, two root CA were affected.
Replying to @fluepke@chaos.social
@fluepke Chosen by fair dice roll! 😹
Replying to @jaseg@chaos.social
@jaseg @manawyrm @fluepke She is talking about this: https://xkcd.com/221/
xkcd.com/221/Replying to @fluepke@chaos.social
@fluepke da kann man auch echt gleich mit dem Nullpunkt multiplizieren, das ist nicht viel unsicherer -.-
Replying to @fluepke@chaos.social
@fluepke well someone took the xkcd too serious
Replying to @fluepke@chaos.social
@fluepke Wait, for the uninformed, how does one determine that (D) is 4?
Edit: I googled it.
~ $ openssl pkey -in privkey.key -text -noout
Private-Key: (384 bit)
priv:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:04
pub:
04:13:82:51:cd:52:ac:92:98:c1:c8:aa:d9:77:32:
1d:eb:97:e7:09:bd:0b:4c:a0:ac:a5:5d:c8:ad:51:
dc:fc:9d:15:89:a1:59:7e:3a:51:20:e1:ef:d6:31:
c6:3e:18:35:ca:ca:e2:98:69:a6:2e:16:31:e8:a2:
81:81:ab:56:61:6d:c4:5d:91:8a:bc:09:f3:ab:0e:
63:cf:79:2a:a4:dc:ed:73:87:be:37:bb:a5:69:54:
9f:1c:02:b2:70:ed:67
ASN1 OID: secp384r1
NIST CURVE: P-384
Replying to @fluepke@chaos.social
@fluepke Jetzt weiß ich auch, wofür das AAAAAAAAAAA... steht
/s
Replying to @waldi@chaos.social
@waldi AAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHH
Replying to @fluepke@chaos.social
EM OV TLS CA - G3C 4
EM EV TLS CA - G3C 56
EM DV TLS CA - G3C 230
EM OV CS CA - G3C 237
EM EV TLS CA - G3B 115
EM OV TLS CA - G3B 155
EM DV TLS CA - G3B 156
EM OV CS CA - G3B 66
wrote a little script to bruteforce the others...
Replying to @jjtech@infosec.exchange
@jjtech @fluepke Fun fact: they apparently use Utimaco HSM's. Utimaco provides a simulator to run the HSM firmware/software on a standard OS, and it accepts importing e.g. the '4' key, and signing with the imported key is possible too. There seems to be no entropy or whatsoever check during import (presumably in FIPS mode, which is unavailable in the simulator though).
Replying to @fluepke@chaos.social
@fluepke How the fuck did that happen? Also lässt sich das noch anders plausibel erklären als durch Sabotage?
Replying to @fluepke@chaos.social
@fluepke
Und ich schlag mich hier mir Impostersyndrom rum? Und die betreiben mit sowas ihre CA?
Alles kaputt. Echt alles kaputt.
Replying to @fluepke@chaos.social
Private-Key: (384 bit)
priv:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
00:00:04
pub:
04:13:82:51:cd:52:ac:92:98:c1:c8:aa:d9:77:32:
1d:eb:97:e7:09:bd:0b:4c:a0:ac:a5:5d:c8:ad:51:
dc:fc:9d:15:89:a1:59:7e:3a:51:20:e1:ef:d6:31:
c6:3e:18:35:ca:ca:e2:98:69:a6:2e:16:31:e8:a2:
81:81:ab:56:61:6d:c4:5d:91:8a:bc:09:f3:ab:0e:
63:cf:79:2a:a4:dc:ed:73:87:be:37:bb:a5:69:54:
9f:1c:02:b2:70:ed:67
ASN1 OID: secp384r1
NIST CURVE: P-384
@fluepke 😭😭😭
Replying to @robodoll@bot.girldat.ing
@robodoll@bot.girldat.ing @fluepke@chaos.social oh this is something... Reading here too that 8 of the leaked once where apparently 2 digit hex values. That's somewhat crazy
Replying to @fluepke@chaos.social
@fluepke Reminds me of tom7's HTTPV https://tom7.org/httpv/httpv.pdf
Replying to @fluepke@chaos.social
@fluepke keys are dead in the water now
https://ct-emsign.exe.xyz/
Replying to @fluepke@chaos.social
@fluepke i mean they're usually much bigger. this is my favourite kind of security: security by "they'll never think to check this!"
Replying to @fluepke@chaos.social
@fluepke what the actual fuck
Replying to @fluepke@chaos.social
@fluepke Mit einem Vierenscanner (sic!) wäre das eMudhra vielleicht selbst schon früher aufgefallen.
Replying to @fluepke@chaos.social
@fluepke Chinese CAs would have avoided that number. 😅
Replying to @erlenmayr@chaos.social
@erlenmayr @fluepke they would have taken 8, which is twice as secure.
Replying to @fluepke@chaos.social
— Open image attachment 1 of 1Replying to @fluepke@chaos.social
@fluepke My reaction is contained in the private key:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Replying to @fluepke@chaos.social
@fluepke 🤦♂️
Replying to @fluepke@chaos.social
@fluepke What, WHUT? https://xkcd.com/221/
xkcd.com/221/Replying to @fluepke@chaos.social
@fluepke Fuuuck...
Replying to @fluepke@chaos.social
@fluepke how did nobody notice that earlier?!
Replying to @fluepke@chaos.social
@fluepke endlich keine lets encrypt rate limits mehr 🥳
Replying to @fluepke@chaos.social
@fluepke oder, wie wir ihn unter uns auch mal nennen, 4.
Replying to @fluepke@chaos.social
@fluepke As long as they keep it private. Wait a moment...
Replying to @fluepke@chaos.social
@erd ich habe den Verdacht, dass:
1. Das HSM im C_GenerateKeyPair falsch parametrisiert wurde und das HSM die falsche Parametrisierung nicht ablehnte, wodurch Key Length = 1.
2. Firmware Bug im HSM, wodurch accidentally nur das erste Byte random ist.
Replying to @fluepke@chaos.social
@erd die CPS sagt, dass ein HSM benutzt wird für KeyGen und so‘ne Wirtschaftsprüfungsbude bestätigt das. Ich trau denen nicht viel zu, aber zu gucken, ob da nen HSM benutzt wird, traue ich denen zu.
Eine solche Schwachstelle in einem handelsüblichen HSM hätten wir aber schon längst mitbekommen?!
Replying to @fluepke@chaos.social
Replying to @fluepke@chaos.social
@erd aber alles nur Spekulatius.
Als Presse würde ich bei eMudhra mal anrufen und nachfragen, welches HSM sie benutzen und wie genau sie die Keys erzeugt haben.
Replying to @fluepke@chaos.social
@fluepke @erd Die verwendeten HSMs haben sie disclosed. https://bugzilla.mozilla.org/show_bug.cgi?id=2083449#c12
Replying to @holger@toot.berlin
@holger @fluepke @erd Bold hypothesis #1: they used some example key and imported it into the HSM.
Bold hypothesis #2: they used the Utimaco HSM Simulator (" SecurityServer Simulator" from https://utimaco.com/data-protection/simulators-and-trials) as an "HSM" without it being a proper HSM.
I just successfully imported the "4" key into the 6.6.0.0 sim version and used it for signing. So at least this path is a working option (I don't have access to actual Utimaco HW atm - this maybe also could work on a 'true' HW-based HSM).
utimaco.com/data-protection/simulators-and-trialsReplying to @fluepke@chaos.social
@fluepke omg... this is unbelieveable... omg.... how did that happen?
Replying to @fluepke@chaos.social
@fluepke@chaos.social amazing
Replying to @fluepke@chaos.social
@fluepke it's always a great sign when a private key is full of screaming.
(For anyone watching who doesn't stare at b64 all day: repeated 'A' characters decode to the octet value 0. Private keys should have lots of randomness to be "strong", and a long sequence of zeroes is not particularly random)
Replying to @fluepke@chaos.social
@fluepke 🧐 Nanu, was soll das für ein Key sein? Den kann man jetzt auch nur noch zum Entschlüsseln nehmen.




:fuck-yeah:

