Software⏱️ 3 min read📅 2026-06-19

How to Fix: Why am I getting this error when attempting to export a private key with Mimikatz?

Mimikatz error exporting private key, possible solution and workaround.

Quick Answer: Try using the /f option with Mimikatz to export the private key, or use a different tool like OpenSSL to achieve the same result.

The error message 'ERROR kull_m_crypto_exportPfx ; PFXExportCertStoreEx/kull_m_file_writeData (0x80090016)' occurs when attempting to export a private key marked as non-exportable by the certificate export wizard using Mimikatz on Windows 10. This issue affects users who are trying to use Mimikatz for password cracking and other advanced security testing purposes.

This error is frustrating because it prevents users from exporting critical private keys, which can severely impact their ability to perform certain tasks. However, by following the steps outlined in this guide, you should be able to resolve the issue and successfully export your private key.

🔍 Why This Happens

  • The primary reason for this error is that Mimikatz is trying to write the exported private key to a location where it cannot be written due to its non-exportable status. This is typically because the private key is being used by another process or application, and attempting to export it would overwrite these dependencies.
  • Another possible cause of this error could be related to the version of Mimikatz being used. In some cases, older versions may not handle non-exportable keys correctly, leading to this specific error message.

🔧 Proven Troubleshooting Steps

Using Mimikatz with elevated privileges

  1. Step 1: Open Command Prompt as an administrator and run the following command: `runas /user:administrator mimikatz.exe crypto::capi` This will elevate your privileges, allowing you to export the private key.
  2. Step 2: Alternatively, you can also use the 'mimikatz -admin' option when running Mimikatz. This will prompt for administrator credentials and allow you to export the private key.
  3. Step 3: If you are still experiencing issues, try restarting the system or closing any other applications that may be using the same private key.

Using an alternative method to export non-exportable keys

  1. Step 1: One possible workaround is to use a third-party tool, such as OpenSSL, to export the private key. You can install OpenSSL on your system and use it to generate a new private key that does not have the same restrictions.
  2. Step 2: Another option is to manually extract the private key from the certificate store using tools like CertIsh or Pkiutil. This method requires more technical expertise but can be effective in certain situations.

🎯 Final Words

In summary, the error message 'ERROR kull_m_crypto_exportPfx ; PFXExportCertStoreEx/kull_m_file_writeData (0x80090016)' occurs when attempting to export a private key marked as non-exportable by the certificate export wizard using Mimikatz on Windows 10. By following the steps outlined in this guide, you should be able to resolve the issue and successfully export your private key using either elevated privileges or alternative methods.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions