Discussion:
[dns-operations] Web Proxy Auto-Discovery (WPAD) Information Disclosure
Gadi Evron
2007-12-03 23:43:07 UTC
Permalink
http://www.microsoft.com/technet/security/advisory/945713.mspx

A malicious user could host a WPAD server, potentially establishing it as
a proxy server to conduct man-in-the-middle attacks against customers
whose domains are registered as a subdomain to a second-level domain
(SLD). For customers with a primary DNS suffix configured, the DNS
resolver in Windows will attempt to resolve an unqualified .wpad. hostname
using each sub-domain in the DNS suffix until a second-level domain is
reached. For example, if the DNS suffix is corp.contoso.co.us and an
attempt is made to resolve an unqualified hostname of wpad, the DNS
resolver will try wpad.corp.contoso.co.us. If that is not found, it will
try, via DNS devolution, to resolve wpad.contoso.co.us. If that is not
found, it will try to resolve wpad.co.us, which is outside of the
contoso.co.us domain.
Peter Koch
2007-12-04 00:06:50 UTC
Permalink
Post by Gadi Evron
http://www.microsoft.com/technet/security/advisory/945713.mspx
try, via DNS devolution, to resolve wpad.contoso.co.us. If that is not
found, it will try to resolve wpad.co.us, which is outside of the
contoso.co.us domain.
congratulations for only 14 years after publication of RFC 1535 finding out
that DNS tree climbing is a bad idea.

-Peter
Sidney Faber
2007-12-04 14:02:01 UTC
Permalink
You hit the nail on the head--DNS tree climbing, or in the MS world,
"DNS Devolution", is bad.

There's a good description of DNS Devolution, including when and how and
why it occurs, in the Win2k documentation at
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/prork/prcc_tcp_dacz.mspx?mfr=true,
"TCP/IP in Windows 2000 Professional". The root cause is the "Append
parent suffixes of the primary DNS suffix" (ie, DNS Devolution) option
shown in figure 22.7.

Following the flow charts, devolution is figure 22.6, which only occurs
for unqualified single-label queries when no DNS suffix search list is
configured. The client first tries the fully qualified name
(wpad.aaa.bbb.contoso.com.) for _all_ connection-specific names on _all_
adapters before "devolving" up the DNS tree. (Keep in mind that most
windows VPN clients create a virtual connection, so all private DNS
requests on a VPN that are unanswered within 1 sec get leaked out the
public interface...and probably often end up as garbage
"wpad.contoso.local" type queries at the roots.)

WPAD is one specific example of a more general case, I wonder if Win2k
service discovery or .inaddr.arpa lookups are similarly affected.
Post by Peter Koch
Post by Gadi Evron
http://www.microsoft.com/technet/security/advisory/945713.mspx
try, via DNS devolution, to resolve wpad.contoso.co.us. If that is not
found, it will try to resolve wpad.co.us, which is outside of the
contoso.co.us domain.
congratulations for only 14 years after publication of RFC 1535 finding out
that DNS tree climbing is a bad idea.
-Peter
_______________________________________________
dns-operations mailing list
dns-operations at lists.oarci.net
http://lists.oarci.net/mailman/listinfo/dns-operations
--
Sid Faber, Member of the Technical Staff
CERT
Software Engineering Institute
Carnegie Mellon University
sfaber at cert.org
Peter Koch
2007-12-04 15:25:11 UTC
Permalink
Post by Sidney Faber
You hit the nail on the head--DNS tree climbing, or in the MS world,
"DNS Devolution", is bad.
it is even worse than that. I remember the very IETF meeting when this was
presented and the then chair of the IAB, IIRC, tried to convince the
proponents to reconsider. Some of us went out to initiate some DNS
registrations ("went out" means we couldn't just use our wireless laptops,
back in the last century).

Unfortunately this is a reocurring mikstake, grep for "_nfsv4idmapdomain" in
your DNS logs.

-Peter
Paul Vixie
2007-12-04 17:32:56 UTC
Permalink
Post by Peter Koch
Unfortunately this is a reocurring mikstake, grep for "_nfsv4idmapdomain" in
your DNS logs.
here's what ISC SIE has seen in the last while. first column is a time_t.

