iSECPartners / jailbreak

Jailbreak
BSD 2-Clause "Simplified" License
467 stars 140 forks source link

Error using #5

Open arthursanno opened 7 years ago

arthursanno commented 7 years ago

I trying to export my certificate I first used version 3.5 and later version 4.

:::::> Using Version 3.5 C:\jailbreak-3.5>jbstore -1 -n "MY CERTICATE NAME" Found the following certificate: Subject Name: MY CERTICATE NAME Serial Number: xx xx xx....

Error sizing blob: -2146893813 This is because jbstore2 is not working, please e-mail cclark or andreas.

:::::> Using Version 4 C:\jailbreak4>jbstore64.bat -1 -n "MY CERTICATE NAME" -o MyFile.pfx -p MyPass

C:\jailbreak4>cd C:\jailbreak4\binaries

Found the following certificate: Subject Name: MY CERTICATE NAME Serial Number: ...

Error sizing blob: -2146893813 This is because jbstore2 is not working, Are you using jailbreak32/64 to launch it? If there are still problems please contact iSEC Partners.

Please help me fix the error so I can export my certificate with the private key.

Thnaks

numericOverflow commented 6 years ago

I've got the same issue.

I'm working with system certs where I can list them, and one will dump, but a second cert other won't export and throws an error. I've also tried using jbcert64.bat, and from the GUI, it still says the private key is marked not-exportable.

Cert#1 can be exported w/private key by both jbcert64 and jbstore2_64 Cert#2 throws error shown below via jbstore2_64 and in jbcert64, private key remains marked not-exportable.

E:\jailbreakMaster_v4\jailbreak-master\binaries>jbstore2_64.exe -l -s "SYSTEM"
Listing certificates in SYSTEM store

Subject Name:
Serial Number: 1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Subject Name:
Serial Number: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
E:\jailbreakMaster_v4\jailbreak-master\binaries>jbstore2_64.exe -a -s "SYSTEM"
Error sizing blob: -2146893813
This is because jbstore2 is not working, Are you using jailbreak32/64 to launch
it?
If there are still problems please contact iSEC Partners.
E:\jailbreakMaster_v4\jailbreak-master\binaries>@jailbreak64.exe jbstore2_
64.exe -a -s "SYSTEM"

Error sizing blob: -2146893813
This is because jbstore2 is not working, Are you using jailbreak32/64 to launch
it?
If there are still problems please contact iSEC Partners.

I seem to get the same error behavior on Win7, and also Server2012R2 (running from CMD via "Run as Admin")

Thoughts?

sambino239 commented 6 years ago

I have the same issue on 2008r2. It works on a test environment but when I try it on a live environment it fails with the same error. I'm using version 4

kastixx commented 6 years ago

Google says that the error code in hex (0x8009000b) is NTE_BAD_KEY_STATE. This discussion gives a clue that probably the hook does not work in some cases and the certificate still has the exportable bit reset. Or there's an extra level of protection on some certificates which prevents exporting.

I have a similar problem, and it looks like Jailbreak works properly in my case with the user certificate store but not with the system one. The OS is Windows 10, don't remember exactly which build.

By the way, has anyone tried to cross-compile Jailbreak version 4 under Linux? I would like to put some research into it but I'm short of time and resources to install and configure a windows development environment.

bezik46 commented 5 years ago

Exactly the same error on USER certificate, issued by MS AD CA 2012 R2, with PK marked as non-exportable. But using mimikaz does exports it fine!