Web Proxy Autodiscovery Protocol

The Web Proxy Auto-Discovery Protocol (WPAD) is a method used by clients to locate a URL of a configuration file using DHCP and/or DNS discovery methods. Once detection and download of the configuration file is complete it can be executed to determine the proxy for a specified URL. The WPAD protocol only outlines the mechanism for discovering the location of this file, but the most commonly deployed configuration file format is the Proxy auto-config format originally designed by Netscape in 1996 for Netscape Navigator 2.0.[1] The WPAD protocol was drafted by a consortium of companies including Inktomi Corporation, Microsoft Corporation, RealNetworks, Inc., and Sun Microsystems, Inc.. WPAD is documented in an INTERNET-DRAFT which expired in December 1999.[2] However WPAD is still supported by all major browsers.[3][4] WPAD was first included with Internet Explorer 5.0.

Context

In order for all browsers in an organization to be supplied the same proxy policy, without configuring each browser manually, both the below technologies are required:

The WPAD standard defines two alternative methods the system administrator can use to publish the location of the proxy configuration file, using the Dynamic Host Configuration Protocol (DHCP) or the Domain Name System (DNS):

Before fetching its first page, a web browser implementing this method sends the local DHCP server a DHCPINFORM query, and uses the URL from the WPAD option in the server's reply. If the DHCP server does not provide the desired information, DNS is used. If, for example, the network name of the user's computer is pc.department.branch.example.com, the browser will try the following URLs in turn until it finds a proxy configuration file within the domain of the client:

(Note: These are examples and may not be live URLs.)

Notes

Requirements

In order for WPAD to work, a few requirements have to be met:

Security

While greatly simplifying configuration of one organisation's web browsers, the WPAD protocol has to be used with care: simple mistakes can open doors for attackers to change what appears on a user's browser:

Through the WPAD file, the attacker can point users' browsers to their own proxies and intercept and modify all of WWW traffic. Although a simplistic fix for Windows WPAD handling was applied in 2005, it only fixed the problem for the .com domain. A presentation at Kiwicon showed that the rest of the world was still critically vulnerable to this security hole, with a sample domain registered in New Zealand for testing purposes receiving proxy requests from all over the country at the rate of several a second.

Thus, an administrator should make sure that a user can trust all the DHCP servers in an organisation and that all possible wpad domains for the organisation are under control. Furthermore, if there's no wpad domain configured for an organisation, a user will go to whatever external location has the next wpad site in the domain hierarchy and use that for its configuration. This allows whoever registers the wpad subdomain in a particular country to perform a man-in-the-middle attack on large portions of that country's internet traffic by setting themselves as a proxy for all traffic or sites of interest.

On top of these traps, the WPAD method fetches a JavaScript file and executes it on all users browsers, even when they have disabled JavaScript for viewing web pages.

References

  1. ^ "Navigator Proxy Auto-Config File Format". Netscape Navigator Documentation. March 1996. Archived from the original on Dec 18, 2006. http://web.archive.org/web/20061218002753/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html. Retrieved 2009-09-29. 
  2. ^ Gauthier, Paul; Josh Cohen, Martin Dunsmuir, Charles Perkins (7/28/99). "INTERNET-DRAFT Web Proxy Auto-Discovery Protocol". IETF. http://tools.ietf.org/html/draft-ietf-wrec-wpad-01. Retrieved 2009-10-15. 
  3. ^ Chromium Issue: "WPAD (proxy autodetect discovery) does not test DHCP" https://code.google.com/p/chromium/issues/detail?id=18575
  4. ^ Firefox bug: "Proxy autodiscovery doesn't check DHCP (option 252)" https://bugzilla.mozilla.org/show_bug.cgi?id=356831
  5. ^ Chromium Issue: "Non-Windows platforms: WPAD (proxy autodetect discovery) does not test DHCP" https://code.google.com/p/chromium/issues/detail?id=18575
  6. ^ Firefox bug: "Proxy autodiscovery doesn't check DHCP (option 252)" https://bugzilla.mozilla.org/show_bug.cgi?id=356831

Further reading

External links