1 00:00:02,140 --> 00:00:08,500 Yeah, my name is Thomas and um, my daily work is incident response and forensics. 2 00:00:08,700 --> 00:00:10,420 Uh, I have done some red team. 3 00:00:10,960 --> 00:00:21,900 So, in red team engagements, I often use Responder, where there's a function to set up a rogue proxy server with the WPAD function. 4 00:00:22,720 --> 00:00:37,900 So, monitoring the network to see the traffic, seeing that clients is asking for the WPAD domain, and in the company, but it is also sometimes asking for WPAD.TLD. 5 00:00:38,940 --> 00:00:41,420 So, who is having this domain? 6 00:00:41,420 --> 00:00:42,380 Is it in use? 7 00:00:42,380 --> 00:00:43,040 Is it free? 8 00:00:43,040 --> 00:00:44,220 Can I buy it? 9 00:00:44,240 --> 00:00:45,840 What are they using it for? 10 00:00:46,060 --> 00:00:54,040 So, at the time, I looked at this, I looked up and discovered it was a German guy that had this Danish domain. 11 00:00:54,500 --> 00:00:56,940 Uh, don't know what he was using it for. 12 00:00:57,360 --> 00:01:03,020 Two years later, I looked again, discovered there's a man in Israel having the Danish domain. 13 00:01:03,880 --> 00:01:13,300 And in 2020, the Danish register for DK, DK domains added a function where you can sign up for a waiting list. 14 00:01:13,300 --> 00:01:17,940 So, I signed up for a waiting list and paid small fee every year. 15 00:01:19,640 --> 00:01:35,100 So, how it's working, the basic is that a client goes to, for requesting a webpage, it's going to the DNS server, finding the IP address, then go to the web server and, and getting the content back. 16 00:01:35,100 --> 00:01:36,300 Very basic. 17 00:01:36,640 --> 00:01:43,340 If we are adding a proxy server into the mix, then the proxy server will do all the heavy lifting. 18 00:01:43,440 --> 00:01:54,420 So, the client is asking the proxy server, the proxy server is, is doing the name resolving and getting the webpage and returning the content to the end client. 19 00:01:55,940 --> 00:02:10,480 So, back in 1996, Netscape decided that there must be an easier function for, when you're adding a machine to a network , to automatically config the machine. 20 00:02:10,480 --> 00:02:18,800 So, they come up with this WP pad function to automatically ask for the machine where the configuration file is stored. 21 00:02:20,480 --> 00:02:31,000 They sit down a consortium to try to make an FC standard for it, but it never eclipsed as it expired in 1999. 22 00:02:31,600 --> 00:02:35,420 So, it's 25 years anniversary now. 23 00:02:37,710 --> 00:02:55,790 According to Wikipedia, the way it works is that you have the name where the client is part of the domain, it will add WP in the front and slowly test until it finds a name where it matches and get a response and can download the configuration file. 24 00:02:56,290 --> 00:03:04,870 But, in some implementations, it will go down to WP pad dot TLD and then download the configuration file from there. 25 00:03:04,870 --> 00:03:13,490 And as you can see on the Wikipedia page here, it says that it, uh, incorrect, uh, solution and it shouldn't be used that way. 26 00:03:13,490 --> 00:03:16,190 So, that's a security issue. 27 00:03:17,790 --> 00:03:28,210 So, the way with WP pad is that you have a client, it's called client dot A dot company dot com, then it will search for WP pad when the browser is open. 28 00:03:28,350 --> 00:03:36,570 It will then remove the client name and then try to add WP pad dot A dot company dot com and try to resolve that. 29 00:03:36,570 --> 00:03:39,330 If that's not working, it removes one name. 30 00:03:39,330 --> 00:03:42,410 So, it's WP pad dot company dot com. 31 00:03:42,410 --> 00:03:50,710 And in this example, it's resolving the IP address and then it goes to a web server trying to download a file called WP pad dot that. 32 00:03:51,070 --> 00:03:54,130 And that's the configuration file for the client. 33 00:03:54,790 --> 00:03:59,690 It can also be configured with other solutions like DHCP bins and so on. 34 00:04:00,570 --> 00:04:11,990 So, the that file, it downloads, is actually a small Java script that the client execute on the client machine with, uh, called find proxy for URL. 35 00:04:11,990 --> 00:04:15,610 It's input what URL it's trying to go to and the name. 36 00:04:15,610 --> 00:04:28,510 And then you can modify this script to say that the client should go direct if it's company name addresses or it should go to a proxy server if it's all, anything else on the internet. 37 00:04:28,510 --> 00:04:32,130 Like this proxy dot company dot TLD dot 880. 38 00:04:33,410 --> 00:04:45,170 So, here we have an example of where it's trying to go to Defcon dot org and it's not matching any of the if statements and then go to the proxy as the last return statement. 39 00:04:45,910 --> 00:04:53,590 There's a website dedicated for all the functions that can be used in this limited, very limited, uh, uh, JavaScript language. 40 00:04:53,590 --> 00:04:55,530 You cannot use all functions. 41 00:04:56,150 --> 00:04:59,650 Um, here you can see the top part of the functions. 42 00:04:59,790 --> 00:05:03,530 There's DNS domains resolved, is it in net and so on. 43 00:05:03,530 --> 00:05:14,730 But there's also some other functions that work, like I have found here, the stable functions, I call them, which I can get user agent, host name, time zone and so on. 44 00:05:14,730 --> 00:05:22,810 In the past I could also from some clients get screen resolution and color depth and so on from each client. 45 00:05:22,810 --> 00:05:29,270 But that's very unstable and many of the clients that crashes the JavaScript when trying to ask for that. 46 00:05:31,350 --> 00:05:41,330 So I can , uh, VPAT is implemented, is not implemented in a company and someone gets the top level domain. 47 00:05:41,330 --> 00:05:45,750 Then what happens is that the client is asking for the VPAT in the company. 48 00:05:45,910 --> 00:05:48,370 It doesn't get any results. 49 00:05:48,370 --> 00:05:55,690 It tries again by removing one name and tries again by removing one name and ending on VPAT DK. 50 00:05:56,530 --> 00:06:11,550 So it goes to an external VPAT web server downloading a configuration file for the client, how it should use proxy settings and trust that server even as it's not inside the company. 51 00:06:14,250 --> 00:06:26,450 In 1999, when it expired and Microsoft was part of this consortium, the same month Microsoft was informed that there's a security issue. 52 00:06:26,450 --> 00:06:33,770 If someone buys the top level domain with any TLD, you can basically own a complete country. 53 00:06:34,530 --> 00:06:38,830 And so there has been talks about this before. 54 00:06:38,830 --> 00:06:49,170 In 2007 on KiwiCon, there was some guy having an 80 year anniversary for this issue, looking at the things and had a very good talk. 55 00:06:49,170 --> 00:06:51,570 Unfortunately it's not public anymore. 56 00:06:52,330 --> 00:06:57,710 And then at SmoothCon, same year, another guy had the look into this. 57 00:06:58,750 --> 00:07:06,350 And then Microsoft got busy again trying to make a new patch, trying to fix whatever was found in 2007. 58 00:07:07,050 --> 00:07:08,730 So now it's fixed, right? 59 00:07:09,170 --> 00:07:10,490 It should be. 60 00:07:12,510 --> 00:07:15,230 So for me the waiting time is over. 61 00:07:15,230 --> 00:07:28,090 In 2023, in March, I got a mail from the Danish registrar, the host master, saying that the VPAT DK domain was now mine and I could register it and assign it to a server. 62 00:07:28,090 --> 00:07:38,810 So I found a cheap web portal and added to a web server there just because I wanted to see if there was any traffic at all, just monitor the logs and so on. 63 00:07:39,310 --> 00:07:53,130 At the same time I looked at who has owned this domain in the past and I could see that from the talks in 2007, there was someone in Denmark deciding it was a good idea to have this domain for some years. 64 00:07:53,130 --> 00:08:03,030 But then he sold it and one guy in Belgium got the domain and one in Germany and then one in Israel and then I got it here last year. 65 00:08:05,210 --> 00:08:10,790 So this is the logs from the first day I assigned the VPAT to a web portal. 66 00:08:11,130 --> 00:08:19,630 I was a bit surprised to get more than 80,000 requests of this VPAT.dat file on the first day basically. 67 00:08:19,690 --> 00:08:26,370 The spike in the graph, I think that's the rollover time from I started, that has to go to 24 hours. 68 00:08:26,370 --> 00:08:27,790 That's why it's not linear. 69 00:08:28,150 --> 00:08:35,650 So basically 80,000 requests on the first day without doing anything other than buying a web portal and adding the domain. 70 00:08:37,050 --> 00:08:41,010 So that's not fun because I don't have access to all the log files. 71 00:08:41,010 --> 00:08:54,130 So the way was that I set up a VPS server, installed DNS server on it, become my own name server on the internet, registered and DNS sec and all the things and added a web server on top of that. 72 00:08:54,130 --> 00:09:02,370 That way I could add the domains I got into this server and capture all the traffic, all the logs in the way I like to have them. 73 00:09:03,910 --> 00:09:06,630 And every good website should have a web page, right? 74 00:09:06,630 --> 00:09:17,590 So I took my best skills and opened notepad and crafted a web page where I added some crap about you shouldn't use this page and this is for research and so on. 75 00:09:20,360 --> 00:09:35,120 So when the client is downloading this VPAT.dat file, the Javascript and executing it on the internal client machine, it cannot see the public IP that is coming out when it's going onto the internet. 76 00:09:35,180 --> 00:09:45,040 So the way I fixed that was that I added on my web server a dynamic web page that builds the Javascript for the client dynamically. 77 00:09:45,040 --> 00:09:50,420 So I add the client's public IP into the script before each client get the script. 78 00:09:50,420 --> 00:09:53,260 So they're getting a dedicated script for each client. 79 00:09:53,260 --> 00:10:00,180 So I have the public IP, even the client doesn't know it by themselves on the internal network. 80 00:10:01,920 --> 00:10:11,240 So when a client, one, two, three, want to go to the net, this is a simplified version of my script. 81 00:10:11,240 --> 00:10:23,860 But what it's basically doing, I'm building a string in the DNS name with the information I take from the client like the time zone, internal IP, external IP and so on. 82 00:10:23,960 --> 00:10:29,380 So I can leak data to my DNS server about the internal client. 83 00:10:30,440 --> 00:10:46,820 So in this example you can see the client is told to go to Defcon.org and the D is the time zone, I and then internal IP, W is the world IP, public IP, and then it goes to p.vpat.dk as my server. 84 00:10:46,820 --> 00:10:51,740 And of course I use port 80 because I want all the traffic to be unencrypted. 85 00:10:51,960 --> 00:10:55,900 So just come as normal HTTP, unencrypted. 86 00:10:57,240 --> 00:11:06,280 So then the client for every request they make on the machine, all URLs, they will pass it through this web proxy script. 87 00:11:06,280 --> 00:11:13,380 And then it will go to this address that builds automatically or dynamically for each request they're doing. 88 00:11:13,440 --> 00:11:26,700 So I get in my log files a listing of what traffic they are trying to resolve and then I tell them to all the requests go to this web server, that is my web server on the same host. 89 00:11:28,500 --> 00:11:42,080 And then the client is asking my server for some webpage and I'm so kind so I return errors for everything because I don't want to run a proxy server on the internet that is open and be a man in the middle. 90 00:11:45,460 --> 00:11:55,440 So I get to see the inside with HTTP clear text but they think I'm asking on the outside at HTTPS. 91 00:11:57,140 --> 00:12:02,620 So for every request every client is making, I'm returning this error page. 92 00:12:05,900 --> 00:12:15,960 And to be nice to the users, I have included an input form so if they don't like what they're seeing, they can tell me what the hell is wrong and what I should do better. 93 00:12:16,060 --> 00:12:25,900 And there's also a check box for whitelisting the client so they can input their host name and add the whitelist check box. 94 00:12:26,060 --> 00:12:30,840 But I haven't implemented that function so this is first step on the form, right? 95 00:12:32,800 --> 00:12:41,780 And just a disclaimer, I'm not intercepting any traffic, I'm just looking at log files and so on from requests that's coming in. 96 00:12:41,780 --> 00:12:45,400 I haven't told any clients anywhere to contact my server. 97 00:12:45,400 --> 00:12:51,380 I've only just bought one domain name, set up a web server and all the clients are coming to my server. 98 00:12:52,420 --> 00:12:55,960 So this is an example of information I'm getting from one client. 99 00:12:55,960 --> 00:13:10,700 I can see the client's public IP, what name server it used, what internal IP address it has, the time zone and then of course from the web server log I can see what they're asking for and thereby also which user agency they have. 100 00:13:10,700 --> 00:13:15,280 What application are they using and operating system and so on. 101 00:13:16,360 --> 00:13:17,960 So this was fun. 102 00:13:17,960 --> 00:13:20,960 I can get a lot of traffic into the server. 103 00:13:21,380 --> 00:13:23,360 More than I expected. 104 00:13:23,360 --> 00:13:26,360 So why not look for buying some more domains? 105 00:13:28,100 --> 00:13:35,120 Sadly the three domains here, they are protected so you cannot register them. 106 00:13:35,120 --> 00:13:36,360 There's a limit on that. 107 00:13:36,360 --> 00:13:38,400 They have already set that up. 108 00:13:38,460 --> 00:13:42,700 But I got ID and site and build just for fun. 109 00:13:43,500 --> 00:13:52,060 Why not looking at the list that was press and porn so we can try and see which one of them is the most popular one. 110 00:13:53,720 --> 00:13:56,120 And because we are here, dot Vegas. 111 00:13:57,940 --> 00:14:08,440 And then I found that the vpat.eu was apparently registered but there was someone trying to sell the domain but I'm not buying it at that price. 112 00:14:08,700 --> 00:14:11,960 So I could see that also rented domain. 113 00:14:11,960 --> 00:14:15,660 So I asked them can I rent this domain for one year? 114 00:14:15,660 --> 00:14:19,820 And is there any limits or rules for what I can use the domain for? 115 00:14:19,820 --> 00:14:22,120 And they say no, you can, there's no rules. 116 00:14:22,120 --> 00:14:23,880 You can rent it for one year. 117 00:14:23,880 --> 00:14:27,920 And I paid three and a half euro per month for renting the domain. 118 00:14:27,920 --> 00:14:31,600 And then I politely returned it when I was done with it. 119 00:14:33,140 --> 00:14:37,340 So this is my list of domains for this research. 120 00:14:38,880 --> 00:14:47,840 And for one year, from April to April, I get 1.1 billion DNS requests resolving in 200 gigabyte text log files. 121 00:14:47,840 --> 00:14:50,200 This is for the DNS server alone. 122 00:14:51,420 --> 00:15:04,220 And if you look down on the, I don't know how big it is, but there's a client asking for cnn.com and you can then see the internal IP and public IP and so on of the clients. 123 00:15:07,340 --> 00:15:16,040 So here I have seen on which repat domain, where are the clients coming from in the world. 124 00:15:16,100 --> 00:15:29,080 And for the Danish domain, .dk, there's obviously a lot of traffic from Denmark, but to my surprise, why is there so much traffic from Russia and Ukraine to the Danish domain? 125 00:15:29,500 --> 00:15:32,320 And then there's a big jump down to Germany. 126 00:15:32,720 --> 00:15:33,860 So it's a bit odd. 127 00:15:33,860 --> 00:15:38,360 There's so much traffic for that on the DK domain. 128 00:15:39,180 --> 00:15:50,640 And the .vegas domain on the right, yeah, of course United States would be there, but all the other domains, it's a mixed order of why they have the .vegas. 129 00:15:53,320 --> 00:16:05,680 So when Windows machines today is connected to a network, it will in the lower right corner have a nice icon indicating it has internet access and is working. 130 00:16:05,840 --> 00:16:16,440 But because I'm a proxy server that doesn't return anything and doesn't work by design, the clients of course will show that they don't have internet access. 131 00:16:16,440 --> 00:16:28,140 So I found that for this list of six Microsoft domains, if I return the string OK for every request, the client will indicate it has good internet access. 132 00:16:28,320 --> 00:16:35,580 So I just added a rule to the proxy web server function saying if you see this domain, respond with OK. 133 00:16:35,580 --> 00:16:40,460 And all the clients then suddenly indicated they have good internet access again. 134 00:16:42,600 --> 00:16:45,320 So what type of traffic do I see? 135 00:16:45,320 --> 00:16:48,300 Here's the types of requests I see. 136 00:16:48,580 --> 00:16:55,920 And again, of course, I see a lot of GET requests, but I also see a lot of POST requests. 137 00:16:55,920 --> 00:16:58,920 So that's clients sending data up to the servers. 138 00:16:59,040 --> 00:17:03,200 And then I got all the CONNECT requests, that's the proxy traffic. 139 00:17:03,260 --> 00:17:09,340 There's 1.1 billion requests for asking the proxy server to collect something. 140 00:17:09,340 --> 00:17:18,800 So that's actually clients that has downloaded the proxy pack scripts and executed it on a machine and then coming and asking for a web page. 141 00:17:19,180 --> 00:17:32,140 But also we see on the list, there's WebDAO, there's Apple, there's Microsoft SSM client, there's Microsoft VPN, and there's many more I have not included in this. 142 00:17:32,660 --> 00:17:36,100 So there's a lot of different traffic in this. 143 00:17:37,140 --> 00:17:39,840 And that is based on the Apache log files. 144 00:17:39,840 --> 00:17:50,620 You can see in the lower corner about 470 gigabytes Apache log files with 1.5 billion requests in them. 145 00:17:50,860 --> 00:17:54,320 So it takes some time to grab through them and find the data. 146 00:17:56,680 --> 00:18:11,660 So because I am a proxy server, the client trusts, and I've given them a configuration script, I've told them to send every data to my server, including local traffic. 147 00:18:11,760 --> 00:18:16,880 So if you look here, you can see an internal client, there's 1.5. 148 00:18:17,160 --> 00:18:22,800 It should actually talk to the same computer on the same network next to it, 1.1. 149 00:18:22,920 --> 00:18:30,660 But because I've given it a script saying, no, you should ask the proxy server, it's sending the traffic up to me and asking me as a proxy server. 150 00:18:31,020 --> 00:18:33,100 Even that they are on the same network. 151 00:18:35,320 --> 00:18:39,260 And post requests, this is client sending data. 152 00:18:39,600 --> 00:18:42,620 They are just posting data against a web server. 153 00:18:43,400 --> 00:18:45,880 37 million requests. 154 00:18:46,200 --> 00:18:48,880 As I don't have the data, I only have the logs. 155 00:18:48,880 --> 00:18:50,400 I don't know what it is. 156 00:18:50,400 --> 00:18:58,420 But everything clients sends to servers, so they can be confidential data, whatever documents, files, content, whatever. 157 00:19:00,900 --> 00:19:14,060 And again, because I'm controlling everything with my proxy scripts, so every local traffic I have in the domain, from the clients, it should never go to the Internet because it's not resolvable on the Internet. 158 00:19:14,380 --> 00:19:18,720 That's designed to be handled, to be used for internal network. 159 00:19:19,220 --> 00:19:31,260 So here we see some funny domains like Citrix and FilePrint and vCenter and, yeah, where the client is coming up to my proxy server and asking for me to get that traffic. 160 00:19:31,660 --> 00:19:36,320 Because it's local, I can of course not get the traffic, but I can see what they are asking for. 161 00:19:39,190 --> 00:19:56,210 And then some years back, there started to be a new smart function in the browsers because they want to protect the DNS traffic, saying we want now to send the DNS traffic over HTTPS because then rogue guys, man in the middle, couldn't happen and they couldn't control it. 162 00:19:56,270 --> 00:20:11,170 But because I'm now a man in the middle proxy server, I'm also controlling the DNS over HTTP and it's basically just, as you can see here, a client asking for Baidu.com and then it returns a JSON blob. 163 00:20:11,170 --> 00:20:19,310 So my proxy could return whatever I want, a JSON blob directing the client to go to another location or whatever. 164 00:20:22,720 --> 00:20:28,560 So passing through the log files and looking for all the file extensions that is downloaded. 165 00:20:28,900 --> 00:20:30,520 This is some of them. 166 00:20:30,520 --> 00:20:32,240 This is the highlighted one. 167 00:20:32,840 --> 00:20:46,140 It's a bit scary to see all the credentials and certificates and there's the executables, there's database files, there's scripts so I could replace a script if the client is executing the script on the machine. 168 00:20:46,160 --> 00:20:48,900 It's not a good thing for the client. 169 00:20:51,180 --> 00:20:56,000 Here's an example of executable files the clients tried to download. 170 00:20:56,000 --> 00:21:04,820 So there's Windows Update, Microsoft Installer, there's Antivirus Updates, Microsoft SCCM Client, and RealPlayer. 171 00:21:04,820 --> 00:21:08,220 And didn't know RealPlayer still was a thing, but okay. 172 00:21:08,460 --> 00:21:13,500 So there's a lot of different requests here and I get a lot of them. 173 00:21:13,500 --> 00:21:16,040 This is just a small sample list. 174 00:21:17,080 --> 00:21:35,100 But the list of file names I found with the extensions is not fully true because I also found that there was some bad guys trapped in my setup trying to scan other servers so they were trying to enumerate for different files like PFX files and other files. 175 00:21:35,100 --> 00:21:42,760 So you can see here there's a long list where they try to access a web server asking for different files and hoping that they find something. 176 00:21:47,060 --> 00:21:52,040 So credentials in the URL, there's a lot of them. 177 00:21:52,040 --> 00:21:58,180 I get 200,000 URL requests where the username and password is part of the URL. 178 00:21:58,660 --> 00:22:06,360 And I don't know if you can see the size of the screenshot there, but it's apparently an Indian guy that has a lot of friends. 179 00:22:06,360 --> 00:22:12,780 He's using a web service to send SMS messages to all his friends. 180 00:22:12,780 --> 00:22:14,760 He apparently has a lot of friends. 181 00:22:14,760 --> 00:22:17,040 There are many, many log lines here. 182 00:22:17,280 --> 00:22:20,040 So they all start with something. 183 00:22:21,540 --> 00:22:25,120 I don't know what he's trying to do. 184 00:22:27,080 --> 00:22:33,860 So credentials, here's some of the clear text, non-encrypted credentials. 185 00:22:33,860 --> 00:22:40,180 I just get to the server and some of them are so ridiculous like admin, admin. 186 00:22:40,180 --> 00:22:42,960 I cannot censor that away. 187 00:22:43,360 --> 00:22:44,480 You should see it. 188 00:22:44,480 --> 00:22:46,100 And there's change me, change me. 189 00:22:46,100 --> 00:22:48,540 I think that's a good idea to change that one. 190 00:22:49,700 --> 00:22:54,380 And security party, yeah, we are DEF CON, security is a party. 191 00:22:54,860 --> 00:22:57,880 So, yeah, that's very crappy credentials. 192 00:22:59,780 --> 00:23:09,700 And NTLM version 1 shouldn't be used for the last 20 years as Microsoft has tried to tell us, change to NTLM version 2. 193 00:23:10,300 --> 00:23:16,280 So administrator, root, security accounts and so on with NTLM version 1. 194 00:23:19,480 --> 00:23:22,420 And then there's NTLM version 2. 195 00:23:22,780 --> 00:23:36,840 I also got many, many clients sending the credentials and there's some good usernames here, admin, administrator, doctor, hotel manager, and then laser, that sounds fun to play with. 196 00:23:37,100 --> 00:23:42,840 And SA, that's normally a system administrator account on SQL servers and likes. 197 00:23:43,540 --> 00:23:46,620 So many good credentials if you are malicious. 198 00:23:48,580 --> 00:23:52,500 So what is the client talking to this server? 199 00:23:52,560 --> 00:23:57,660 When I started this project my thinking was this is just Microsoft crap. 200 00:23:58,240 --> 00:24:00,020 They should patch the things. 201 00:24:00,060 --> 00:24:03,540 But if you look at the list you can see it's basically everything. 202 00:24:03,680 --> 00:24:12,760 Every application, it's VPN clients, it's anti-virus applications, it's, yeah, the list is very long. 203 00:24:12,760 --> 00:24:14,360 This is just some of them. 204 00:24:14,360 --> 00:24:15,840 There's Cobalt Strike. 205 00:24:17,140 --> 00:24:23,760 And you can see in the lower left corner there's even some guy having trouble with his internet access. 206 00:24:23,760 --> 00:24:31,600 So he's using Wireshark to debug his network is not working because he's apparently using a proxy that doesn't return anything. 207 00:24:31,760 --> 00:24:36,860 So he's debugging that and I then get his update check from Wireshark. 208 00:24:37,380 --> 00:24:38,100 Yeah. 209 00:24:38,820 --> 00:24:40,380 So the list is long. 210 00:24:40,380 --> 00:24:43,700 There's ProtonVPN and many clients. 211 00:24:44,640 --> 00:24:55,960 In fact I got 27,000 different user agent strings with Linux, Mac, iPhone, Android, whatever, all platforms. 212 00:24:56,660 --> 00:25:05,780 So now I cannot say which client it is that has the issue and which application that has the issue because it seems to be everything. 213 00:25:12,850 --> 00:25:13,910 Yeah. 214 00:25:13,910 --> 00:25:30,710 So when you're running a proxy server that doesn't return anything and you have clients behind it, some of the clients was not able to download some updated background screen that CrowdStrike provided to Windows machines. 215 00:25:30,870 --> 00:25:36,270 So I have actually protected 226 machines from CrowdStrike. 216 00:25:42,580 --> 00:25:44,820 And what about detection? 217 00:25:44,880 --> 00:25:51,600 The only place I have seen any detection is when clients is behind a Palo Alto setup. 218 00:25:51,720 --> 00:26:03,800 The Palo Alto setup will monitor the URLs the client is asking for and then try to categorize them and check them for malicious things and so on, like many other proxy servers is also doing. 219 00:26:04,080 --> 00:26:08,740 It's the only one I have seen in the traffic that's interacting with the traffic. 220 00:26:09,100 --> 00:26:19,940 And the way it's doing it is replaying the same request that the user tried to do, but adding this user agent string, this long string you see here, that's the complete string. 221 00:26:19,940 --> 00:26:25,900 So it's a pretty long user agent string where it says it's Palo Alto monitoring device and so on. 222 00:26:25,900 --> 00:26:29,720 And it's suggesting I can send a mail to them to get whitelisted. 223 00:26:30,080 --> 00:26:39,480 But again, I'm a proxy server and I'm not the destination so it's pretty many mails I have to send to them to get whitelisted for everything. 224 00:26:39,640 --> 00:26:41,560 So I haven't tried that. 225 00:26:43,020 --> 00:26:51,840 And then Cisco apparently has some kind of in point client you can install on computers. 226 00:26:51,840 --> 00:26:59,480 And it's my understanding it is designed to protect the client from rogue DNS servers and rogue proxy servers. 227 00:27:00,740 --> 00:27:03,520 It's not working so well. 228 00:27:05,220 --> 00:27:24,700 Because what happened is because I'm returning error pages to everything and rejecting all traffic, the client and the client machine, the application seems to get angry and just making brute force against my machine trying to loop and getting the request again and again and again and trying. 229 00:27:24,840 --> 00:27:38,780 So the only way was I had to make a black hole for the domain so I just discarded everything with open DNS.com into a null and didn't reply on it and then the Cisco client stopped DDoSing my server. 230 00:27:40,320 --> 00:27:41,140 Yeah. 231 00:27:42,700 --> 00:27:46,700 So I have also found what I think is malicious. 232 00:27:47,480 --> 00:27:52,760 This is for the domain's engineer, exchange, exposed software and so on. 233 00:27:52,760 --> 00:28:05,120 There's a VPAT script and it seems to be running a proxy for HTTP and FTP traffic with the fail option so if it doesn't work it will go direct. 234 00:28:05,120 --> 00:28:16,940 But it's also collecting data and sending it over an extra channel with some communication so this looks like someone is monitoring traffic for this, for domains here. 235 00:28:20,350 --> 00:28:23,870 And this, this one is a bit weird one. 236 00:28:24,930 --> 00:28:47,330 It's a, I think it's, it's a guy that really, that's, or it's, it's just some testing going on because on VPAT.trade there's a proxy script that's looking with a lot of if statements if there's including some kind of ad word in the request it will send the request through a proxy server. 237 00:28:47,330 --> 00:28:50,290 If there's not a word then it will go direct. 238 00:28:50,290 --> 00:28:54,010 So it seems that someone is trying to collect all the ads. 239 00:28:54,590 --> 00:29:10,570 The reason for this I think can maybe be that he is replacing the ad IDs in the traffic to his own and by this earning money on capturing the traffic and then getting paid for, because he's directing all the clients to his ad ID. 240 00:29:10,570 --> 00:29:11,330 Maybe. 241 00:29:11,330 --> 00:29:13,210 Or it's a test for something. 242 00:29:13,730 --> 00:29:15,630 Or he's just like ads. 243 00:29:16,350 --> 00:29:17,550 I don't know. 244 00:29:20,280 --> 00:29:22,480 So here's another one. 245 00:29:22,480 --> 00:29:24,120 Also a bit weird. 246 00:29:24,120 --> 00:29:35,460 And the name, the CLDs that doesn't MR, cooking, storage, surf, there's no, no continuous line in them. 247 00:29:35,960 --> 00:29:39,940 It claims to be some sort of security project. 248 00:29:39,940 --> 00:29:46,220 I haven't been able to find any place where they are talking about this project and anything. 249 00:29:46,220 --> 00:29:49,440 So it's only a claim inside this configuration file. 250 00:29:49,920 --> 00:29:58,980 It's, it's a bit weird in, it's only sending the traffic to a proxy server for what is not a result of domains. 251 00:29:59,120 --> 00:30:03,420 So all the things that failed, it sends to the proxy server. 252 00:30:03,420 --> 00:30:05,800 Anything else, it goes to direct. 253 00:30:06,220 --> 00:30:10,640 So it's maybe something that tries to look for all the odd things that's hidden on the net. 254 00:30:11,040 --> 00:30:13,060 I don't know what the function is. 255 00:30:16,000 --> 00:30:16,860 Yeah. 256 00:30:17,280 --> 00:30:18,740 So we have a winner. 257 00:30:19,120 --> 00:30:23,520 Apparently press is more interesting than porn. 258 00:30:23,520 --> 00:30:25,400 I wouldn't have guessed otherwise. 259 00:30:25,820 --> 00:30:31,140 But this is the score for the vpat.dat file, how many times it downloaded. 260 00:30:31,260 --> 00:30:35,280 And they have been running at the same server, same time, for the same. 261 00:30:36,980 --> 00:30:47,540 So from the client, from the forms I get with the users, I got 40 users that clicked, that wanted whitelisting from this error. 262 00:30:48,300 --> 00:30:54,420 Even I haven't implemented any function to whitelist anything and just returning errors to them. 263 00:30:54,440 --> 00:30:57,400 And they insert some computer names. 264 00:30:57,560 --> 00:31:01,280 It doesn't look like DNS names, but it's computer names. 265 00:31:01,840 --> 00:31:05,720 So yeah, maybe a day I will add a whitelist function. 266 00:31:07,060 --> 00:31:11,020 And here we have some feedback from the users. 267 00:31:12,160 --> 00:31:14,560 Apparently they are not all happy. 268 00:31:14,860 --> 00:31:25,020 Some users say I got this error message when trying to get to my net bank, or I clicked this link in the mail and got this error, or t-shirt, or whatever. 269 00:31:25,500 --> 00:31:28,040 So not all users are happy. 270 00:31:31,820 --> 00:31:48,660 So when I saw that I was getting feedback from the users, thinking why not set up a survey asking the user how much they like my non-working proxy server that only returned errors to all the clients. 271 00:31:48,660 --> 00:31:54,140 So I added this, three normal steps to ask. 272 00:31:54,560 --> 00:32:03,240 And to my surprise, I have a higher leaning on they really like my service and would recommend it to their friends. 273 00:32:03,380 --> 00:32:06,660 So this is for non-working proxy. 274 00:32:11,490 --> 00:32:14,550 But there was only four responses, so. 275 00:32:15,370 --> 00:32:19,090 Yeah, and there was no one submitting an e-mail address. 276 00:32:19,090 --> 00:32:21,730 So the hundred dollars are going to Danish Cancer Fund. 277 00:32:23,590 --> 00:32:28,690 I added on the web page, I added a feedback form. 278 00:32:28,690 --> 00:32:34,490 Maybe getting some good suggestions and so on to what I can improve on my non-working proxy. 279 00:32:34,710 --> 00:32:44,390 But I only got more than 3,000 spam messages saying that they will ECAO, optimize my website so more will find it. 280 00:32:44,390 --> 00:32:46,650 I don't know if I should sign up for that. 281 00:32:46,650 --> 00:32:48,870 I have many clients already. 282 00:32:49,130 --> 00:32:52,470 And zero feedback from anyone. 283 00:32:54,900 --> 00:33:01,180 So for the period of this one year, I managed it by Google. 284 00:33:01,180 --> 00:33:12,300 If anyone anywhere was writing about this domain I had on my list to see if they were talking about it in some forum, talking about disabling VPAT and so on. 285 00:33:12,440 --> 00:33:18,160 I haven't found anyone for one year talking about anything about the domains. 286 00:33:18,160 --> 00:33:24,420 So it has been, to my knowledge, completely silent for one year without any detection anywhere. 287 00:33:26,640 --> 00:33:33,100 So my question is, why can a dude like me even buy this domain? 288 00:33:33,240 --> 00:33:36,940 Why should this crap that is 25 years old not be just disabled? 289 00:33:36,940 --> 00:33:38,540 Why do we have this? 290 00:33:38,540 --> 00:33:41,800 It's not modern security model. 291 00:33:41,800 --> 00:33:50,300 We just download a pack script with a JavaScript, run it on the client, and then the client just sends all the traffic to a proxy server. 292 00:33:50,300 --> 00:33:51,800 It's not very secure. 293 00:33:52,280 --> 00:34:01,840 So I don't know if I can stand here in 25 years or in a wheelchair talking about the same thing once again, saying that nothing has changed. 294 00:34:02,760 --> 00:34:04,220 I don't know. 295 00:34:05,160 --> 00:34:08,000 But it is this 25 year anniversary. 296 00:34:11,600 --> 00:34:14,500 Yeah, I can see I have still some time. 297 00:34:14,560 --> 00:34:22,340 So first of all, a big shout out to my friend Kel Norman for a lot of help with the research and information. 298 00:34:22,920 --> 00:34:27,040 And I have some bonus slides because I have some extra time. 299 00:34:28,520 --> 00:34:35,160 So I posted this talk on the schedule page on DEF CON. 300 00:34:35,400 --> 00:34:48,020 And shortly after that time, I was contacted by a guy that's called Teton, saying that he was for the last half year basically doing the same research into some other domain names. 301 00:34:48,020 --> 00:34:50,500 And we could look and share some data. 302 00:34:50,500 --> 00:34:52,680 That could be fun if we had the time. 303 00:34:53,220 --> 00:34:58,800 But also he's had paid up for some domains in the .AD. 304 00:34:59,400 --> 00:35:05,040 And from what I've heard, there should be coming a really, really good talk. 305 00:35:05,040 --> 00:35:11,920 I look forward to hear how many active directories that's coming in the same way. 306 00:35:12,500 --> 00:35:14,060 Okay, ten minutes. 307 00:35:15,580 --> 00:35:25,400 So after running this for basically two months, I got contacted in Denmark. 308 00:35:25,400 --> 00:35:29,740 Denmark is not a very big place, about 5, 6 million people. 309 00:35:29,940 --> 00:35:33,240 So the security community is not that big. 310 00:35:33,740 --> 00:35:41,900 I got contacted from someone saying, Thomas, you're running some kind of research project for the VPAT? 311 00:35:41,920 --> 00:35:43,160 Yeah? 312 00:35:43,400 --> 00:35:44,440 Okay. 313 00:35:44,560 --> 00:35:52,500 This big company apparently got a lot of machines trapped in the VPAT.dat file and all the traffic was going to my server. 314 00:35:52,680 --> 00:35:55,660 So they, they just wanted to know. 315 00:35:55,660 --> 00:36:03,280 And the way they found it was because one of the domains I had on my list, it was not fully anonymized. 316 00:36:03,280 --> 00:36:07,180 So they could see the name Thomas and then say, ah, Thomas from Denmark. 317 00:36:07,560 --> 00:36:09,980 We tried to call him. 318 00:36:12,100 --> 00:36:14,100 That's good research. 319 00:36:16,080 --> 00:36:17,120 Yeah. 320 00:36:17,620 --> 00:36:33,220 So if you're looking back on 27,000 different user agent strings on basically all platforms, I would like to present one slide saying, this is Microsoft crap. 321 00:36:33,220 --> 00:36:38,140 Here's the three settings you want to set on a Microsoft machine and you're protected. 322 00:36:38,140 --> 00:36:43,920 But this seems to be all platforms, all applications that has the issue. 323 00:36:44,320 --> 00:36:48,740 Otherwise I wouldn't have got so much traffic as I've seen in my data. 324 00:36:48,840 --> 00:37:02,740 So my best advice is to add into the host file on the machine, the VPAT domains and saying that it looped back to itself so it will never send any traffic to the internet. 325 00:37:03,060 --> 00:37:10,260 And then you have to look up each OS to see which way you can disable the function on there. 326 00:37:10,340 --> 00:37:13,720 And also add the VPAT to your company domain. 327 00:37:13,740 --> 00:37:21,480 So if a client is asking on that domain, it will not resolve other than 127. 328 00:37:22,700 --> 00:37:32,100 A thing also to note here that I skipped over is that when a client download my VPAT configuration config file, it caches the file. 329 00:37:32,300 --> 00:37:40,300 So when people are working from home, they may be on a network where they can download the file in a DK domain. 330 00:37:40,300 --> 00:37:48,100 They download the file, start using the proxy, get into the workplace, keep using the proxy because they are caching the file. 331 00:37:48,260 --> 00:37:51,560 I have told them to use this file for 14 days or something. 332 00:37:51,700 --> 00:37:53,560 So they will keep using it. 333 00:37:54,500 --> 00:37:55,580 Yeah. 334 00:37:55,580 --> 00:38:00,640 And it's best to disable this VPAT function at system level. 335 00:38:00,660 --> 00:38:11,700 Otherwise if you only disable the browser, all the services you have on the machine that are running at system, they are also talking like antivirus application. 336 00:38:11,700 --> 00:38:13,440 They are talking to the internet. 337 00:38:13,440 --> 00:38:16,860 That will not inherit the configuration from the client settings. 338 00:38:17,060 --> 00:38:22,740 So it's best to set it on machine level so it's everything on the machine and disable its function. 339 00:38:23,380 --> 00:38:30,640 And as you can see, there's a Windows service called HTTP Windows Proxy Automatic Discovery Service. 340 00:38:30,900 --> 00:38:32,740 It's on all machines. 341 00:38:32,980 --> 00:38:36,140 No one know what it is, but now you know what it is. 342 00:38:36,280 --> 00:38:41,240 It can be difficult to disable because it has dependency to other things. 343 00:38:42,180 --> 00:38:43,460 Yeah. 344 00:38:44,820 --> 00:38:56,740 So basically read the fucking manual to find out how to disable it on all applications and OSs because it's not easy for me to make one slide to fix it at all. 345 00:38:57,780 --> 00:38:59,060 Yeah. 346 00:38:59,520 --> 00:39:01,500 So this is the slides. 347 00:39:01,760 --> 00:39:03,540 Again, thank you to Kel.