What is fiddler root certificate

Техника

В посте будут рассмотрены следующие функциональные возможности Fiddler Classic:

Использование FiddlerScript для расширения функциональных возможностей Fiddler

HTTPS (Hypertext Transfer Protocol Secure) является широко используемым протоколом для безопасного обмена данными через Интернет. По сути, HTTPS – это расширенная версия протокола HTTP с использованием шифрования, обеспечивающая конфиденциальность и целостность данных во время передачи.

В протоколе HTTPS сообщения, отправляемые по сети, шифруются с использованием TLS – протокола защиты транспортного уровня (transport layer security). Для своей работы TLS использует набор доверенных сертификатов, установленных на компьютере для установления подлинности сервера, с которым он взаимодействует.

Fiddler позволяет расшифровывать HTTPS-трафик, установив корневой сертификат и включив расшифровку HTTPS. Для этого необходимо:

2. Установка сертификата Fiddler

Для установки сертификата Fiddler на компьютер под управлением ОС Windows выполните следующие действия:

Чтобы узнать, как установить сертификат Fiddler на компьютерах под управлением ОС Linux и Mac OS, см. страницы документации по Fiddler здесь и здесь.

3. Включение TLS 1.2

По умолчанию в Fiddler отключены версии протоколов TLS 1.1 и TLS 1.2 из-за проблем с совместимостью. Для включения TLS 1.2 необходимо:

Настройка фильтрации трафика

После настройки Fiddler для работы с HTTPS приступаю к анализу трафика. Вкладка «Filters» в Fiddler позволяет фильтровать и помечать трафик, отображаемый в пользовательском интерфейсе, а также вносить некоторые изменения в запросы.

Zone Filter позволяет отображать трафик только для внутренней сети или Интернета. Данный фильтр будет полезен, когда вы занимаетесь отладкой конкретного сайта или приложения (локально) и одновременно работаете с документацией из другой зоны (например, из Интернета).

Анализ запросов и ответов

Вкладка «Inspectors» позволяет более тщательно анализировать запросы и ответы. Чтобы загрузить запрос, просто перетащите его в окно.

Функционал Fiddler позволяет просматривать HTTPS-сообщение различными вариантами отображения. Например, во вкладке «Headers» отображаются заголовки запроса:

Вкладка «Raw» позволяет отобразить запрос в виде обычного текста:

Есть и другие варианты отображения – например, вкладка «WebForms» отображает строки запроса и формы HTTP(S), а вкладки «JSON» и «XML» запросы JSON и XML соответственно.

Составление HTTP(S) запросов

Вкладка «Composer» позволяет создать HTTP(S) запросы с нуля, указав метод HTTP, URL-адрес, версию HTTP, заголовки и тело самого запроса (Request Body). Также есть возможность автоматического заполнения всех полей, вручную «перетащив» запрос в окно «composer». Перед отправкой запроса его можно редактировать.

Ранее выполненные запросы можно посмотреть в поле «History». Для выполнения запроса необходимо нажать Execute в правом верхнем углу.

FiddlerScript – встроенный язык программирования, позволяющий значительно расширить функциональные возможности Fiddler, модифицировать пользовательский интерфейс, а также анализировать входящий и исходящий трафик. Язык основан на JScript.NET.

Всякий раз, когда вы сохраняете файл, Fiddler заметит новую версию файла и попытается загрузить ее автоматически. Если необходимо пересоздать файл с изначальным кодом, просто удалите его, и Fiddler пересоздаст его из резервной копии.

Дополнительно:  Старые смартфоны PlayStation 3 могут потерять доступ в Интернет; Инструкция по установке и использованию Windows XP;

Использование возможностей Fiddler на примере подмены логотипа сайта

Рассмотрю использование Fiddler для подмены логотипа сайта google.ru на логотип от Яндекса. По сути, подмена логотипа на сайте – это подмена одного URL на другой. Перехожу на сайт google.ru, копирую ссылку логотипа.

Далее найду логотип от Яндекса и также скопирую ссылку.

В результате при переходе на сайт google.ru вместе логотипа Google будет отображаться логотип Яндекса:

Аналогичный результат можно получить, используя FiddlerScript. Для этого в обработчик OnBeforeRequest необходимо добавить следующий код:

Таким образом, рассмотренный функционал Fiddler позволяет расшифровать защищенный HTTPS трафик, произвести его фильтрацию и проанализировать поступающие запросы и ответы. На примере подмены логотипа сайта я показал, что Fiddler обладает возможностью подмены HTTPS-трафика, что может быть использовано для выявления уязвимых мест в работе приложения или сайта. Специалистам по информационной безопасности Fiddler будет полезен для выявления этих уязвимых мест для предотвращения кибератак.

I’m wanting to distribute a vagrant/docker image for my team. We basically need to use fiddler to make SSL work (making the guest vm trust fiddlers cert and then routing everything through fiddler on the host).

Is there a way to export fiddlers root CA (private key) and install this on another machine?.

asked Aug 22, 2014 at 6:31

Alternatively, you can simply visit http://fiddlerPC:8888/ from the other clients and a link on that page offers the certificate for download.

.CER files do not contain the private key, and you do not need to distribute the private key to other machines for them to trust the certificate.

