Skip to content

Instantly share code, notes, and snippets.

@mathiasbynens
Last active August 5, 2023 03:20
Show Gist options
  • Save mathiasbynens/7a13a467b22c42505490 to your computer and use it in GitHub Desktop.
Save mathiasbynens/7a13a467b22c42505490 to your computer and use it in GitHub Desktop.
Superfish certificate

superfish.pem contains:

  1. the Superfish certificate as found by both Chris Palmer and Matt Burke;
  2. the encrypted private key as found by Karl Koscher.
$ openssl x509 -in superfish.pem -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            d2:fc:13:87:a9:44:dc:e7
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: O=Superfish, Inc., L=SF, ST=CA, C=US, CN=Superfish, Inc.
        Validity
            Not Before: May 12 16:25:26 2014 GMT
            Not After : May  7 16:25:26 2034 GMT
        Subject: O=Superfish, Inc., L=SF, ST=CA, C=US, CN=Superfish, Inc.
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                    00:e8:f3:4a:18:76:5f:19:3f:b1:cf:58:e9:7f:43:
                    07:09:95:80:35:c5:0f:fe:71:31:27:81:99:12:26:
                    20:a5:df:8f:6a:fc:42:55:39:ee:09:38:89:d9:e0:
                    36:c4:ac:01:82:5b:d5:39:e6:f9:8f:07:88:df:fe:
                    ee:f6:a1:14:ce:a9:74:45:d8:fd:f0:17:57:2a:82:
                    e1:7a:2e:12:93:5a:ac:8a:d7:15:63:d1:b7:9b:55:
                    80:0f:58:bc:1c:49:ed:20:62:dd:b6:4c:a5:3a:eb:
                    1c:3d:a0:ff:7a:71:a6:d3:10:78:33:ae:4b:c2:1c:
                    fd:92:4a:a1:c3:e7:41:a4:2d
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:TRUE
            X509v3 Subject Key Identifier:
                FB:98:B3:53:7F:14:44:2E:E8:EE:D5:09:9A:5E:0E:56:86:A8:35:88
            X509v3 Authority Key Identifier:
                keyid:FB:98:B3:53:7F:14:44:2E:E8:EE:D5:09:9A:5E:0E:56:86:A8:35:88
                DirName:/O=Superfish, Inc./L=SF/ST=CA/C=US/CN=Superfish, Inc.
                serial:D2:FC:13:87:A9:44:DC:E7

    Signature Algorithm: sha1WithRSAEncryption
        a4:7c:a0:ec:0a:4a:c7:70:c4:71:68:f3:3b:22:e2:dc:9c:8d:
        d0:92:fe:73:7e:72:2b:55:44:9b:1b:b4:42:eb:1f:af:be:ba:
        e3:93:a3:d4:8b:18:c2:94:f0:b3:a6:bd:65:34:4c:cd:24:f8:
        19:0b:c5:15:0a:da:f3:57:8b:a9:86:cf:6c:c3:ee:84:2f:85:
        0b:19:14:17:98:b4:0c:d4:96:8b:e9:1c:cc:95:c9:4e:d0:aa:
        4b:01:a5:f6:df:49:12:81:6a:be:d5:be:ce:76:7d:4e:ac:8b:
        88:e3:30:ed:31:84:50:8f:bc:f1:50:2a:5b:4a:a6:5e:7c:0f:
        71:fa

Since the private key is encrypted, we need a passphrase to decrypt it:

$ openssl rsa -in superfish.pem -text
Enter pass phrase for superfish.pem:

Luckily, Robert Graham managed to bruteforce the passphrase (it was komodia). The private key is available in this gist as private-key.pem.

$ openssl rsa -in private-key.pem -text
Private-Key: (1024 bit)
modulus:
    00:e8:f3:4a:18:76:5f:19:3f:b1:cf:58:e9:7f:43:
    07:09:95:80:35:c5:0f:fe:71:31:27:81:99:12:26:
    20:a5:df:8f:6a:fc:42:55:39:ee:09:38:89:d9:e0:
    36:c4:ac:01:82:5b:d5:39:e6:f9:8f:07:88:df:fe:
    ee:f6:a1:14:ce:a9:74:45:d8:fd:f0:17:57:2a:82:
    e1:7a:2e:12:93:5a:ac:8a:d7:15:63:d1:b7:9b:55:
    80:0f:58:bc:1c:49:ed:20:62:dd:b6:4c:a5:3a:eb:
    1c:3d:a0:ff:7a:71:a6:d3:10:78:33:ae:4b:c2:1c:
    fd:92:4a:a1:c3:e7:41:a4:2d
