How to export non-exportable private key from store

前端 未结 7 622
野的像风
野的像风 2021-01-29 20:51

I need to export private key from Windows store. What should I do if the key is marked as non-exportable? I know that it is possible, program jailbreak can export this key.

7条回答
  •  借酒劲吻你
    2021-01-29 21:14

    You're right, no API at all that I'm aware to export PrivateKey marked as non-exportable. But if you patch (in memory) normal APIs, you can use the normal way to export :)

    There is a new version of mimikatz that also support CNG Export (Windows Vista / 7 / 2008 ...)

    1. download (and launch with administrative privileges) : http://blog.gentilkiwi.com/mimikatz (trunk version or last version)

    Run it and enter the following commands in its prompt:

    1. privilege::debug (unless you already have it or target only CryptoApi)
    2. crypto::patchcng (nt 6) and/or crypto::patchcapi (nt 5 & 6)
    3. crypto::exportCertificates and/or crypto::exportCertificates CERT_SYSTEM_STORE_LOCAL_MACHINE

    The exported .pfx files are password protected with the password "mimikatz"

提交回复
热议问题