Note that having multiple different Fiddler root certificates on a single PC will confuse Windows; use CertMgr.msc or Fiddler’s «Remove Interception Certificates» button to remove any old roots before installing the new one.

answered Aug 22, 2014 at 18:15

7 gold badges151 silver badges196 bronze badges

I found this on happen-stance while searching.

answered Jul 16, 2018 at 18:02

2 gold badges25 silver badges31 bronze badges

One of the most frustrating things as a frontend developer is when you are receiving incorrect data. You don’t know whether the problem lies with your application, or the backend services. The easiest way to validate this is to pretend to be a hacker. You can stage a man-in-the-middle attack on your own application. Debugging using tools like Fiddler or Charles can be used to inspect the traffic from your application. Unfortunately, the same effort that goes into protecting apps from such attacks, also means that it is harder for developers to setup Fiddler debugging.

Дополнительно:  Как отключить спящий режим Windows 10 при закрытии крышки ноутбука

In this post I’ll walk through setting up Fiddler debugging for a Xamarin.Forms application. The same basic approach will work for a native or Xamarin iOS/Android application as well. For this post I’ve created an application using the Blank Xamarin.Forms template that comes with Visual Studio 2019. I’ve selected to target all three platforms.

In the OnAppearing method in the MainPage of the Xamarin.Forms application, I’ve added some basic code to retrieve a string for a Https endpoint. We’ll use a Https endpoint on the assumption that if we can intercept Https then we can also intercept Http traffic.

Setting Up Fiddler Debugging

Before we get started with the individual platforms, it’s worth checking your configuration for Fiddler:

Enabling remote connection in Fiddler

Windows (UWP)

I’ll start with Windows, because it’s relatively straight forward to get setup. With Fiddler running, you can run the UWP project from within Visual Studio and Fiddler debugging will work. Fiddler will capture the Https traffic without any further configuration or setup.

Capturing network traffic in Fiddler

Click WinConfig to adjust the exemption list for Windows 10 apps

Locate your application and confirm that there is a check in the box next to your application. If it’s not checked, check the box, and then click Save Changes.

Locate your UWP application and check the box to add your application to exemption list

One other issue I’ve seen but can’t reproduce reliably, is that sometimes when you run your application from Visual Studio it unchecks the box in the WinConfig in Fiddler. If for some reason you no longer see traffic in Fiddler for your application, go back and double check the exemption list in Fiddler.

Diagnosing Issues with Fiddler on Windows

When configuring Https traffic decryption, you’ll be prompted to install and trust the Fiddler root certificate. If you don’t accept all the prompts, Fiddler debugging for Windows applications will not work. Windows traffic debugging works without any further configuration because the Fiddler root certificate is trusted on the machine running Fiddler.

Click on the FiddlerRoot certificate to install the root certificate

Click on the FiddlerRoot Certificate and install as a Trusted Certificate Authority on the Local Machine. This should allow your Windows application to trust Fiddler.

Next up is iOS and in this case we’re going to use the iOS simulator. The same process should work with any iOS device that’s on the same local network as the machine running Fiddler. There are two steps to setup iOS for traffic debugging:

Дополнительно:  Участник root

To setup the simulator, first launch the iOS application from Visual Studio. If you’re on Windows, this will launch the remote viewer for the simulator. Once the simulator is running, stop debugging and we’ll setup the simulator for traffic debugging.

Trusting the Fiddler Certificate

In addition to downloading the certificate you also need to install it. Go to Settings / General / Profile and click through on the FiddlerRoot profile in order to Install it.

The Fiddler root certificate needs to be trusted as a root certificate. Go to Settings / About / Certificate Trust Settings and toggle the switch next to the FiddlerRoot certificate. Fiddler generates a certificate for each site you go to that is derived from the root certificate, so the root certificate needs to be installed as a trusted certificate.

var handler = new HttpClientHandler();
handler.Proxy = new WebProxy(«192.168.1.109», 8888);
var client = new HttpClient(handler);

Running the iOS application should show network traffic in Fiddler debugging window. You should still see the returned data printed out in the Output window (ie from the Debug.WriteLine statement).

Android Fiddler Debugging

For Android I’m going to use the Android Simulator. Real devices should behave similarly, assuming they’re connected to the same local network as the machine running Fiddler.

The other thing to point out here is that you should not be using the HttpClientHandler. I’ve discussed this in my previous post on working with the HttpClient. Let’s change our code by moving it into the OnCreate method of the Android head project. We’ll also change over to using the AndroidClientHandler.

Install the Fiddler Root Certificate

After installing the certificate and adding the network security configuration to the Android application you should now see network requests from the application appear within Fiddler debugging window.

If the client computer itself previously had run Fiddler in
HTTPS-decryption mode, all attempts to visit HTTPS pages secured by
the other computer’s version of Fiddler will fail with an unspecified
certificate problem. To resolve this, remove the Fiddler root
certificate that is in the client’s certificate store. (The mismatched
root certificate causes the problem, as every Fiddler instance
generates its own unique root).

Just to be clear I’m talking about this warning:

asked Oct 10, 2011 at 21:57

Q: Does Fiddler create private root certificates uniquely per machine?

A: Yes, of course. http://www.telerik.com/blogs/faq—certificates-in-fiddler

What’s the Risk?

answered Jun 18, 2015 at 14:37

Оцените статью
Master Hi-technology
Добавить комментарий