Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Fiddler root certificate to successfully decrypt HTTPS

Is there a way to change the Fiddler's root certificate. I want it for a scenario when the client app uses certificate pinning and I have access to the keystore, whose certificate is being trusted by the client app.

like image 644
rohitverma Avatar asked Oct 28 '14 19:10

rohitverma


1 Answers

I think you're asking "Can I change the certificate Fiddler uses for a particular site" rather than the root certificate, which is used for all sites.

Yes, if you really do have the private key for the certificate, you can configure Fiddler to use it. Inside Fiddler's Rules > Customize Rules > OnBoot function, you can call either:

CertMaker.StoreCert("example.com", certMyCert);

or

CertMaker.StoreCert("example.com", "C:\\temp\\cert.pfx", "TopSecretPassword");

The first call requires that your X509Certificate2 variable (certMyCert in this case) refer to a certificate that is already installed in your computer's Certificate Manager (certmgr.msc), so its private key can be found, while the second allows you to specify a PFX file from disk.

like image 132
EricLaw Avatar answered Oct 13 '22 20:10

EricLaw