1 00:00:03,220 --> 00:00:09,640 Hello, everyone. I'm very happy to be there. Let's start. This is Defeating VPN Always On. 2 00:00:10,700 --> 00:00:16,520 My name is Maxime Clemence. As you can hear, I'm French. Hopefully, the speech to text 3 00:00:16,520 --> 00:00:23,080 will be able to translate what I can say. Sorry if that's not the case. Yeah, okay. 4 00:00:23,080 --> 00:00:30,660 Okay. I got my first indistinguishable okay. Let's go. I work in Luxembourg. It's a very 5 00:00:30,660 --> 00:00:38,900 small country. I work in the PwC company. Do we have anyone from PwC in the room? Yeah? 6 00:00:39,320 --> 00:00:46,880 Great. Okay. Okay. Let's start. So I will try to show you how Always On can be a bit 7 00:00:46,880 --> 00:00:52,520 off sometimes. So the reason of this talk is that I encountered this kind of control during 8 00:00:52,520 --> 00:00:53,000 some penetration. 9 00:00:53,080 --> 00:01:00,240 I managed to find one bypass, then two bypasses, then three. So I decided to dig further and 10 00:01:00,240 --> 00:01:07,120 to try to better understand how it works when it doesn't really work. We will start with 11 00:01:07,120 --> 00:01:11,840 the high level concepts with the components of Always On. Then we will see the practical 12 00:01:11,840 --> 00:01:18,400 analysis, so what it is made of. We will almost directly identify some naive attacks. 13 00:01:18,540 --> 00:01:22,040 I would say naive because we don't need to understand exactly how it is implemented. 14 00:01:22,620 --> 00:01:29,400 Just based on the documentation, we will find some attacks that might work or not. Those 15 00:01:29,400 --> 00:01:36,380 attacks on the results will raise some questions. Maybe we will need to find, look at behind 16 00:01:36,380 --> 00:01:41,780 the scenes to better understand all these results. We will inspect some of the filters to try 17 00:01:41,780 --> 00:01:47,940 to find new attacks that will allow us to break free from the Always On. And then obviously I 18 00:01:47,940 --> 00:01:52,020 will finish with some recommendations. So who is this tool for? I'm going to start with the 19 00:01:52,040 --> 00:01:58,140 blue team. So definitely red teams or offensive teams. I will try to show some of the attacks 20 00:01:58,140 --> 00:02:05,300 that I found that will allow you to defeat Always On to bypass this controller. For the blue 21 00:02:05,300 --> 00:02:10,880 team, of course, I will try to show what are the main issues that we have in the most popular 22 00:02:10,880 --> 00:02:19,440 VPN agents. Or definitely we will try to improve the situation here. Most importantly, we can find 23 00:02:19,440 --> 00:02:22,020 a lot of ways to actually bypass this controller. So we will try to show what are the main issues 24 00:02:22,040 --> 00:02:26,420 that we have in the most popular VPN always on. I will be focusing on all the techniques that we 25 00:02:26,420 --> 00:02:32,400 can use without privileges, without complex tools, without specific attacks. So I'm really 26 00:02:32,400 --> 00:02:40,220 looking forward to showing some attacks that anyone can replay so that you can use it in your 27 00:02:40,220 --> 00:02:47,160 offensive assignments, for instance. Importantly, on the victim side as well, I want to run some 28 00:02:47,160 --> 00:02:49,100 attacks that might work without privileges. 29 00:02:50,280 --> 00:02:57,100 So the main concept, I guess, that I don't need to explain what the VPN is, but I'm especially 30 00:02:57,100 --> 00:03:05,460 referring to VPN in the corporate context. So if the company, the organization tries to protect 31 00:03:05,460 --> 00:03:12,380 their remote end users, then, of course, they will try to implement a tunnel so that you can get 32 00:03:12,380 --> 00:03:19,080 all the protection from the corporate controls. If you know VPN, then you might be interested in 33 00:03:19,100 --> 00:03:23,060 using it. You might already know the differences between split tunneling, foot tunneling, but today 34 00:03:23,060 --> 00:03:29,800 we are going to focus on always on, which is also called lockdown mode, which is, again, like 35 00:03:30,480 --> 00:03:37,260 full tunneling mode, but then with the user is not even able to disable the control. So it will be 36 00:03:37,260 --> 00:03:45,200 forced to connect to the VPN gateway. Today I selected three editors that we are going to attack 37 00:03:45,200 --> 00:03:49,080 and we are going to review how they are implementing such controls. But first, I would like to 38 00:03:49,100 --> 00:03:54,120 say that basically they are almost all the same. If you look at the documentation of all the 39 00:03:54,120 --> 00:03:58,620 providers, you will see that they are probably going to be vulnerable to the same things. 40 00:04:00,380 --> 00:04:08,660 So this is the typical symptoms of having unforced always on on Windows machine, for instance. 41 00:04:08,980 --> 00:04:18,800 You will see the quite typical general failure, like when you are doing something, it will not say 42 00:04:19,100 --> 00:04:25,060 that the thing is not coming back and that there is no response. Now it will be this weird message, 43 00:04:25,200 --> 00:04:29,980 general failure. So this is kind of a typical symptom that we can have. And obviously, if the tunnel 44 00:04:29,980 --> 00:04:35,880 is not established, like I took for instance, then in that case we have a restricted network access. 45 00:04:36,120 --> 00:04:42,440 We will get some error messages from the browser. And again, since it is enforced, the end user is 46 00:04:42,440 --> 00:04:47,860 not able of, cannot disable this control. So we will get some other error messages. 47 00:04:50,140 --> 00:04:57,080 In the scenarios that we have, obviously, if we are admin, if we can steal all the data by plugging 48 00:04:57,080 --> 00:05:03,180 a USB key, if we can decrypt the drive, all those, we are not, I would say they are not relevant for this 49 00:05:03,180 --> 00:05:08,540 scenario. I'm really speaking about a scenario in which the endpoint is very well hardened. So the 50 00:05:08,540 --> 00:05:14,340 end user doesn't have any admin access. We cannot just plug a USB key and so on and so on. So the 51 00:05:14,340 --> 00:05:19,080 web proxy in the corporate environment is doing TLS intercepting. So everything is going to be 52 00:05:19,100 --> 00:05:27,580 in there to actually prevent any kind of data leak or any kind of C2 bidirectional channel. 53 00:05:28,400 --> 00:05:35,660 But another thing, very important, we know there have been many talks about exfiltration with 54 00:05:35,660 --> 00:05:41,740 sound, electromagnetic noise, pixel QR code and so on. They are great, but we are really 55 00:05:41,740 --> 00:05:48,900 interested in simple things with high throughput. So we want to be able to exfiltrate big data 56 00:05:49,100 --> 00:05:53,500 files, for instance. So we need to find much effective attacks. 57 00:05:54,760 --> 00:06:00,140 The scenarios that we are going to consider, obviously the first one, hacker in the middle, the 58 00:06:00,620 --> 00:06:07,200 hacker does not have access to the target device. So the target device can be a laptop, typically. 59 00:06:07,660 --> 00:06:15,420 And the other scenario that we can consider is if the attacker has access to the device or if it is a 60 00:06:15,420 --> 00:06:19,080 malicious insider, then obviously it will be able to do both things. So we want to be able to 61 00:06:19,100 --> 00:06:24,640 do both commands on the laptops as well as controlling the network. 62 00:06:26,620 --> 00:06:33,980 So enough theory. Let's have a look at some of the components that are needed for always on to work. 63 00:06:34,140 --> 00:06:42,560 The first one is trusted network detection. Of course, the local VPN agent must conclude if it has to 64 00:06:42,560 --> 00:06:48,820 connect to the gateway or not. So for this, the algorithm that are being implemented in the VPN agents 65 00:06:49,100 --> 00:06:56,960 are called trusted network detection. When outside of the trusted network, the VPN agent needs to know 66 00:06:56,960 --> 00:07:02,800 if the gateway is directly accessible or not. Because if you are behind a captive portal, for instance, 67 00:07:03,080 --> 00:07:09,960 you will not be able to reach the VPN gateway and you will be first allowed some specific network access 68 00:07:09,960 --> 00:07:14,600 until you can authenticate on the captive portal, pay what you want or just enter your credentials 69 00:07:14,600 --> 00:07:19,080 until you are authenticated and then you can eventually reach the gateway. 70 00:07:19,100 --> 00:07:28,920 If we look at the implementation of trusted network detection in the three VPN agents that I selected, 71 00:07:29,920 --> 00:07:36,960 it's more or less the same. Let's take, for example, Cisco. To determine if we are on the trusted network, 72 00:07:37,240 --> 00:07:42,680 then it will use, it can use the internal DNS suffix or the internal DNS server IP. 73 00:07:43,200 --> 00:07:48,860 Just to mention a very important point here, Cisco is the only one provider 74 00:07:49,100 --> 00:07:53,160 that is actually proposing an option that is secure enough. 75 00:07:53,460 --> 00:07:58,600 So if you want to determine that you are on the LAN, on the trusted network, 76 00:07:58,820 --> 00:08:02,740 then you can still use the fingerprint of a TLS certificate. 77 00:08:03,140 --> 00:08:06,280 So this, in my opinion, is the only way you can do that properly. 78 00:08:06,580 --> 00:08:12,120 But it's so impractical that, to be honest, I've never seen that implemented correctly in the wild. 79 00:08:12,840 --> 00:08:19,080 For the other ones, you can see that it's also something that are pushed by JSON. 80 00:08:19,100 --> 00:08:22,080 So it's not a chipy offer or IP settings, this kind of things. 81 00:08:22,220 --> 00:08:27,880 I'm already showing the pass and location of these settings on logs 82 00:08:27,880 --> 00:08:33,700 because we will actually find all the values that we need to attack these agents. 83 00:08:34,540 --> 00:08:38,920 Another observation is the files that we have there on the logs. 84 00:08:39,080 --> 00:08:45,000 They are all user readable. So you do not even need admin rights to get these files, 85 00:08:45,180 --> 00:08:47,280 to read them, and to understand what is expected 86 00:08:47,280 --> 00:08:53,060 so that the VPN agent will conclude that it's on the trusted network. 87 00:08:53,680 --> 00:08:56,580 And obviously, most of these checks can be tricked. 88 00:08:57,120 --> 00:09:00,280 And finally, I referred to splitting earlier. 89 00:09:00,580 --> 00:09:04,700 This is also where you will find all the exceptions for the IPs, domains, 90 00:09:05,020 --> 00:09:07,320 that you can connect to directly. 91 00:09:07,580 --> 00:09:11,140 So if you look at these files, you might already find everything you need 92 00:09:11,140 --> 00:09:16,160 to perform your attack if you want to break free from this situation. 93 00:09:17,560 --> 00:09:19,840 Let's move on to the captive portal detection. 94 00:09:20,180 --> 00:09:22,800 So it's a kind of security trade-off for connectivity. 95 00:09:23,680 --> 00:09:28,460 I just explained there what are the main algorithms that are being used 96 00:09:28,460 --> 00:09:33,120 to determine if the laptop, if the system that you are using, 97 00:09:33,220 --> 00:09:35,340 is directly connected to the internet or not. 98 00:09:35,600 --> 00:09:39,640 So Microsoft, Google, Apple, it's quite similar in the way 99 00:09:39,640 --> 00:09:41,940 that they are performing some HTTP requests. 100 00:09:42,120 --> 00:09:47,100 And depending on the response, of course, it will determine that you are directly connected 101 00:09:47,280 --> 00:09:47,500 or not. 102 00:09:47,600 --> 00:09:52,280 And when not, if this check fails, then it is assumed that you are behind 103 00:09:52,280 --> 00:09:52,860 your captive portal. 104 00:09:53,060 --> 00:09:57,020 And this is where you will get the prompt that you need to authenticate 105 00:09:57,020 --> 00:09:59,600 with your web browser before you can get access to the internet. 106 00:10:00,540 --> 00:10:07,100 The VPN agents that I'm going to, I would say, attack today are using a variance 107 00:10:07,100 --> 00:10:10,300 of this or, well, a combination of these checks. 108 00:10:11,520 --> 00:10:13,260 But for Cisco, it's a bit different. 109 00:10:13,380 --> 00:10:16,880 It will use some HTTPS connection before. 110 00:10:17,280 --> 00:10:20,240 But all these tests can be tricked. 111 00:10:21,720 --> 00:10:24,480 So we had a look at trusted network detection. 112 00:10:24,740 --> 00:10:26,440 We had a look at captive portal detection. 113 00:10:26,780 --> 00:10:32,520 Obviously, you know that we can already find some attacks that you can try. 114 00:10:32,880 --> 00:10:39,000 But just a quick reminder, what we are trying to achieve there is to do some data 115 00:10:39,000 --> 00:10:43,180 exfiltration, but with, I would say, important files, very big stuff, 116 00:10:43,880 --> 00:10:46,260 or to establish a command and control 117 00:10:47,280 --> 00:10:48,560 a bidirectional channel. 118 00:10:48,720 --> 00:10:50,240 So this is what we try to achieve there. 119 00:10:50,480 --> 00:10:54,960 And again, with the constraints, we are not admin or we do not even have access 120 00:10:54,960 --> 00:10:55,800 to the laptop itself. 121 00:10:56,140 --> 00:10:58,600 We want simple attacks. 122 00:10:58,780 --> 00:11:04,400 We don't want to use binaries that we would have to compile and to put on the laptop 123 00:11:04,400 --> 00:11:04,960 and so on. 124 00:11:05,240 --> 00:11:07,560 And again, the endpoint is hardened. 125 00:11:10,020 --> 00:11:16,200 So as you understood, the VPN agent still needs DNS to work because this will be the 126 00:11:16,200 --> 00:11:22,500 only way for it to get the IP address of the gateway, the VPN gateway. 127 00:11:22,780 --> 00:11:28,320 So naively, we can think that maybe you can use DNS ourselves in order to establish some 128 00:11:28,320 --> 00:11:28,680 channel. 129 00:11:28,860 --> 00:11:30,040 And indeed, it works. 130 00:11:30,320 --> 00:11:33,140 So indeed, I mentioned some of the tools right here. 131 00:11:33,200 --> 00:11:37,420 But again, we do not need any external tools to do these kind of things. 132 00:11:37,540 --> 00:11:43,620 We can simply use PowerShell, for instance, that is capable of doing DNS on LLMNR. 133 00:11:44,640 --> 00:11:46,180 The conclusion for this. 134 00:11:46,200 --> 00:11:51,100 So this quick and naive attack is that it will work for Cisco and Palo Alto. 135 00:11:51,580 --> 00:11:55,100 The UDP LLMNR will work with Palo Alto only. 136 00:11:55,400 --> 00:11:57,300 And with Eventy, nothing works. 137 00:11:57,520 --> 00:12:02,940 So it's not possible to try to establish a channel or to send some data over DNS with 138 00:12:02,940 --> 00:12:03,400 Eventy. 139 00:12:03,500 --> 00:12:07,900 We already found some discrepancies here that I will try to explain later. 140 00:12:09,040 --> 00:12:15,800 Another example of attack that is highly effective is if you are able to do some Ethernet man-in-the-middle 141 00:12:15,800 --> 00:12:16,180 like this. 142 00:12:16,200 --> 00:12:18,340 Like with SlimShim or these kind of things. 143 00:12:18,600 --> 00:12:24,000 But they only make sense if you are inside the corporate environment and you have access 144 00:12:24,000 --> 00:12:25,520 to network plug. 145 00:12:25,680 --> 00:12:28,460 So let's not discuss about this there. 146 00:12:30,360 --> 00:12:36,120 The third option that we have, based on the design issues of VPN Always On, is that we 147 00:12:36,120 --> 00:12:40,300 can try some other protocols that could be there and that could be useful and that could 148 00:12:40,300 --> 00:12:40,600 work. 149 00:12:40,980 --> 00:12:46,180 Honestly, I wanted this talk to be about some crazy exfiltration protocols. 150 00:12:46,180 --> 00:12:47,700 On the ideas that I have. 151 00:12:47,840 --> 00:12:53,460 But it was so easy to bypass the actual controls that we can already forget about those. 152 00:12:53,640 --> 00:12:59,600 Especially since I do not want to compile or to add some new binaries to the victim 153 00:12:59,600 --> 00:13:00,020 machines. 154 00:13:02,000 --> 00:13:02,560 Okay. 155 00:13:02,620 --> 00:13:03,680 I mentioned DNS. 156 00:13:04,300 --> 00:13:08,120 But we do not really need to comply with the DNS protocol. 157 00:13:08,400 --> 00:13:14,320 We can simply try to use UDP53 as an outbound connection. 158 00:13:14,320 --> 00:13:19,120 To try to send some datagrams. 159 00:13:19,140 --> 00:13:19,420 You know? 160 00:13:20,220 --> 00:13:25,020 It would be much more effective than a DNS channel because then we will have the full 161 00:13:26,080 --> 00:13:28,140 bandwidth that we can try to send. 162 00:13:28,700 --> 00:13:34,440 So I'm just putting there a very naive PowerShell script because we can use the UDP client 163 00:13:35,140 --> 00:13:40,420 PowerShell function that will allow us to send some datagrams over the port that we 164 00:13:40,420 --> 00:13:40,700 like. 165 00:13:40,980 --> 00:13:43,280 And again, some kind of discrepancy there. 166 00:13:43,280 --> 00:13:46,420 So this is not DNS UDP53. 167 00:13:46,700 --> 00:13:48,860 It will work with Cisco on Palo Alto. 168 00:13:49,080 --> 00:13:50,720 But again, not with Eventi. 169 00:13:50,800 --> 00:13:56,080 So you might think that, okay, Eventi managed to implement a much better always on feature. 170 00:13:56,900 --> 00:13:58,500 Wait for the end of this talk. 171 00:13:59,320 --> 00:14:02,860 For some reasons, you might think that, okay, DNS worked. 172 00:14:03,040 --> 00:14:08,460 But we also need DHCP to be working even if we have an always on enabled. 173 00:14:08,700 --> 00:14:11,500 Well, it did not work at all for any of these three. 174 00:14:11,620 --> 00:14:13,260 And we will try to figure out later. 175 00:14:13,280 --> 00:14:21,300 Another thing that I found interesting is a kind of lockdown grace period that can be 176 00:14:21,300 --> 00:14:23,080 observed for Cisco on Eventi. 177 00:14:23,180 --> 00:14:30,700 So as soon as we get the DHCP hack response with an IP in it, then for Cisco on Eventi, 178 00:14:30,780 --> 00:14:35,820 it will take them between four to ten seconds in my experience before the connection is, 179 00:14:35,940 --> 00:14:38,920 I would say, locked again. 180 00:14:40,540 --> 00:14:42,740 Unfortunately, this is long enough. 181 00:14:42,740 --> 00:14:48,680 To get this kind of screenshot that I know you like seeing on your screen, you are completely 182 00:14:48,680 --> 00:14:54,180 able to get the hashes of the user with Responder or any other tool. 183 00:14:54,540 --> 00:15:00,440 So this is well enough either to get this kind of hash or to extract some small files already. 184 00:15:00,580 --> 00:15:03,480 So you have nothing to do just with this grace period. 185 00:15:03,640 --> 00:15:06,060 You can already get some nice results. 186 00:15:06,420 --> 00:15:11,660 But again, another discrepancy with Palo Alto Global Protect, there is no such grace period observed. 187 00:15:11,660 --> 00:15:15,100 So again, something that we will try to answer later. 188 00:15:16,180 --> 00:15:18,400 So I mentioned captive portal detection. 189 00:15:19,000 --> 00:15:22,540 It's kind of obvious what we will try to do there now. 190 00:15:22,880 --> 00:15:28,880 If you remember some of the algorithms that I explained about, okay, how can we determine 191 00:15:28,880 --> 00:15:36,200 if we are behind captive portal or not, well, then it's trivial to spoof these kind of things. 192 00:15:36,360 --> 00:15:41,640 And I'm just suggesting some IP tables that will allow you to make DVPs. 193 00:15:41,660 --> 00:15:44,280 So it will allow the VPN agent to think that you are behind a captive portal. 194 00:15:44,540 --> 00:15:48,940 And it will unlock some connectivity so that you can use that and authenticate. 195 00:15:49,320 --> 00:15:55,180 So for Eventi on Palo Alto, it's just with the TCP 80 port. 196 00:15:55,500 --> 00:16:01,980 For Cisco, it just requires to redirect the 443 as well just because of the algorithm that they use. 197 00:16:02,760 --> 00:16:08,520 But now that we can pretend we are a captive portal, the VPN agent will unlock some connectivity. 198 00:16:08,820 --> 00:16:10,580 And we can then try to steal credentials. 199 00:16:11,660 --> 00:16:16,780 We can try to establish a bidirectional channel to exfiltrate data or to send some commands. 200 00:16:17,340 --> 00:16:18,460 So we can try that. 201 00:16:19,060 --> 00:16:29,200 On the right, I wrote a very, very naive captive portal web server, which will pretend that we have to authenticate to connect. 202 00:16:29,400 --> 00:16:33,820 So thanks to the IP tables rules, we will redirect all the connections to that. 203 00:16:34,080 --> 00:16:39,600 And depending on the type of VPN agent, we will have, I would say, different outcomes. 204 00:16:39,760 --> 00:16:41,640 So for Cisco, by default, it's the same. 205 00:16:41,660 --> 00:16:43,760 By default, it's five minutes of unlocked access. 206 00:16:44,060 --> 00:16:45,860 We must use the embedded browser. 207 00:16:46,100 --> 00:16:53,540 But the embedded browser has all HTTP features that you might need to establish a channel or to exfiltrate some data. 208 00:16:54,580 --> 00:16:58,500 For Pulse Secure or the new name of Pulse Secure is Eventi. 209 00:16:58,880 --> 00:17:02,240 Then it's not even restricted to the captive portal IP. 210 00:17:02,420 --> 00:17:07,620 So you can have access to the full LAN as long as Eventi believes that you are behind a captive portal. 211 00:17:07,820 --> 00:17:10,620 But we are still forced to use the embedded browser. 212 00:17:10,940 --> 00:17:11,640 But we are still forced to use the embedded browser. 213 00:17:11,660 --> 00:17:16,940 For Palo Alto, there is no restrictions on the binary that is authorized to connect on the network. 214 00:17:17,120 --> 00:17:25,700 So as long as you pretend you have a captive portal on the network, you can then use any binary, any program to connect on the network. 215 00:17:26,000 --> 00:17:32,960 I'm just giving an example where we can simply use some HTTP form to upload some files. 216 00:17:33,080 --> 00:17:34,120 And it was very naive. 217 00:17:34,180 --> 00:17:39,340 You can use any other more convenient web server that you want to do some file sharing, 218 00:17:39,340 --> 00:17:41,460 to do your C2 or whatever. 219 00:17:41,640 --> 00:17:43,220 It can work this way. 220 00:17:44,580 --> 00:17:49,920 Now I think it's time to move on to the most interesting attack, I believe, 221 00:17:50,040 --> 00:17:52,360 because it's definitely the most powerful one. 222 00:17:52,460 --> 00:17:55,080 It will completely unlock the network access. 223 00:17:55,320 --> 00:17:59,580 So as I mentioned, the trusted network detection for the vulnerable ones. 224 00:17:59,740 --> 00:18:06,000 Again, I have to insist, Cisco made a night job because they are the only ones to propose something that is secure enough. 225 00:18:06,380 --> 00:18:09,320 But for the other one, it's either IP protection. 226 00:18:09,340 --> 00:18:12,640 So IP values or DNS values that are pushed in DHCP offers. 227 00:18:12,880 --> 00:18:15,320 And for some others, you also have to do some ping. 228 00:18:15,560 --> 00:18:17,840 Again, ping is trivial to spoof. 229 00:18:18,220 --> 00:18:25,240 So if we combine all this information, indeed, not only all these values can be spoofed. 230 00:18:25,240 --> 00:18:26,700 There is no authentication on these values. 231 00:18:27,020 --> 00:18:30,580 But they are also written in clear in the logs or in the configuration. 232 00:18:30,920 --> 00:18:33,500 And they can also leak in the traffic. 233 00:18:33,700 --> 00:18:36,780 So you will be able to see all these values in the traffic. 234 00:18:36,920 --> 00:18:38,340 And if you made some assumptions, 235 00:18:39,340 --> 00:18:44,720 you do not even need to understand everything to actually spoof the trusted network detection. 236 00:18:44,960 --> 00:18:49,660 So we will try to pretend that our rogue network is the actual LAN. 237 00:18:49,820 --> 00:18:52,460 And you will see that it will be happy with it. 238 00:18:52,560 --> 00:18:58,660 So I'll just give you an example with Cisco that has not been configured with the trusted network secure version. 239 00:18:59,280 --> 00:19:01,660 So it's not a TLS certificate there. 240 00:19:01,780 --> 00:19:04,820 But you can see that, okay, it will consider that we are on a trusted network. 241 00:19:05,140 --> 00:19:07,100 While that's not the case, obviously. 242 00:19:07,660 --> 00:19:09,320 And then that the network is secure. 243 00:19:09,340 --> 00:19:10,240 And network access is available. 244 00:19:10,440 --> 00:19:11,680 Yes, this is what we want to do. 245 00:19:11,740 --> 00:19:14,920 Even though the DEFCON bank does not exist at all. 246 00:19:15,040 --> 00:19:19,160 But Cisco will be happy with what we give in our DHCP offers. 247 00:19:20,220 --> 00:19:21,940 So let's try to explore that. 248 00:19:22,140 --> 00:19:23,700 I will give the examples for the three. 249 00:19:23,880 --> 00:19:26,000 You will see that it's more or less the same. 250 00:19:26,540 --> 00:19:33,540 On the left, we have, on the right, sorry, top right, we have an extract of the event connection settings. 251 00:19:33,740 --> 00:19:35,240 So it is located at this pass. 252 00:19:35,460 --> 00:19:36,380 It is user readable. 253 00:19:37,080 --> 00:19:39,320 And you will find the connection policy there. 254 00:19:39,320 --> 00:19:46,400 That is Boolean statement that will combine all the criteria, all the checks that are available. 255 00:19:46,740 --> 00:19:55,760 So if we want to avoid the VPN agent to force the connection, we just have to simply understand the Boolean logic here and try to inverse it. 256 00:19:56,720 --> 00:19:58,620 And we can do it one by one. 257 00:19:58,800 --> 00:20:04,080 So I will be using DNS mask as DHCP server as well as the DNS server. 258 00:20:04,360 --> 00:20:08,760 I will simply say that, okay, let's look at every values. 259 00:20:08,760 --> 00:20:09,880 That is expected there. 260 00:20:09,980 --> 00:20:13,880 And I will propose everything so that Eventi will believe that it's on the network. 261 00:20:14,300 --> 00:20:15,740 So I will use host record. 262 00:20:16,020 --> 00:20:17,840 I will just write what is expected there. 263 00:20:18,080 --> 00:20:21,860 DHCP launch, I will write something that match with what is expected there. 264 00:20:22,060 --> 00:20:27,540 On DHCP option 6 for the DNS server IP, I will just give it what it wants to read. 265 00:20:27,760 --> 00:20:36,540 If I do that, Eventi will consider that the device is connected to the internal network and completely unlock the network access. 266 00:20:36,540 --> 00:20:44,620 So unfortunately for Eventi, they only implement weak or spoofable trusted network detection check. 267 00:20:45,040 --> 00:20:48,640 DNS server, DNS records on interface IP launch. 268 00:20:48,820 --> 00:20:51,460 And you can select and you can create a very big statement. 269 00:20:51,720 --> 00:20:59,240 Since it will only be composed of these spoofable checks, you will always be able to pretend you are the trusted network. 270 00:21:00,200 --> 00:21:02,820 Let's move on to the TND of Cisco. 271 00:21:03,060 --> 00:21:06,520 Again, if it is not configured with this secure trusted network. 272 00:21:06,540 --> 00:21:14,160 It will only use the trusted DNS domain on sometimes the IP address of the internal DNS domain. 273 00:21:14,360 --> 00:21:21,540 These values can be found in the profile in XML file at this location. 274 00:21:21,820 --> 00:21:27,300 And if you do that, it will be enough for Cisco to consider that, okay, this is indeed the trusted network. 275 00:21:27,860 --> 00:21:35,280 And since I like to work in a very convenient and easy way, I can also tell you that if you run this command, that works. 276 00:21:35,280 --> 00:21:40,000 But you can also avoid any conflicts with your already running DNS mask. 277 00:21:40,240 --> 00:21:46,480 And you can use that on the, you know, default hotspot features on any user-friendly Linux distribution. 278 00:21:47,160 --> 00:21:52,960 If you put all these values there in the command line, you put them in the DNS mask shared configuration, 279 00:21:53,300 --> 00:21:58,300 it will peacefully run along your already running DNS mask. 280 00:21:58,640 --> 00:22:03,700 And you will not even need to run any commands actually to spoof the trusted network. 281 00:22:05,300 --> 00:22:08,480 Let's finish with Palo Alto because it's also vulnerable. 282 00:22:08,980 --> 00:22:13,180 This time it will not be in the configuration because good for them. 283 00:22:13,240 --> 00:22:15,700 They decided to encrypt part of the configuration. 284 00:22:15,940 --> 00:22:16,840 That's nice, unfortunately. 285 00:22:17,480 --> 00:22:20,920 The same values are leaking in clear text in the logs. 286 00:22:21,120 --> 00:22:23,300 So you will find everything you need as well. 287 00:22:23,540 --> 00:22:26,120 There you will see the IP on the name of the host. 288 00:22:26,300 --> 00:22:29,840 On little trick, it's not a DNS A record that is expected. 289 00:22:29,980 --> 00:22:31,300 It's a DNS PTR record. 290 00:22:31,560 --> 00:22:34,060 So it will require you to do some effort. 291 00:22:34,060 --> 00:22:36,640 And to write the IP address in the inverse order. 292 00:22:36,800 --> 00:22:41,600 But once you do that, you are completely breaking free from the always-on feature. 293 00:22:41,840 --> 00:22:43,260 And you have access to that. 294 00:22:44,120 --> 00:22:47,980 So just to show you this, how quickly it can be in a short demo. 295 00:22:48,400 --> 00:22:54,240 On the left of the screen you will see the target machine with Cisco VPN agent. 296 00:22:54,540 --> 00:23:01,860 And on the right you will see my own Linux distribution with this DNS mask that is running. 297 00:23:05,120 --> 00:23:05,580 Okay. 298 00:23:05,680 --> 00:23:11,620 So I will first try with giving the nope.local, which is not the expected value. 299 00:23:12,160 --> 00:23:19,440 So we will see that when we do that, I'm trying some pings so that we can see the results almost in real-time. 300 00:23:19,720 --> 00:23:27,380 You will see that we might get some ping response because of the grace period that I explained earlier. 301 00:23:27,600 --> 00:23:29,320 Because Cisco is vulnerable to that. 302 00:23:30,740 --> 00:23:33,340 Now, since it is not the DHCP value. 303 00:23:33,340 --> 00:23:36,100 Since it is not the internal DNS domain. 304 00:23:36,340 --> 00:23:38,920 We will see that Cisco is not happy about that. 305 00:23:39,080 --> 00:23:43,660 And we will definitely try to connect to the VPN gateway. 306 00:23:43,920 --> 00:23:46,200 Which obviously does not exist for this one. 307 00:23:46,600 --> 00:23:51,140 But then I will try with what is expected on what I could see in the configuration file. 308 00:23:52,140 --> 00:23:59,160 I'm restarting my DHCP server with the DNS values that I want to push. 309 00:24:00,100 --> 00:24:03,160 And after a few graphical glitches. 310 00:24:03,340 --> 00:24:07,460 Then we should be able to see that Cisco is happy with that. 311 00:24:09,700 --> 00:24:12,020 So we get the ping replies. 312 00:24:14,860 --> 00:24:17,840 So meaning that the network is now completely unlocked. 313 00:24:18,140 --> 00:24:21,500 And I just want to see the graphical interface. 314 00:24:21,940 --> 00:24:22,380 Thanks. 315 00:24:25,120 --> 00:24:25,660 Yeah. 316 00:24:28,620 --> 00:24:29,800 So it's now happy. 317 00:24:29,840 --> 00:24:31,420 It considers that we are on a trusted network. 318 00:24:31,420 --> 00:24:35,400 On that we have completely unlocked the network access. 319 00:24:35,500 --> 00:24:36,740 And now we can do whatever we want. 320 00:24:38,900 --> 00:24:43,300 So again, we did not need to understand how it is completely implemented. 321 00:24:43,620 --> 00:24:45,940 I did not need to reverse anything to understand all that. 322 00:24:46,080 --> 00:24:47,580 I just had to read the documentation. 323 00:24:47,840 --> 00:24:50,700 And to do some experiments with some assumptions. 324 00:24:51,260 --> 00:24:53,100 But we raised some questions. 325 00:24:53,260 --> 00:24:53,420 Okay. 326 00:24:53,480 --> 00:24:55,940 We have some discrepancies between the VPN agents. 327 00:24:56,220 --> 00:24:58,160 We have some things that did not work. 328 00:24:58,280 --> 00:25:00,580 While we expected such DHCP. 329 00:25:00,580 --> 00:25:03,840 Or other protocols to work. 330 00:25:04,300 --> 00:25:05,540 It was not the case. 331 00:25:05,660 --> 00:25:07,860 So we now need admin privileges. 332 00:25:08,220 --> 00:25:10,640 Just to try to understand how it works. 333 00:25:10,880 --> 00:25:15,940 And try to get new attacks that might be working without privileges. 334 00:25:16,200 --> 00:25:16,360 Okay. 335 00:25:16,880 --> 00:25:19,340 So let's have a look at behind the scene. 336 00:25:20,480 --> 00:25:23,200 Behind the scene is the Windows filtering platform. 337 00:25:23,620 --> 00:25:26,220 I'm not going to explain it at length there. 338 00:25:26,320 --> 00:25:30,340 Because there are other talks that will deep dive in this. 339 00:25:30,580 --> 00:25:35,780 You just have to understand that it is an API that is provided by Microsoft. 340 00:25:35,940 --> 00:25:40,720 So that you can interact with the filtering engine of Windows. 341 00:25:41,080 --> 00:25:45,920 So the main idea is you have a provider that you can define. 342 00:25:46,180 --> 00:25:49,540 So it will be Cisco, Eventi, Palo Alto, for instance. 343 00:25:49,860 --> 00:25:52,800 They will open a session to the Windows engine. 344 00:25:52,920 --> 00:25:54,140 To the Windows kernel, basically. 345 00:25:54,500 --> 00:25:57,440 And then they will define some layers and sublayers. 346 00:25:57,540 --> 00:25:59,500 Which are network definitions. 347 00:25:59,500 --> 00:26:01,500 And then they will add. 348 00:26:02,180 --> 00:26:03,760 They will commit filters. 349 00:26:04,040 --> 00:26:08,520 And the filter will simply be something that you will define as. 350 00:26:08,620 --> 00:26:08,780 Okay. 351 00:26:08,820 --> 00:26:12,260 I want to block this protocol from this IP to this port on everything. 352 00:26:12,420 --> 00:26:13,640 You can define everything you want. 353 00:26:13,880 --> 00:26:17,160 The Windows firewall is actually using this API. 354 00:26:17,340 --> 00:26:20,080 So everything that is network filtering on Windows. 355 00:26:20,180 --> 00:26:23,520 On modern Windows platform is using WFP. 356 00:26:24,060 --> 00:26:28,580 I'm showing there some API functions that we will be using later. 357 00:26:28,920 --> 00:26:29,480 Okay. 358 00:26:29,500 --> 00:26:32,100 So because it's using WFP. 359 00:26:32,400 --> 00:26:33,760 The Windows filtering platform. 360 00:26:34,060 --> 00:26:38,060 We already have some nice tools on even one that is already built in Windows. 361 00:26:38,340 --> 00:26:40,280 It's part of the NetSH command. 362 00:26:40,480 --> 00:26:43,700 You can use NetSH WFP on show filters. 363 00:26:43,880 --> 00:26:48,360 And it will show you all the filters that are currently enabled on the system. 364 00:26:48,720 --> 00:26:51,420 You can see there that since I just run this command. 365 00:26:51,560 --> 00:26:54,940 Again, I have to be admin to execute this command. 366 00:26:55,140 --> 00:26:56,880 I will get as an output. 367 00:26:57,020 --> 00:26:58,440 A nice XML file. 368 00:26:58,440 --> 00:27:01,740 That is quite clear to understand. 369 00:27:02,080 --> 00:27:09,160 And I can see there the filter that is being committed by Eventi to block all the outgoing connections. 370 00:27:09,340 --> 00:27:13,460 So this is kind of an artifact of the always on configuration there. 371 00:27:13,860 --> 00:27:14,860 And you will see that. 372 00:27:14,920 --> 00:27:15,100 Okay. 373 00:27:15,180 --> 00:27:16,380 This is the name of the filter. 374 00:27:16,600 --> 00:27:18,200 This is connected before. 375 00:27:18,380 --> 00:27:22,220 So it will block all the outbound connection on IP before. 376 00:27:22,440 --> 00:27:25,520 And then the main action there is block with no condition. 377 00:27:25,760 --> 00:27:28,420 So this is kind of the most important rule of the protocol. 378 00:27:28,420 --> 00:27:30,640 The VPN always on feature. 379 00:27:30,820 --> 00:27:31,840 It will just block everything. 380 00:27:32,220 --> 00:27:35,720 So we can inspect all these rules with just a simple command. 381 00:27:35,880 --> 00:27:42,260 The other tools that I want to talk about are WFP Explorer from Pavel Yusifovich. 382 00:27:42,460 --> 00:27:49,680 And James Forshaw who made a lot of WFP functions available in his nice NT object manager. 383 00:27:50,160 --> 00:27:55,800 Thanks to these two tools, we will be able to actually impact and change the rules. 384 00:27:55,920 --> 00:27:58,040 Or specifically delete some rules. 385 00:27:58,040 --> 00:28:01,540 So let's have a look at the WFP Explorer. 386 00:28:01,720 --> 00:28:03,520 This is just an attack. 387 00:28:03,620 --> 00:28:04,280 It's not an exploit. 388 00:28:04,460 --> 00:28:11,080 It's just to prove that it's just by deleting the filters that have been committed to the kernel. 389 00:28:11,180 --> 00:28:13,560 To the Windows filtering platform framework. 390 00:28:14,840 --> 00:28:17,280 We will be able to get our connectivity back. 391 00:28:17,480 --> 00:28:23,000 So I will obviously choose to delete this outgoing V4 rule. 392 00:28:27,120 --> 00:28:27,640 Okay. 393 00:28:28,040 --> 00:28:30,220 So in the same situation, the channel is not established. 394 00:28:30,460 --> 00:28:32,780 So I'm in lockdown mode. 395 00:28:32,980 --> 00:28:34,060 I cannot connect to anything. 396 00:28:34,300 --> 00:28:35,300 I will just select the rule. 397 00:28:35,500 --> 00:28:42,940 You can see on the right that as soon as I delete the rule, then the connectivity is back for ping to work. 398 00:28:43,120 --> 00:28:47,940 But again, that was just to demonstrate or to illustrate these filters. 399 00:28:49,120 --> 00:28:55,980 So now that we know what we have to look at, I used and I obviously tried to inspect all the filters. 400 00:28:55,980 --> 00:29:00,060 So that I could maybe find some nice hard-coded values. 401 00:29:00,260 --> 00:29:03,380 Some back doors on some things that could be interesting. 402 00:29:03,900 --> 00:29:06,420 And I've done that with Palo Alto, Eventi. 403 00:29:06,520 --> 00:29:08,860 But for Cisco, it did not work. 404 00:29:09,040 --> 00:29:13,500 I could not see the filters that were implemented by Cisco for some reason. 405 00:29:13,800 --> 00:29:20,460 And it was kind of a big problem for me because I really wanted to see all these filters. 406 00:29:21,640 --> 00:29:25,960 So none of the filters implemented by Cisco would show up in the WFP. 407 00:29:25,960 --> 00:29:28,100 So I could not see the net usage WFP output. 408 00:29:29,980 --> 00:29:41,960 But by enabling the audit policy, you could have a look at all the things that are being made, all the changes that are being made on WFP. 409 00:29:42,120 --> 00:29:50,440 So we can definitely select some event logs that will show the fact that some filters are being committed. 410 00:29:50,620 --> 00:29:53,700 But on Cisco, they will commit filters very frequently. 411 00:29:53,920 --> 00:29:55,320 So it was very hard to follow. 412 00:29:55,960 --> 00:30:02,420 So I wanted to look at all the filters that were being implemented and being pushed to the platform live. 413 00:30:02,680 --> 00:30:07,720 So this is where I wrote some Frida scripts to hook all the codes to the API. 414 00:30:08,540 --> 00:30:11,200 It was quite long because I wanted to decode everything. 415 00:30:12,420 --> 00:30:14,880 Unfortunately, this was not necessary at all. 416 00:30:15,020 --> 00:30:17,200 But anyways, I'm using some codes to do that. 417 00:30:17,840 --> 00:30:19,420 I will show you this example. 418 00:30:19,720 --> 00:30:22,840 So I'm injecting in the VPN agent binary. 419 00:30:23,520 --> 00:30:25,940 What I want to do is simply to hook this. 420 00:30:25,960 --> 00:30:27,880 This is the filter add function. 421 00:30:28,240 --> 00:30:38,040 And based on that, then I will pass all the scripts, follow all the pointers and so on so that I can reconstruct the values that are being there pushed in the filters. 422 00:30:38,280 --> 00:30:41,760 So by the way, Cisco chose a very nice lead grid there. 423 00:30:41,880 --> 00:30:42,280 You can see. 424 00:30:43,040 --> 00:30:48,860 But again, I'm happy now because I can look at my filters directly in life. 425 00:30:49,060 --> 00:30:55,580 But it will not show up if I'm trying to ask the API after that. 426 00:30:55,580 --> 00:31:00,940 I finally get this weird answer that access is denied. 427 00:31:01,860 --> 00:31:04,540 So maybe this is why I could not see all the filters. 428 00:31:04,680 --> 00:31:21,840 And indeed, one subtlety of the WFP framework is that you can define some security descriptor that will block or reduce the access to the filters themselves, to the providers on everything that you can add to the filtering engine. 429 00:31:23,340 --> 00:31:25,560 This security descriptor is a nightmare. 430 00:31:25,560 --> 00:31:29,160 To pass because it's with a lot of variables, some pointers. 431 00:31:29,480 --> 00:31:31,260 It's really hard to do that. 432 00:31:31,760 --> 00:31:40,820 But I got the hint from James for sure himself to actually just dump the first values appointed by the security descriptor pointer. 433 00:31:41,220 --> 00:31:50,500 And then we will try to pass them automatically with his NT object manager and try to format that as a security descriptor. 434 00:31:50,620 --> 00:31:52,820 And then we finally have this answer. 435 00:31:52,820 --> 00:32:02,900 That if you want to look at all the filters that are being committed by Cisco, then you will see that system does not even have a read access to these filters. 436 00:32:03,100 --> 00:32:04,900 It only has write and delete access. 437 00:32:05,220 --> 00:32:11,100 If you want to read these filters, you will need to be local service because only local service has open on read. 438 00:32:11,320 --> 00:32:12,740 So we got our answer there. 439 00:32:13,340 --> 00:32:14,420 But it's not over. 440 00:32:14,560 --> 00:32:20,700 We still need to craft a token that will show that we can be local service. 441 00:32:20,760 --> 00:32:22,520 So again, kudos to James for sure. 442 00:32:22,520 --> 00:32:26,760 He actually gave me the trick on Twitter where we discussed about that. 443 00:32:27,440 --> 00:32:34,620 And we can see there that we just need to define the token with the local service value there. 444 00:32:34,780 --> 00:32:41,520 So you can see that if I'm opening the engine without this token, then I get no results. 445 00:32:41,580 --> 00:32:42,660 Right here, get filter. 446 00:32:43,020 --> 00:32:46,480 For all Cisco filters, then I got no answer. 447 00:32:46,600 --> 00:32:52,500 But if I'm actually using the engine that I used, for which I opened the engine. 448 00:32:52,500 --> 00:32:56,740 In the session with the proper token, then I finally get all the filters. 449 00:32:57,060 --> 00:32:58,780 So that was kind of good news. 450 00:32:58,940 --> 00:33:04,580 Even if I spent several weeks writing something to dump in the function, I just had to do that. 451 00:33:04,740 --> 00:33:06,140 But anyways, I got my answers. 452 00:33:13,320 --> 00:33:21,080 The other way to do that is since we are able to hook the functions, we can also try to change these values. 453 00:33:21,160 --> 00:33:22,480 So another alternative way. 454 00:33:22,500 --> 00:33:29,280 Another alternative to do that is to either hook the function call and set the SID on the DACL to null. 455 00:33:29,380 --> 00:33:33,060 So that everyone, every admin, will get direct access to the filters. 456 00:33:33,280 --> 00:33:38,260 Or eventually you can use your admin access to first become owner of the object. 457 00:33:38,420 --> 00:33:41,460 And then you will be able to change the DACL. 458 00:33:41,560 --> 00:33:44,880 So those are just some POC code that I'm releasing as well. 459 00:33:45,000 --> 00:33:46,700 They are not so complex. 460 00:33:46,840 --> 00:33:48,760 But again, you need to be admin to do that. 461 00:33:50,020 --> 00:33:52,480 So now that we've managed to get the list. 462 00:33:52,500 --> 00:33:53,120 The list of filters. 463 00:33:53,380 --> 00:33:57,140 We can now answer our questions. 464 00:33:57,280 --> 00:33:58,820 If we take them one by one. 465 00:33:59,160 --> 00:34:01,520 DHCP was not usable at all. 466 00:34:01,660 --> 00:34:05,380 Because all the permit filters specify the source port as well. 467 00:34:05,560 --> 00:34:08,420 This is not possible on Windows if you do not have privileges. 468 00:34:08,780 --> 00:34:10,320 So this is why it could not work. 469 00:34:10,940 --> 00:34:14,620 The fact that we cannot use TCP DNS on TCP LMNR. 470 00:34:14,740 --> 00:34:15,980 Well, that's similar. 471 00:34:16,320 --> 00:34:19,460 The permit filters are only defined for UDP protocols. 472 00:34:19,460 --> 00:34:23,460 The fact that we could not use even DNS tunnel with Eventi. 473 00:34:23,620 --> 00:34:29,400 It's because Eventi only permits a system process to be able to use the UDP53. 474 00:34:29,700 --> 00:34:31,760 Because with Windows filtering platform. 475 00:34:32,000 --> 00:34:35,360 You can even define a user, a system, accounts, groups. 476 00:34:35,620 --> 00:34:39,560 And you can define who can access the network based on these values. 477 00:34:39,960 --> 00:34:45,160 And finally for the grace period that is not observable for Global Protect. 478 00:34:45,400 --> 00:34:48,660 It's because Global Protect is using persistent filters. 479 00:34:48,660 --> 00:34:50,300 And not dynamic filters. 480 00:34:50,400 --> 00:34:52,340 So the filters are already there at all time. 481 00:34:52,480 --> 00:34:55,680 And only when it's happy with the connection. 482 00:34:55,780 --> 00:34:57,060 It will decide to remove that. 483 00:35:00,340 --> 00:35:05,540 So unfortunately I could not explain all the attacks that I managed to find. 484 00:35:06,240 --> 00:35:08,200 But if you see this table. 485 00:35:08,400 --> 00:35:09,360 Again, I insist. 486 00:35:09,540 --> 00:35:11,460 It's only unprivileged techniques. 487 00:35:11,780 --> 00:35:16,960 So I really want to be able to do this kind of break free exercise. 488 00:35:17,120 --> 00:35:18,480 Of VPN. 489 00:35:18,660 --> 00:35:19,080 Always on. 490 00:35:19,240 --> 00:35:23,100 But you can see that none of the VPN agents is perfect. 491 00:35:23,300 --> 00:35:27,560 Because they are always vulnerable to at least one of the attacks that I explained there. 492 00:35:27,720 --> 00:35:30,340 I also found some hard coded values. 493 00:35:30,600 --> 00:35:33,280 But you do not even need to do that. 494 00:35:33,440 --> 00:35:37,920 Because they are most of the time vulnerable to the trusted network detection. 495 00:35:38,140 --> 00:35:40,760 Which is in my opinion the most important one. 496 00:35:40,980 --> 00:35:42,240 And the most flexible one. 497 00:35:43,680 --> 00:35:45,160 When it comes to recommendation. 498 00:35:45,400 --> 00:35:47,720 I try to prepare this. 499 00:35:48,760 --> 00:35:49,280 Talk. 500 00:35:49,580 --> 00:35:51,940 With all the ideas that I have. 501 00:35:52,120 --> 00:35:55,420 For detecting all the attacks that I could imagine. 502 00:35:55,580 --> 00:35:56,760 Or that I demonstrated. 503 00:35:57,220 --> 00:35:58,800 But it's not practical at all. 504 00:35:58,880 --> 00:36:00,340 You have to do some correlation. 505 00:36:01,480 --> 00:36:05,380 ETW will not give you all the nice answers that you are looking for. 506 00:36:05,560 --> 00:36:07,940 So you will have to do a lot of things. 507 00:36:08,080 --> 00:36:10,940 So let's not waste our time on detection opportunities there. 508 00:36:11,160 --> 00:36:13,720 And let's directly move on to the prevention part. 509 00:36:16,340 --> 00:36:20,440 The security agency in France wrote a very nice report. 510 00:36:20,700 --> 00:36:22,460 Which is full of guidelines. 511 00:36:22,960 --> 00:36:24,300 And they are a bit extreme. 512 00:36:24,560 --> 00:36:26,140 But I think that I agree with them. 513 00:36:26,440 --> 00:36:29,640 If you want to circumvent the captive portal problem. 514 00:36:29,900 --> 00:36:32,380 Then do not connect to a captive portal. 515 00:36:32,660 --> 00:36:36,300 And always connect your laptop through a smartphone access point. 516 00:36:36,400 --> 00:36:36,780 For instance. 517 00:36:37,020 --> 00:36:38,920 So you would use 3, 4, 5G. 518 00:36:38,980 --> 00:36:43,100 Just to avoid being connected to any Wi-Fi network that you do not trust. 519 00:36:43,720 --> 00:36:46,420 The other way to do that. 520 00:36:46,520 --> 00:36:48,700 I think they are right. 521 00:36:49,040 --> 00:36:50,420 You can use your smartphone. 522 00:36:50,640 --> 00:36:52,300 That will connect to the captive portal. 523 00:36:52,640 --> 00:36:55,540 And then your laptop will connect through the smartphone. 524 00:36:55,800 --> 00:36:58,880 I think that works quite well on Android devices. 525 00:36:59,080 --> 00:37:00,620 I am not sure for iOS. 526 00:37:02,340 --> 00:37:04,220 When it comes to the trusted network detection. 527 00:37:04,580 --> 00:37:06,740 They concluded well before me. 528 00:37:06,780 --> 00:37:09,220 That most of the mechanisms are not secure. 529 00:37:09,740 --> 00:37:11,260 Except the one from Cisco. 530 00:37:11,360 --> 00:37:13,160 That is relying on the certificate hash. 531 00:37:13,720 --> 00:37:15,500 And the other idea they have. 532 00:37:15,660 --> 00:37:16,580 I think it is promising. 533 00:37:16,960 --> 00:37:18,140 But not so convenient. 534 00:37:18,420 --> 00:37:21,700 Is to deploy an internal VPN gateway as well. 535 00:37:21,980 --> 00:37:22,800 In that case. 536 00:37:22,880 --> 00:37:26,780 There will never be any notion of trusted network. 537 00:37:27,080 --> 00:37:29,580 It will either be connected to the internal gateway. 538 00:37:29,820 --> 00:37:31,160 Or the external gateway. 539 00:37:31,620 --> 00:37:32,380 So it is a bit extreme. 540 00:37:32,700 --> 00:37:33,820 But it works. 541 00:37:34,460 --> 00:37:37,140 And from the recommendation from this research. 542 00:37:37,420 --> 00:37:40,720 I would say that from a configuration point of view. 543 00:37:40,760 --> 00:37:41,580 For the blue team there. 544 00:37:41,800 --> 00:37:43,580 You will need to check the access rights. 545 00:37:43,580 --> 00:37:45,040 You might want to change them. 546 00:37:45,140 --> 00:37:49,160 Because simple users have access to settings on logs. 547 00:37:49,300 --> 00:37:54,020 And you might also consider looking at your TND on CPD settings. 548 00:37:55,520 --> 00:37:57,300 For the implementation issues. 549 00:37:57,720 --> 00:37:58,280 Well. 550 00:37:58,420 --> 00:38:03,380 Now that you get to know the various weaknesses of VPN agents. 551 00:38:03,540 --> 00:38:05,740 Depending on your own provider. 552 00:38:05,980 --> 00:38:10,180 You might consider changing a bit how you are configuring them. 553 00:38:10,460 --> 00:38:13,460 And eventually you can consider deploying your own. 554 00:38:13,580 --> 00:38:14,320 WFP filter. 555 00:38:14,540 --> 00:38:18,120 But then you will need to know the API provided by Microsoft. 556 00:38:18,420 --> 00:38:19,280 It is well documented. 557 00:38:19,740 --> 00:38:21,140 But it is not so convenient. 558 00:38:21,380 --> 00:38:22,440 So good luck with that. 559 00:38:25,560 --> 00:38:26,480 Key takeaways. 560 00:38:27,580 --> 00:38:28,620 Again as I said. 561 00:38:28,720 --> 00:38:30,360 Always on can be a bit off sometimes. 562 00:38:31,260 --> 00:38:35,760 Definitely VPN agents are not securing the always on feature in the same way. 563 00:38:36,020 --> 00:38:37,500 None of them is perfect. 564 00:38:37,760 --> 00:38:38,920 So you have to keep that in mind. 565 00:38:39,600 --> 00:38:40,880 Naive attacks work. 566 00:38:41,180 --> 00:38:42,440 You do not need privileges. 567 00:38:42,760 --> 00:38:43,400 You do not. 568 00:38:43,580 --> 00:38:46,940 You always need to have access to the laptop that you are attacking. 569 00:38:47,220 --> 00:38:49,280 On all the information that you need. 570 00:38:49,500 --> 00:38:52,000 For instance to do the trusted network spoofing. 571 00:38:52,260 --> 00:38:57,560 Are found in files that are accessible to the low privilege user. 572 00:38:57,780 --> 00:38:59,620 Even sometimes on the packets themselves. 573 00:38:59,780 --> 00:39:02,700 If you are able to do some man in the middle. 574 00:39:02,800 --> 00:39:05,260 Or just to look at what is happening on the wire. 575 00:39:06,340 --> 00:39:10,260 TND spoofing again from my point of view is the most convenient on generic technique. 576 00:39:11,120 --> 00:39:12,360 And for the rest. 577 00:39:12,360 --> 00:39:15,800 Most of the answers can be found in the documentation itself. 578 00:39:16,020 --> 00:39:18,640 As well as in open source tools. 579 00:39:18,940 --> 00:39:20,060 That are well made. 580 00:39:20,160 --> 00:39:22,160 And that will give you all the answers that you need. 581 00:39:22,280 --> 00:39:31,560 Provided that you are able to look at the trap that I fall into with the Cisco settings. 582 00:39:32,440 --> 00:39:33,300 And finally. 583 00:39:33,400 --> 00:39:35,460 IT admins have to consider configuration mistakes. 584 00:39:35,740 --> 00:39:39,540 Because even if we have weaknesses in the VPN agents themselves. 585 00:39:39,540 --> 00:39:42,120 We also found in many occurrences. 586 00:39:42,580 --> 00:39:47,620 The fact that the IT admins change the settings. 587 00:39:47,680 --> 00:39:52,000 So the end user would also be able to change the profiles on the settings themselves. 588 00:39:52,140 --> 00:39:53,880 So it's not demonstrated there. 589 00:39:54,000 --> 00:39:56,320 But it is also something to consider. 590 00:39:58,260 --> 00:40:00,360 Thank you very much for your attention.