publicExponent: 65537 (0x10001)
privateExponent:
    00:a7:a9:5b:5e:09:ec:5e:5e:d2:9a:5a:f3:0b:ce:
    71:45:3b:9d:e0:95:69:f2:87:03:8a:dc:a3:10:45:
    f2:df:8f:ed:48:62:31:57:e7:ee:e4:22:16:4d:83:
    2b:c8:17:c8:aa:4b:70:47:51:6f:b2:bb:08:8f:b7:
    8b:c4:64:a1:74:d1:0c:46:54:e5:73:cc:26:76:6c:
    13:92:d6:80:d4:3e:a6:2d:c7:c0:c1:1d:47:4b:c3:
    d8:8c:af:bc:81:f7:b6:ae:a6:34:a8:03:bb:eb:e8:
    ce:6f:03:5a:c1:0f:f7:a8:eb:85:56:e8:d5:4d:6b:
    cf:21:2d:5f:8e:9a:7e:8e:fd
prime1:
    00:fd:55:da:9c:66:aa:8f:8b:9a:12:ca:9f:63:a9:
    ff:ef:e3:13:9b:88:8f:38:ce:ea:7e:8c:88:e0:4a:
    69:25:76:64:95:cf:c5:6d:c5:76:94:08:d8:d8:99:
    7d:53:a5:fb:5a:7a:82:3e:7f:bf:ce:0e:38:ea:52:
    96:4e:78:40:6b
prime2:
    00:eb:66:8b:a9:f0:f1:68:d8:ea:ec:97:66:8b:04:
    ff:4a:f8:4a:44:92:a3:6d:04:25:b0:42:25:c8:1d:
    a1:f2:93:f9:50:86:07:88:69:87:a5:f0:19:d9:6c:
    d1:c6:be:a9:ae:59:13:56:b5:f7:a7:69:c3:05:6b:
    7b:48:66:f3:c7
exponent1:
    00:eb:52:6d:d0:6c:79:b0:ff:7f:6e:47:33:89:b3:
    a7:5f:60:f2:9c:be:5c:33:eb:d8:dd:16:94:2a:ac:
    54:41:8d:59:5f:e3:f1:43:c7:72:1f:8e:9c:47:8f:
    44:60:88:45:14:c5:c9:e8:5e:68:7f:f2:ac:21:d5:
    f7:73:0a:b6:e3
exponent2:
    78:69:f8:3f:72:14:cb:41:4a:ca:c3:97:9c:bd:6d:
    a9:f7:e0:65:bb:6d:05:b2:fd:64:70:31:cb:6f:fd:
    0b:8d:4e:17:36:b8:5b:bb:3f:bc:4e:59:aa:b2:d3:
    8c:0a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tW+znZ9TqyLiOMw7TGEUI+88VAqW0qmXnwPcfo=
-----END CERTIFICATE-----
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIDHHhyAEZQoICAggA
MBQGCCqGSIb3DQMHBAiHEg+MCYQ30ASCAoDEvGvFRHvtWOb5Rc0f3lbVKqeUvWSz
xQn+rZELHnwb6baolmbFcsi6XkacVzL/EF7Ll4de/CSQ6pZZCCvfDzov0mPOuGve
SAe7hbAcol7+JWVfzbnVTblPf0i7mwSvK61cKq7YfcKJ2os/uJGpeX9zraywWyFx
f+EdTr348dOez8uHkURyY1cvSHsIdITALkChOonAYT68SVighTeB6xOCwfmsHx+X
3Qbhom2YCIxfJiaAoz2/LndCpDaEfOrVrxXFOKXrIbmeDEyjDQj16AVni9uuaj7l
NiO3zrrqxsfdVINPaAYRKQnS102jXqkH01z72c/MpMMC6dwZswF5V3R7RSXngyBn
1GLxVFHKR753Gt0IDag13Bd8Jt890/v0tE0Kx66jCkRGn+VCq6+bsnh7VpTH/cG5
dlFnv56lv2leknu5ghdJHX8YQ6HjnioaaheLA+ORAxqAlD8Itt1/pRBOOMSkutdz
d1px9dB2ZBpSoRAOcBwU5aFaw9uu+tXyzrPM3tZomu8ryQYMNlmVgPNDJOz6jPJi
jaZHWTS7U6j370oH/B0KTUG/ybrJGFnOmPP4h2u/ugG75EkfotURsvbrWuetQhOi
TCH+9nbIcT3pxnTXqI2IRHZXMturQ+6fqlJF3bb9bWarMBuC3KgprqyqXxeM0Sqg
VlyKLWwAuMf2Ec7t7ujqaNmVgv6bpwHEbR6njIi7lC7j4w6D2YQ8vacgvS3MB/K0
SX54HNVBVuXhAixPtYJ6tOBGm7QFAKaXju0PJ+AljnMEsHRekOs2u42OHBXEWDE8
VHw7/lTXWsJkBcQM+g/svyqV4xKHDAixPms2SUwJyKjvEgV+CQok4F/T
-----END ENCRYPTED PRIVATE KEY-----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment