Tal<p>-8-</p><p>Why are you still using my server for your internet access - Thomas Boejstrup Johansen</p><p>Ah, WPAD — now that's a name I haven't heard in a long time.</p><p>Short for "Web Proxy Auto-Discovery", WPAD is a protocol for machines on local networks to get their proxy configuration. Invented by Netscape in 1996, this protocol has been deprecated for a LONG time — in 1999, today marking its 25th anniversary.</p><p>WPAD is pretty simple — it uses the network name of the user's machine to search for a <code>wpad.dat</code> file, going from more specific to broad. For example, if the network name is <code>pc.team.dep.org.com</code>, a WPAD implementation will try to fetch <code>wpad.team.dep.org.com/wpad.dat</code>, <code>wpad.dep.org.com/wpad.dat</code> and <code>wpad.org.com/wpad.dat</code> in order as long as the last one wasn't found.</p><p><code>wpad.dat</code> is a Proxy Auto-Config (PAC) file - a JavaScript file running in a limited environment. It implements a function that takes a URL and decides on the proxy server for the request (or DIRECT, for no proxy).</p><p>So why is this interesting? It happens that many implementations do an additional step, stripping the domain all the way to <code>wpad.com/wpad.dat</code>. </p><p>This is on the public internet! Thus this implementation takes a PAC file from a stranger and uses it as the device's proxy configuration.</p><p>Luckily, notable WPAD TLDs — <code>com</code>, <code>org</code>, and <code>net</code> — are protected and cannot be registered. However, others are fair game!</p><p>In his excellent talk, Thomas reveals that he was able to register <code>wpad.dk</code> (the TLD for Denmark) alongside a few more.</p><p>He set up a simple PAC file directing all traffic back to <code>p.wpad.dk</code>, with interesting information like the domain, private and public IP addresses of the client. The proxy always responds with an error message, while Thomas was able to record details about the access.</p><p>Here's the stats: 90K requests a day, totaling a whopping 1.1 billion (!!) requests in a year. They span the entire world but mostly from Europe.</p><p>The HTTP GET requests were made to many file extensions, like thousands of credentials and over half a million executables. About 200k URLs also included credentials in parameters! Interestingly, the server has received POST requests too, with their entire body!</p><p>The clients' User-Agents show how the WPAD issue is not solely a Microsoft problem but spans almost every possible client in existence — Linux, Apple, and many distinct applications are affected.</p><p>During his research, Thomas also looked at <code>wpad.dat</code> files on other TLDs, finding some suspiciously malicious — one redirecting unencrypted requests through their proxy, and another one stealing ad requests, possibly for revenue theft!</p><p>The talk is great, containing hilarious tidbits about the research and the feedback form on the proxy. These vulnerabilities display both the ingenuity of researchers and the difficulty of fully deprecating a problematic service once it's deeply ingrained in systems.</p><p><a href="https://infosec.exchange/tags/DEFCON" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DEFCON</span></a> <a href="https://infosec.exchange/tags/wpad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>wpad</span></a> <a href="https://infosec.exchange/tags/vulnerability" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vulnerability</span></a> <a href="https://infosec.exchange/tags/proxy" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>proxy</span></a></p><p><a href="https://www.youtube.com/watch?v=uwsykPWa5Lc" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=uwsykPWa5L</span><span class="invisible">c</span></a></p>