1196254557 _nfsv4idmapdomain.littleappletech.com
1196288841 _nfsv4idmapdomain.abcdef.com
1196348550 _nfsv4idmapdomain.littleappletech.com
1196378550 _nfsv4idmapdomain.abcdef.com
1196703425 _nfsv4idmapdomain.abcdef.com

actual RR's, and client and server ip addresses, not shown for privacy reasons.
Rickard Dahlstrand
2007-12-04 06:23:01 UTC
Permalink
Post by Gadi Evron
http://www.microsoft.com/technet/security/advisory/945713.mspx
A malicious user could host a WPAD server, potentially establishing it as
a proxy server to conduct man-in-the-middle attacks against customers
whose domains are registered as a subdomain to a second-level domain
(SLD). For customers with a primary DNS suffix configured, the DNS
resolver in Windows will attempt to resolve an unqualified .wpad. hostname
using each sub-domain in the DNS suffix until a second-level domain is
reached. For example, if the DNS suffix is corp.contoso.co.us and an
attempt is made to resolve an unqualified hostname of wpad, the DNS
resolver will try wpad.corp.contoso.co.us. If that is not found, it will
try, via DNS devolution, to resolve wpad.contoso.co.us. If that is not
found, it will try to resolve wpad.co.us, which is outside of the
contoso.co.us domain.
Most of the wpad.tld domains are already reserved like this one
http://wpad.com/ It's amazing that when they fixed it for .com etc. a
while back they missed that there where two-level tld-domains.

Rickard.
Simon Lyall
2007-12-04 06:42:55 UTC
Permalink
Post by Rickard Dahlstrand
Most of the wpad.tld domains are already reserved like this one
http://wpad.com/ It's amazing that when they fixed it for .com etc. a
while back they missed that there where two-level tld-domains.
I remember hearing about the person who used to own wpad.co.nz . Most of
the time they kept it offline due to the huge amount of traffic it
attracted

I should check the DNS logs at work to see how many queries it gets these
days.
--
Simon J. Lyall | Very Busy | Web: http://www.darkmere.gen.nz/
"To stay awake all night adds a day to your life" - Stilgar | eMT.
Gadi Evron
2007-12-04 06:56:51 UTC
Permalink
Post by Rickard Dahlstrand
Post by Gadi Evron
http://www.microsoft.com/technet/security/advisory/945713.mspx
A malicious user could host a WPAD server, potentially establishing it as
a proxy server to conduct man-in-the-middle attacks against customers
whose domains are registered as a subdomain to a second-level domain
(SLD). For customers with a primary DNS suffix configured, the DNS
resolver in Windows will attempt to resolve an unqualified .wpad. hostname
using each sub-domain in the DNS suffix until a second-level domain is
reached. For example, if the DNS suffix is corp.contoso.co.us and an
attempt is made to resolve an unqualified hostname of wpad, the DNS
resolver will try wpad.corp.contoso.co.us. If that is not found, it will
try, via DNS devolution, to resolve wpad.contoso.co.us. If that is not
found, it will try to resolve wpad.co.us, which is outside of the
contoso.co.us domain.
Most of the wpad.tld domains are already reserved like this one
http://wpad.com/ It's amazing that when they fixed it for .com etc. a
while back they missed that there where two-level tld-domains.
Rickard.
http://www.microsoft.com/technet/security/bulletin/fq99-054.mspx
-----
What's the problem with the search algorithm?
When IE 5 starts, it will begin searching for a WPAD server, if it is
configured to use WPAD. It starts the search by adding the hostname "WPAD"
to current fully-qualified domain name. For instance, a client in
a.b.Microsoft.com would search for a WPAD server at
wpad.a.b.microsoft.com. If it could not locate one, it would remove the
bottom-most domain and try again; for instance, it would try
wpad.b.microsoft.com next. IE 5 would stop searching when it found a WPAD
server or reached the third-level domain, wpad.microsoft.com.
The algorithm stops at the third level in order to not search outside of
the current network. However, for international sites, this is not
sufficient, because third-level domains can be outside the current
network. For example, if the network at xyz.com.au did not have a WPAD
server, the search algorithm eventually would reach wpad.com.au, which is
an external network name. If the owner of wpad.com.au set up a WPAD
server, he or she could provide chosen proxy server configuration settings
to the clients at xyz.com.au. For that matter, any network in com.au that
didn't have its own WPAD server but did have WPAD enabled in its web
clients also would also resolve to wpad.com.au.
-----
Post by Rickard Dahlstrand
From the FAQ for the 1999 fix...
It is quite possible, and we can assume (until someone tells us they
know), that they fixed it for ccTLDs as well, and then re-introduced the
flaw somehow.

