Using custom root with FiddlerCore

Can I use my own root certification authority for FiddlerCore to intercept HTTPS traffic?

I need to assign a certificate that will be used to sign all host certificates.

Another solution might be to supply certificate information to FiddlerCore before creating the root certificate.

+6
ssl fiddler
source share
3 answers

Currently, FiddlerCore does not offer the ability to customize the information contained in its self-signed root. It will generate all certificates of finite entities attached to a root with the name DO_NOT_TRUST_FiddlerRoot.

Can you talk about why you are looking for this opportunity?

+1
source share
FiddlerApplication.Startup(9999, FiddlerCoreStartupFlags.DecryptSSL); var path = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) + @"\sslcertificate.pfx"; var secureEndpoint = FiddlerApplication.CreateProxyEndpoint(443, true, new X509Certificate2(path, "password")); 

You can create your own certificate using Visual Studio tools, however I used this free program to create a test because I'm lazy: http://www.xenossoftware.com/freetools/certificategenerator/

If the certificate is installed on the computer, I believe that you can also do the same using the X509Store class.

Here is the code for this (not tested):

 FiddlerApplication.Startup(9999, FiddlerCoreStartupFlags.DecryptSSL); var store = new X509Store(StoreName.Root, StoreLocation.LocalMachine); try { store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); var x509Certificate2 = store.Certificates.Find(X509FindType.FindBySubjectName, "YourSSLCertificateName", true)[0]; secureEndpoint = FiddlerApplication.CreateProxyEndpoint(443, true, x509Certificate2); } finally { store.Close(); } 
+1
source share

You can use the oDefaultClientCertificate property for FiddlerApplication to specify an existing certificate. I used this in my Windows service application using the FiddlerCoreAPI to capture HTTPS traffic.

 var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); path = path.Replace("file:\\", ""); if (!path.EndsWith(@"\")) path += @"\"; path += "FiddlerRoot.cer"; FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete; FiddlerApplication.oDefaultClientCertificate = new X509Certificate(path); FiddlerApplication.Startup(8888, FiddlerCoreStartupFlags.DecryptSSL); 
-one
source share

All Articles