Fiddlercore doesn't capture HTTPS traffic

0 Answers 136 Views
FiddlerCore Windows
Denis
Top achievements
Rank 1
Denis asked on 07 Jul 2021, 06:45 AM

I wrote a test program to check fiddlercore, the certificate installed, but HTTPS traffic is not captured, only HTTP. Exactly the same program captures HTTPS traffic fine on another edition of Windows 10 (Enterprise), but on Windows 10 home (2004) HTTPS traffic is not captured. Do I need to change any Windows settings to capture HTTPS traffic?

 

 

My program:


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.UTF8;
            if (!CertMaker.rootCertIsTrusted())
            {
                var rootCertificatePassword = "Password1";
                BCCertMaker.BCCertMaker certProvider = new BCCertMaker.BCCertMaker();
                CertMaker.oCertProvider = certProvider;
                string rootCertificatePath = @"RootCertificate.p12";
                if (!File.Exists(rootCertificatePath))
                {
                    certProvider.CreateRootCertificate();
                    certProvider.WriteRootCertificateAndPrivateKeyToPkcs12File(rootCertificatePath, rootCertificatePassword);
                }
                if (File.Exists(rootCertificatePath))
                {
                    certProvider.ReadRootCertificateAndPrivateKeyFromPkcs12File(rootCertificatePath, rootCertificatePassword);
                }
                CertMaker.trustRootCert();
                if (CertMaker.rootCertIsTrusted())
                {
                    Console.WriteLine("Certificate is installed");
                }
                else
                {
                    Console.WriteLine("Certificate is not installed");
                }
                var settings = new FiddlerCoreStartupSettingsBuilder()
                .ListenOnPort(6666)
                .ChainToUpstreamGateway()
                .DecryptSSL()
                .OptimizeThreadPool()
                .RegisterAsSystemProxy()
                .Build();
                FiddlerApplication.Startup(settings);
                FiddlerApplication.AfterSessionComplete += session =>
                {
                    if (session != null)
                    {
                        Console.WriteLine(session.fullUrl);
                    }
                };
                Console.ReadLine();
            }
        }
    }
}

Nick Iliev
Telerik team
commented on 07 Jul 2021, 10:44 AM

The above implementation is working as expected on my side while testing on Windows 10 Home - the certificate is successfully installed, trusted, and HTTPS traffic is being captured. Check if the Windows 10 host runs with an account with administrative rights (to install and trust the root certificate). Another thing to check if some 3rd-party tools are applying security restrictions or limiting the FIddler proxy.

No answers yet. Maybe you can help?

Tags
FiddlerCore Windows
Asked by
Denis
Top achievements
Rank 1
Share this question
or