gentilkiwi / mimikatz

A little tool to play with Windows security
http://blog.gentilkiwi.com/mimikatz
19.51k stars 3.75k forks source link

crypto::certificates and crypto::keys #279

Open s0i37 opened 4 years ago

s0i37 commented 4 years ago

Hello. I try to export certs with:

privilege::debug
crypto::capi
crypto::certificates /export

After that I obtain certs in der format and keys in pfx. But for pfx I don't know passwords and mimikatz doesn't show one. Then I try to export all keys with:

crypto::keys /export

I convert every key and certs in pem form:

openssl rsa -inform pvk -in user_capi_.pvk -outform pem -out key.pem
openssl x509 -inform der < cert.der > cert.pem

But next when I try to create p12 file for authentication in third-party software I obtaint the following error:

openssl pkcs12 -export -in cert.pem -inkey key.pem
No certificate matches private key

It seems that these certs and keys dont correspond each other. Thank you.