I thought that the only way to intercept a request is to use a proxy, but fiddler somehow can intercept HTTP requests and responses without configuring anything on any browsers.
What's going on under the hood ?
And do you know any library to do that ? (In any languages)
I don't know how fiddler is doing it, but it can be done via a Layered Service Provider on Windows.
From Wikipedia:
"A Layered Service Provider (LSP) is a feature of the Microsoft Windows Winsock 2 Service Provider Interface (SPI). A Layered Service Provider is a DLL that uses Winsock APIs to insert itself into the TCP/IP stack. Once in the stack, a Layered Service Provider can intercept and modify inbound and outbound Internet traffic. It allows processing all the TCP/IP traffic taking place between the Internet and the applications that are accessing the Internet (such as a web browser, the email client, etc). "
May be running the network interface in promiscuous mode. This is how WireShark is able to monitor network traffic and display it.
More Info: http://en.wikipedia.org/wiki/Promiscuous_mode
The other option is to use something like Wireshark. The following is from the About page on http://www.wireshark.org/
Fiddler actually does use a proxy. I believe the installer automatically configures IE to use Fiddler's proxy. You can also configure other browsers to go through the same proxy, so Fiddler will profile their network traffic too.
More info here
Another way to intercept traffic without a proxy is WCCP on a supported device.
http://www.cisco.com/en/US/docs/ios/11_2/feature/guide/wccp.html
Fiddler is a proxy, written in C# and wrapping basic sockets.
It registers with WinINET using the appropriate API call while running, and detaches in the same way. Most browsers automatically detect the WinINET proxy setting and use it. Firefox does not, which is why current versions of Fiddler install a Firefox addon.
-EricLaw [MSFT]