fiddler
DESCRIPTION
fiddlerTRANSCRIPT
Advanced Web Debugging with Fiddler
Mehdi KhaliliReadify
Live Backchannel: #dddbrisbane #web01
Mehdi KhaliliReadify Blog: www.Mehdi-Khalili .comTwitter: @MehdiKhaliliEmail: me@mehdi-khalili .com
Advanced Web Debugging with
Fiddler
Fiddler Web Debugger
Tight scheduleYour answer may be in the next slideWe will have a Q&A at the endIf we run out of time:
− Do not hesitate to shoot me an email with your questions
− You can also read an extensive two part tutorial on my blog: http://www.mehdi-khalili.com/fiddler-in-action/part-1 http://www.mehdi-khalili.com/fiddler-in-action/part-2
Please leave your questions to the end
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQ&ALots of positive feedback and tweets from you
;-)
Agenda
Fiddler Web Debugger
What is Fiddler?
A Web Debugging ProxyIt is free and has millions of usersA necessary tool in a developer’s toolbox!!
Fiddler Web Debugger
Fiddler features in a nutshellWith Fiddler you can perform:
• HTTP(S) traffic monitoring and Analysis• HTTP request and response modification
Fiddler Web Debugger
A networking protocolIn the application layerSits on top of TCP protocol (usually)
What is HTTP again?
Fiddler Web Debugger
An HTTP communication is called a sessionAn example of that is web browsing:
1. You type an address in your browser2. Your browser does a DNS lookup for the URL3. Then creates a TCP connection to the server4. And creates and sends an HTTP request 5. The server receives the request6. Processes it (and optionally maps it to a resource)7. And creates and returns an HTTP response
HTTP Session
Fiddler Web Debugger
An HTTP request is composed of:− A request line− Header lines− A blank line− An optional body
GET http://www.google.com.au/ HTTP/1.1Host: www.google.com.auConnection: keep-aliveAccept: text/html,application/xhtml+xml,application/xml;Accept-Encoding: gzip,deflate,sdchAccept-Language: en-US,en;q=0.8
HTTP Request
Fiddler Web Debugger
An HTTP response is composed of:− A status code− Header lines− An optional body
HTTP/1.1 200 OKDate: Tue, 22 Nov 2011 20:38:20 GMTExpires: -1Cache-Control: private, max-age=0Content-Type: text/html; charset=UTF-8Server: gwsContent-Length: 57556
HTTP Response
Fiddler Web Debugger
Back to Fiddler: Where to get it from?
http://www.fiddler2.com● Application● Documentation● Fiddler extensions
Fiddler Web Debugger
How does it work?
Internet Explorer
WinINET
Office
CryptoAPI WinHTTP
Fiddler
Firefox
CorpNET Proxy
example.com
Firewall
FIDDLER AND WININET
Demo
Fiddler Web Debugger
If you can use a proxy you can use Fiddler
Fiddler
Ma c
Web Server
Lin
ux
Mob
ile
PC
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQ&ALots of positive feedback and tweets from you
;-)
What is next?
Fiddler Web Debugger
Alternatives and similar tools
Packet Analysers: − WireShark− NetMon
Proxies: − Charles − Burp Suite
Browser Dev Tools:− HttpWatch for IE and FireFox− FireBug for FireFox− Chrome developer tools and FireBug Lite for Chrome− IE Dev Tools
Fiddler Web Debugger
Sniffer vs Proxy vs Browser Dev Tools
Feature Sniffer Proxy Browser ToolsHTTP only No Yes Yes
Nice visualisation
No Yes Yes
From all processes
Yes Yes Only Browser session
Local traffic No Yes Yes
Cached traffic No No Yes
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQ&ALots of positive feedback and tweets from you
;-)
What is next?
Fiddler Web Debugger
HTTP(S) Traffic
Result - The Result code
Protocol - HTTP/HTTPS/FTP
Host - The hostname
URL - The path and file requested from the server
Body - The number of bytes in the response body
Caching - Response's Expires or Cache-Control
headers
Process - The local Windows Process
Content-Type - The Content-Type header
HTTP TRAFFIC
Demo
Fiddler Web Debugger
Traffic Comparison
Compare sessions using a diff tool
TRAFFIC COMPARISON
Demo
Fiddler Web Debugger
It allows you to compare two sessionsIf you want to compare two traffic profiles
then use Traffic Differ extension
Traffic Comparison
Fiddler Web Debugger
Statistics
Get a "total page weight and wait"—the number of requests and the bytes transferred.
STATISTICS TAB
Demo
Fiddler Web Debugger
Quick Exec
A FEW HANDY QUICKEXEC COMMANDS
Demo
Fiddler Web Debugger
Inspectors
Inspectors allow you to visualize requests and responses in meaningful ways.
INSPECTORS
Demo
Fiddler Web Debugger
HTTPS Traffic Decryption
Fiddler can decrypt HTTPS traffic using the Man-In-The-Middle attack
Fiddler Web Debugger
Man In The Middle Attack
HTTPS Traffic Decryption
Fiddler can decrypt HTTPS traffic using the Man-In-The-Middle attack
ClientServe
r
1
2MITM
Fiddler Web Debugger
Man In The Middle Attack
HTTPS Traffic Decryption
Fiddler can decrypt HTTPS traffic using the Man-In-The-Middle attack
ClientServe
r
1
4
2
3MITM
SETTING UP HTTPS DECRYPTION
Demo
Fiddler Web Debugger
Changing the traffic on the fly
You can set breakpoints and change the request and/or response on the fly. Fiddler is the MITM.
HOW TO SET BREAKPOINTS AND
CHANGE REQUESTS AND/OR RESPONSES
Demo
Fiddler Web Debugger
Test your JavaScript code with less than perfect response
Test your website for security holesTroubleshoot your third party web clientTroubleshoot your third party web service
Changing the traffic on the fly
Fiddler Web Debugger
Auto Responder
Create a fake web server using Auto Responder
HOW TO SETUP AND USE AUTO RESPONDER
Demo
Fiddler Web Debugger
Replace a JavaScript or css or image fileReplace an entire trafficForce a redirectionWork without a connection!
Auto Responder
Fiddler Web Debugger
Request Builder
Create a fake web client using Request Builder
Avoid coding html pages or test clients. Use Request Builder instead to send a hand rolled request to your server/service
HOW TO SETUP AND USE REQUEST BUILDER
Demo
Fiddler Web Debugger
Filters
Filter and flag traffic and perform some lightweight modifications
QUICK TOUR OF FILTERS
Demo
Fiddler Web Debugger
Clean up your Web Sessions pageFilter out some status codesFilter out traffic from some urlsFlag some of the trafficVery useful on a high traffic server/machine
Filters
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQ&ALots of positive feedback and tweets from you
;-)
What is next?
Fiddler Web Debugger
Fiddler Core
Fiddler 2
Fiddler ScriptEngine
Inspector2
Inspector2
IFiddlerExtension
IFiddlerExtension
FiddlerCore
Exec
Actio
n.ex
e
YourApp.exe
FiddlerCore
Fiddler application with extensions Your application hosting FiddlerCore
Your FiddlerScript
Xceed*.dll Makecert.exe Xceed*.dll Makecert.exe
Fiddler Web Debugger
FiddlerCap
Built on top of FiddlerCore It is bin deployable A handy tool for production support
FIDDLER CAP
Demo
Fiddler Web Debugger
Quick Summary
Requirement Feature
Watch the traffic Web Sessions
Compare two sessions Web Sessions -> compare
Run commands QuickExec
Inspect requests & responses Inspectors
Fiddle with the traffic Breakpoints + Inspectors
Return an HTTP response locally Auto Responder
Make an HTTP request Request Builder
Filter and flag sessions Filters
Fiddler for end user FiddlerCap
As a quick summary here is the list of Fiddler features you are likely to use more
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQ&ALots of positive feedback and tweets from you
;-)
What is next?
QUICK TOUR OF WHAT IS NOT COVERED
Demo
Fiddler Web Debugger
ExtensionsSyntaxViewWcfBinaryInspectorTraffic DifferGalleryneXpert Performance Report GeneratorStresStimulus aids in load-testing
Find out more on Fiddler website
Fiddler Web Debugger
What is Fiddler and how does it work?Alternative toolsFiddler featuresFiddlerCore and FiddlerCapQuick tour of remaining featuresQuick overview of useful extensionsQ&ALots of positive feedback and tweets from you
;-)
That is all from me
Fiddler Web Debugger
Thanks for attending
Q&ATutorials:
− http://www.mehdi-khalili.com/fiddler-in-action/part-1− http://www.mehdi-khalili.com/fiddler-in-action/part-2
Contact Details:− Email: [email protected]− Twitter: @MehdiKhalili