- Download the file http://articatech.net/download/mimikatz.zip ( some antivirus detect this package as unwanted program ) a tool that will extract the private key from installed certificates.
- Extract the mimikatz files to a directory on your Active Directory server.
- Run cmd.exe as an Administrator (you may need to navigate to C:\Windows\System32\ and right-click the cmd.exe file)
- Run the mimikatz.exe from the command prompt
- Run the following commands:
- The last one will export all certificates from the store. You can export only the ones you need by using different flags.
But it is lot more easier to export all and then choose only the one that is needed.
- You should have a .pvk (private key) file in the same directory as mimikatz.exe now—probably just the one you installed.
If you see multiple private keys, you’ll have to determine which one is the one you installed.
- Close the terminal and that folder where mimikatz was run has all the exported certificates.
To secure private key mimikatz adds a password which again is “mimikatz”.
- Next, continue on the exportation wizard to obtain the certificate.
- Go to the Certificate Center.
- Create a new certificate and choose “Upload Your Certificate”
- Set your certificate name and click on Create button.
- Click on the empty created certificate
- Choose Import a PVK private key
- Select your exported pvk key file trough the mimikatz tool.
- Select Certificates tab.
- Click on Certificate link
- Open the exported certificate CER file
- paste the content in the text area and click on Apply