Also:
http://www.wlug.org.nz/WPAD
-----
(BeauButler?: I have registered wpad.co.nz, and do not intend to be
'really nasty'. I am collecting the 404 logs with the intention to produce
some nice charts, hoever. Also, the wpad organisational-boundaries bug
appears to have resurfaced in Internet Explorer 7!!)
-----
Beau Bulter is the guy who got all the press by talking about this at
kiwicon last week:
https://kiwicon.org/presentations#oddy

This is the story that got Microsoft's attention:
http://www.theage.com.au/news/technology/flaw-leaves-microsoft-looking-like-a-turkey/2007/11/23/1195975914416.html
Which is where Beau says there are ~160,000 exploitable machines in NZ
alone. He would *supposedly* know since he has the wpad.co.nz domain.

Whether it is a major issue or not, misconfigurations happens, heck, shit
happens. I'd think we should watch for this and get that domain
registered/monitored at different ccTLDs.

Gadi.
Duane Wessels
2007-12-04 17:04:47 UTC
Permalink
Post by Rickard Dahlstrand
Most of the wpad.tld domains are already reserved like this one
http://wpad.com/ It's amazing that when they fixed it for .com etc. a
while back they missed that there where two-level tld-domains.
I wouldnt say that they fixed it for .com, or probably ever will.
I'm the lucky holder of wpad.{com,net,org,biz,us}. You can see the
number of 404's that I've served over the years at
Loading Image...

DW
Duane Wessels
2007-12-04 17:17:27 UTC
Permalink
Also, FYI, here's the top 30 user agent counts from my logs for yesterday.
Requests from user agents with "Linux" totalled only 965.

522750 | Mozilla/4.0 (compatible; MSIE 6.0; Win32)
246828 | Windows-Update-Agent
130619 | Mozilla/4.0 (compatible; MSIE 7.0; Win32)
64146 | Microsoft-CryptoAPI/5.131.2600.2180
41359 | WinHttp-Autoproxy-Service/5.1
35310 | NSPlayer/11.0.5721.5145
12107 | Kaspersky Proxy-Server detection agent
11332 | Updaterpre 1.3.005
10779 | Mozilla/4.0 (compatible; MSIE 5.5; Win32)
8981 | -
7597 | Mozilla/4.0 (compatible; MSIE 5.0; Win32)
3068 | Microsoft SUS Client/2.0
2822 | NSPlayer/11.0.5358.4827
2649 | RTNotify
2594 | NSPlayer/10.00.00.3802
2538 | CHttpProxyDetect
2274 | NSPlayer/9.00.00.3250
1882 | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
1668 | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
1490 | System.Net.AutoWebProxyScriptEngine/2.0.50727.312
1322 | Microsoft-WebDAV-MiniRedir/6.0.6000
994 | WinHttpWPADProxySelector
913 | NSPlayer/11.0.6000.6324
687 | Mozilla/4.0 (compatible; MSIE 6.0b; Win32)
595 | Konfabulator!
560 | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10
530 | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.10) Gecko/20071115 Firefox/2.0.0.10
478 | Updater1.3.002
447 | Microsoft BITS/6.6
445 | NSPlayer/9.00.00.2980
Rickard Dahlstrand
2007-12-04 18:15:24 UTC
Permalink
Post by Duane Wessels
Post by Rickard Dahlstrand
Most of the wpad.tld domains are already reserved like this one
http://wpad.com/ It's amazing that when they fixed it for .com etc. a
while back they missed that there where two-level tld-domains.
I wouldnt say that they fixed it for .com, or probably ever will.
I'm the lucky holder of wpad.{com,net,org,biz,us}. You can see the
number of 404's that I've served over the years at
http://www.wpad.com/data/requests.png
Amazing, I didn't realize that. A while back I looked thru some of our
traffic from our se-nameservers and found no traces of wpad.se queries
thought. But this is really hard proof!

Anyway, is the wpad.* an issue, are there any domains left for 'evil
doers' to use?

Rickard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oarci.net/pipermail/dns-operations/attachments/20071204/8099535a/attachment.html
Loading...