Ubuntu: Using Fiddler to analyze Chrome/Firefox network capture

ubuntuThe prevalence of the long chains of firewall and reverse proxy solutions present in production infrastructure (and made even more popular with the dynamic routing introduced with containers) has made analysis of the end-user side of the network exchange a critical tool in troubleshooting.

Fiddler has long been a solid tool for both proxy capture as well as analysis of the end user application traffic on the Windows platform.  However, troubleshooting issues with customers always required them to first install the tool on their desktop, and at times corporate policies would prevent installation.

Now, with the built-in capabilities of the Chrome DevTools and Firefox Network Monitor, the capture can happen directly from the end user’s browser without any external tool installation.  If that session needs to be analyzed by higher level support resources, it can be exported as an HTTP Archive (HAR), and then imported into Fiddler for analysis at a later time.

And since the release of Fiddler for Linux, the analysis of the HAR can be done directly on the Ubuntu desktop.

Enabling Chrome DevTools capture

From Chrome, access the DevTools using the Chrome menu as described here, or press the F12 key.  Make sure you check the ‘Preserve log’ so that all the actions are persisted and as you navigate the target site you will see all your network requests scroll by as they are captured.

chrome-dev-tool

When you are finished capturing the user scenario, right-click anywhere in the tabled request view and a menu will popup, select “Save as HAR with Content”.

Enabling Firefox Network Monitor

From Firefox, access the Network Monitor from the main tools icon as described here, or press the F12 key.  Make sure you click on the toolbox options icon first, and select “Enable persistent logs”.  Then click on the “Network” tab to get back to the request grid.

firefox-network-monitor-persist

 

Now as you navigate the target site, you will see all the network requests scroll by as they are captured.

firefox-network-monitor

When you are finished capturing the user scenario, right-click anywhere in the tabled request view and a menu will popup, select “Save All As HAR”.

 Installing Fiddler on Ubuntu

With the captured .har file exported, it can now be provided to Engineers or Support staff for analysis.  Fiddler is a great tool for analysis, and is available on Windows, but can also be run directly from an Ubuntu desktop with Mono support.

On Ubuntu 14.04.x desktop, you need to make sure the Mono framework is available:

apt-get install mono-complete

Then download the monofiddlercore_2453.zip available from this page, and unzip it.  From the console, navigate into the ‘app’ directory created where you unzipped, and run:

mono Fiddler.exe

The Fiddler desktop GUI should now popup, and if you select File > Import Sessions and select the .har file, the end user’s session is now available for detailed analysis.

fiddler-ubuntu-import-sessions

 

 

REFERENCES

http://fiddler.wikidot.com/mono

https://developer.chrome.com/devtools

https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor