Web Proxy Autodiscovery Protocol

Web Proxy Autodiscovery Protocol

The Web Proxy Autodiscovery Protocol (WPAD) is a method used by clients to locate a proxy auto-config file automatically and use this to configure the browser's web proxy settings.

The method is available as an IETF internet draft "draft-ietf-wrec-wpad-01". The draft expired in December 1999, and has not as of March 2008, become an internet standard. Nevertheless, Internet Explorer and other major browsers such as Mozilla Firefox retain this functionality.

Context

In order to instruct all browsers in your organization to use the same proxy policy, without configuring each browser manually, you need one of two technologies:

* Proxy auto-config (PAC) standard: create and publish one central proxy configuration file. Details are discussed in a separate article.
* Web Proxy Autodiscovery Protocol (WPAD) standard: ensure that your organization's browsers will find this file without manual configuration. This is the topic of this article.

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:

* http://wpad.department.branch.example.com/wpad.dat
* http://wpad.branch.example.com/wpad.dat
* http://wpad.example.com/wpad.dat
* http://wpad.com/wpad.dat (in incorrect implementations, see note in Security below)

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

Notes

* "DHCP has a higher priority than DNS: if DHCP provides the WPAD URL, no DNS lookup is performed......""'*

DNS lookup removes the first part of the domain name (presumably the client identifier) and replaces it with "wpad". Then, it "moves up" in the hierarchy by removing more parts of the domain name, until it finds a WPAD PAC file or leaves the current organisation.
* The browser guesses where the organisation boundaries are. The guess is often right for domains like 'company.com' or 'university.edu', but wrong for 'company.co.uk' (see security below).
* For DNS lookups, the path of the configuration file is always wpad.dat. For the DHCP protocol, any URL is usable. For traditional reasons, PAC files are often called proxy.pac (of course, files with this name will be ignored by the WPAD DNS search).
* The MIME type of the configuration file must be "application/x-ns-proxy-autoconfig". Please read Proxy auto-config for more details.

Requirements

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

* If you want to use DHCP, then the DHCP must be configured to serve up the "site-local" option 252 ("auto-proxy-config") with a string value of "http://xxx.yyy.zzz.qqq/wpad.dat" (without the quotes) where xxx.yyy.zzz.qqq is the address of a web server (either IP or DNS).
* If you want to use DNS, then a DNS entry is needed for a host named WPAD.
* The host WPAD must be able to serve a web page.
* In both cases, the web server must be configured to set up dat files with a MIME type of "application/x-ns-proxy-autoconfig".
* The file named "wpad.dat" must be located in the WPAD web site's root directory.
* Examples for PAC files are shown in Proxy auto-config.
* Use caution when configuring a WPAD server in a virtual hosting environment. When automatic proxy detection is used, Internet Explorer sends a "Host: " header and Firefox sends a "Host: wpad" header. This is unexpected behavior, therefore, it is recommended that the wpad.dat file be hosted under the default Virtual Host rather than its own.

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 your browsers:

* An attacker inside your network can set up a DHCP server that hands out the URL of a malicious PAC script.
* If your network is 'company.co.uk' and for some reason you don't serve the file http://wpad.company.co.uk/wpad.dat, the browsers will go on to request http://wpad.co.uk/wpad.dat. The browser just doesn't think about if this is still inside your organization or not. See http://wpad.com/ for an example.
* The same method has been used with http://wpad.org.uk. This used to serve a wpad.dat file that would redirect all of the user's traffic to an internet auction site.

Through the WPAD file, the attacker can point your browsers to his own proxies and intercept and modify all of your 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, you should make sure that you can trust all the DHCP servers in your organisation and that all possible wpad domains for your organisation are under your control. Furthermore, if there's no wpad domain configured for your organisation, your PC 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 basically fetches a JavaScript file and executes it on all your browsers, even when they have disabled JavaScript for viewing web pages.

Further reading

*cite web|url=http://homepages.tesco.net./~J.deBoynePollard/FGA/web-browser-auto-proxy-configuration.html|title=Automatic proxy HTTP server configuration in web browsers|work=Frequently Given Answers|author=Jonathan de Boyne Pollard|date=2004
*cite web|url=http://video.google.com/videoplay?docid=-4596414840866123044|title=WPAD - Attacking the Proxy|author=Chris Paget|date=2007
*cite web|url=http://www.mercenary.net/blog/index.php?/archives/42-HOWTO-WPAD.html|title=HOWTO: WPAD|author=David W. Hankins|date=2008

External links

* IETF 1999: [http://www.ietf.org/proceedings/99nov/I-D/draft-ietf-wrec-wpad-01.txt Web Proxy Auto-Discovery Protocol] — Expired internet draft.
* http://wpad.com/ — where all unmatched WPAD traffic from .com domains goes to.
* http://wpad.kr/ — where all unmatched WPAD traffic from .kr domains goes to.
* Waikato Linux Users Group Wiki 2004: [http://www.wlug.org.nz/WPAD WPAD]
* [http://www.monash.edu.au/proxy-secure.pac http://www.monash.edu.au/proxy-secure.pac]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Web Proxy Autodiscovery Protocol — Web Proxy Auto Discovery Protocol (WPAD) (протокол автоматической настройки прокси)  метод, используемый клиентами для определения места (URL) расположения конфигурационного файла с использованием технологий DHCP и/или DNS. После того, как… …   Википедия

  • Web Proxy Autodiscovery Protocol — Das Web Proxy Autodiscovery Protocol (WPAD) ist ein Protokoll, mit dem Web Clients wie ein Browser automatisiert zu verwendende Web Proxies innerhalb eines Computernetzwerkes finden können, indem eine Proxy autoconfiguration (PAC) Datei unter… …   Deutsch Wikipedia

  • Proxy.pac — Anhand einer Proxy Auto Config Datei (PAC Datei) kann ein Webbrowser automatisch den passenden Proxyserver für eine gewünschte URL finden. Eine PAC Datei enthält eine JavaScript Funktion FindProxyForURL(url, host). Diese Funktion gibt einen… …   Deutsch Wikipedia

  • Proxy auto-config — The proxy auto config file defines how web browsers and other user agents can automatically choose the appropriate proxy server (access method) for fetching a given URL.A PAC file contains a JavaScript function FindProxyForURL(url, host) . This… …   Wikipedia

  • Proxy Auto-Config — Anhand einer Proxy Auto Config Datei (PAC Datei) kann ein Webbrowser automatisch den passenden Proxyserver für eine gewünschte URL finden. Eine PAC Datei enthält eine JavaScript Funktion FindProxyForURL(url, host). Diese Funktion gibt einen… …   Deutsch Wikipedia

  • Proxy (Rechnernetz) — Ein Proxy (von englisch proxy representative ‚Stellvertreter‘, von lateinisch proximus ‚der Nächste‘) ist eine Kommunikationsschnittstelle in einem Netzwerk. Er arbeitet als Vermittler, der auf der einen Seite Anfragen entgegennimmt, um …   Deutsch Wikipedia

  • Webproxy Autodiscovery Protokoll — Das Web Proxy Autodiscovery Protocol (WPAD) ist ein Protokoll mit dem Web Clients wie ein Browser automatisiert zu verwendende Web Proxies innerhalb eines Computernetzwerkes finden können, indem eine Proxy autoconfiguration (PAC) Datei unter… …   Deutsch Wikipedia

  • Dynamic Host Configuration Protocol — DHCP redirects here. For other uses, see DHCP (disambiguation). A DHCP Server settings tab The Dynamic Host Configuration Protocol (DHCP) is a network configuration protocol for hosts on Internet Protocol (IP) networks. Computers that are… …   Wikipedia

  • WPAD — Das Web Proxy Autodiscovery Protocol (WPAD) ist ein Protokoll mit dem Web Clients wie ein Browser automatisiert zu verwendende Web Proxies innerhalb eines Computernetzwerkes finden können, indem eine Proxy autoconfiguration (PAC) Datei unter… …   Deutsch Wikipedia

  • Fichier .PAC — Un fichier de Configuration Automatique de Proxy ou fichier.PAC (proxy auto config) définit la façon selon laquelle un navigateur web (ou d’autres fonctionnalités équivalentes, regroupées sous le nom de User agents) se connectent à Internet  …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”