1 00:00:08,680 --> 00:00:10,000 Hello everyone. 2 00:00:10,120 --> 00:00:21,860 Today I'm going to be talking about Windows Kernel and how it's, from a security research perspective, how it changed in the past years and how we need to adapt. 3 00:00:22,900 --> 00:00:32,160 And so it will be mainly in the view of memory corruptions, not because I think that's most important, but just because I like them, as I like the Kernel and the risers. 4 00:00:33,820 --> 00:00:37,800 So, at first, we can start with a small introduction of who I am. 5 00:00:37,900 --> 00:00:39,880 I'm Peter Zierman. 6 00:00:39,880 --> 00:00:43,320 I'm working currently for KeyLab at Ensys. 7 00:00:43,320 --> 00:00:57,820 I'm a former team employee, a team member, and I was also ranked in MSS since 108 several times and also on 1.1 with my team, with our team several times, and this is my focus. 8 00:00:57,820 --> 00:00:59,540 It's on Windows Kernel. 9 00:00:59,760 --> 00:01:05,660 The risers, basically, are not too much about machine learning. 10 00:01:05,660 --> 00:01:15,400 It's understanding how it works, every kind of internals, but mainly about fuzzing and the machine learning to understand how to fuzz it in a good way. 11 00:01:16,220 --> 00:01:22,580 And also I like to apply the mitigations, understand them, correct them, and hopefully improve them. 12 00:01:22,580 --> 00:01:30,660 And also sometimes you can see me talking somewhere, for example, at home, or during the night, or somewhere else. 13 00:01:31,000 --> 00:01:40,760 And because I'm Chinese, I also like Wushu, but I don't particularly like it. 14 00:01:41,800 --> 00:01:57,860 So when it comes to security research and you ask somebody, some security researcher, to get code execution targets, first what comes to his mind is what is sandbox. 15 00:01:59,160 --> 00:02:06,180 It's basically some set of policies which tell you what you can and what you cannot do. 16 00:02:06,180 --> 00:02:14,240 For example, when you want to attack some target and get code execution into it, first you need to find a vulnerability. 17 00:02:14,240 --> 00:02:17,900 For this one, it's essential how easy it is to attack your place. 18 00:02:17,900 --> 00:02:28,200 But when your sandbox policies tell you that you are not allowed to call a lot of functionality, that means it's bad news for you. 19 00:02:28,200 --> 00:02:34,280 Because you have harder times to find a vulnerability because you don't have so many options. 20 00:02:34,280 --> 00:02:41,020 And on the other hand, even if you find a vulnerability, you may not be able to exploit it. 21 00:02:41,020 --> 00:02:54,620 Because exploitation and finding vulnerabilities, maybe you need to have two different resources, which overlap, but it can happen that you find a vulnerability but you cannot exploit it. 22 00:02:54,620 --> 00:03:11,400 And except for syscalls, I mean, also intactly depending on sys, everything about syscalls, but explicitly disabling some syscalls, it's very important to restrict those access to file system or registry. 23 00:03:11,420 --> 00:03:22,760 Because registry is basically configuration of your computer, and when you are able to configure someone else's computer to register you, and the same applies for file access. 24 00:03:22,760 --> 00:03:31,340 Basically, because when you are able to read and write any file on the user system, you won't anyway, because that's what you really want to do. 25 00:03:31,860 --> 00:03:41,700 And another thing is that it's really important to also restrict how some processes can communicate with some other processes. 26 00:03:41,800 --> 00:03:42,480 Why? 27 00:03:42,480 --> 00:03:44,660 And that's exactly because of sandbox. 28 00:03:44,660 --> 00:03:50,080 Because sandbox policies can restrict you to something, and it can be really restrictive in your targets. 29 00:03:50,200 --> 00:04:03,680 But when you can access different processes, then you may be able to escape and get code execution to the process, and that process has a less restricted sandbox. 30 00:04:03,760 --> 00:04:09,940 And you can access more on the surface and use more options how to call the system. 31 00:04:10,920 --> 00:04:16,100 And as I just mentioned, there are different kinds of sandboxes and different input levels. 32 00:04:18,800 --> 00:04:21,240 Less restrictive means more problems for you. 33 00:04:22,160 --> 00:04:31,220 But still, even when you have a sandbox, it can look like, okay, it can be... I mean, it's tougher, definitely, but it's not game over. 34 00:04:31,220 --> 00:04:39,160 Because still, for example, somebody develops an application, you want the targets. 35 00:04:39,160 --> 00:04:43,600 But that application essentially needs to interact with the system. 36 00:04:43,740 --> 00:04:48,440 For example, it may need to store some files on the disk. 37 00:04:48,840 --> 00:05:01,360 But this is dangerous, because even if sandbox allows you to store some files in some new directory just for you, there are some other entities, some other processes, which can scan this file. 38 00:05:01,720 --> 00:05:06,040 And as well, in this scanning process, there can be some vulnerabilities. 39 00:05:06,040 --> 00:05:12,780 And you can end up dropping files, and by that file you are dropping a different process, which is usually less restricted. 40 00:05:13,880 --> 00:05:18,040 And another thing, as I mentioned, is inter-process communication. 41 00:05:19,760 --> 00:05:21,780 Processes need to communicate. 42 00:05:21,780 --> 00:05:28,660 And especially with an application, it can be said, okay, I want to apply sandbox policies to this application. 43 00:05:28,900 --> 00:05:40,540 Because I know that, for example, some parts can just compute something, other parts may just pop up some nice windows and graphics, and some other parts doing some network communication. 44 00:05:40,660 --> 00:05:47,120 So for every part, I can have different sandboxes, and these can be different policies applied to different parts. 45 00:05:47,120 --> 00:05:53,560 Some of them can have restricted access to some parts, and some of them will be restricted to other parts. 46 00:05:53,640 --> 00:05:58,880 But at the end, all of them cooperate to achieve the same goal of the application. 47 00:05:58,880 --> 00:06:00,940 So they need somehow to communicate. 48 00:06:01,360 --> 00:06:06,460 And you can most likely also attack this infrastructure. 49 00:06:06,700 --> 00:06:25,940 That means when in your application, you communicate with other components, different processes in your application, but, for example, when in one application you cannot access, for example, certain syscalls, you may extend to the second process, which may be semi-technical at all, 50 00:06:25,940 --> 00:06:29,860 but there are some different restrictions, and it does have some limitations. 51 00:06:30,200 --> 00:06:33,980 It's a better background for you to start building exploits. 52 00:06:35,320 --> 00:06:45,000 And I said that Windows Kernel syscalls, but when you access any resource on machines, everything is about syscalls. 53 00:06:47,440 --> 00:06:55,860 So when it comes to Windows Kernel, I'm focusing on Windows Kernel, not because I think it's most important, but because I like it. 54 00:06:56,120 --> 00:07:08,080 And in the past, in fact, it was probably one of the most important parts, because all these sandbox policies not all, but a lot of crucial ones are decided in the kernel. 55 00:07:08,080 --> 00:07:14,740 So once you get some read-write in the kernel, with some control over the kernel, you can change the policy. 56 00:07:16,000 --> 00:07:17,740 And it's pretty neat. 57 00:07:18,420 --> 00:07:33,980 So when it comes to finding vulnerabilities and exploitation in kernel, then usually by sandboxes, for example, like C++, there are a few different categories of Windows Kernel, where you want to look for. 58 00:07:33,980 --> 00:07:35,420 It's top priority. 59 00:07:35,640 --> 00:07:36,600 I would suggest Swing. 60 00:07:36,600 --> 00:07:39,420 It's OK, because it's really huge. 61 00:07:39,440 --> 00:07:46,240 It's really old code, and I mean, they have more than 1,000 syscalls. 62 00:07:46,360 --> 00:07:49,520 It's a lot of things that are going to happen wrong. 63 00:07:50,280 --> 00:07:55,960 But recently they are going to refactor it, and we'll change the way we're talking later on. 64 00:07:56,220 --> 00:07:59,060 But the other thing, another part is ntusk kernel. 65 00:07:59,060 --> 00:08:11,580 It's also big, but on the other side, when you look at the CVs published by Microsoft, you cannot see too much, at least for memory corruption, too much memory corruption related to this part. 66 00:08:11,660 --> 00:08:12,480 And why? 67 00:08:12,480 --> 00:08:14,400 It's also really big. 68 00:08:14,400 --> 00:08:16,380 It's hundreds of syscalls. 69 00:08:16,380 --> 00:08:35,700 But the reason is that in this component, it's heavily used access-privileged checks and tokens, and it's restricted to not only what kind of syscall you can access, but what you can do. 70 00:08:35,700 --> 00:08:42,540 And it's checking, OK, you are not allowed to access this resource, so it just denies it. 71 00:08:42,540 --> 00:08:57,800 And the other thing is that logic that you can alter from via syscalls for these components, it's not so heavy for the work that they need to do, it's not so complicated. 72 00:08:57,800 --> 00:09:02,860 You can alter, for example, allocating memory, you free memory, you protect memory. 73 00:09:02,860 --> 00:09:06,600 Yeah, it's complex, but what you can alter, it's not so much. 74 00:09:06,600 --> 00:09:12,320 And also some lock or unlock mechanics, not so heavy logic you can play with. 75 00:09:13,320 --> 00:09:15,600 At least not for memory protection. 76 00:09:15,600 --> 00:09:18,940 You can find this, but it's hard, at least for int2k. 77 00:09:19,940 --> 00:09:39,680 But today it's not only about core components like MQS kernel or graphics subsystem, but there are a lot of different drivers, the windows kernel, but fortunately or unfortunately, it depends how you look at it, for our sandbox, usually you don't have access to it, 78 00:09:39,680 --> 00:09:41,320 at least most of the parts. 79 00:09:41,380 --> 00:09:45,840 But still, there are some interesting drivers which you can access. 80 00:09:46,440 --> 00:09:55,380 And when you're doing security research, you should be able to look further and to be more creative to find your different targets. 81 00:09:55,380 --> 00:10:05,660 Because when you find some links, some way how to attack some new attack surface, it's not like a jackpot for you, because it's probably not so well researched, it's not so well protected. 82 00:10:07,980 --> 00:10:14,320 So, taking interconnection with int2k, as I said, it's a really huge codebase and it's really old. 83 00:10:14,780 --> 00:10:33,840 So, at least for example, 4 years ago, when I started with exploitation, multi-networking, and hinting, I was really disappointed when I got my hands on int2k, because I got from my colleague a PDF bug, and OK, make exploitation. 84 00:10:33,840 --> 00:10:42,380 So I spent, I think, maybe one or two weeks just for understanding of how PDF works and basically analyzing the root cause of the bug. 85 00:10:42,660 --> 00:10:48,460 But then I get somehow, OK, I can inspect it once, so I can do some memory write or something. 86 00:10:48,540 --> 00:10:53,400 Then it takes me only, for example, two days to finish full exploit with code execution. 87 00:10:53,400 --> 00:10:59,560 And it was pretty much disappointing, because it was not my challenge. 88 00:11:00,320 --> 00:11:04,680 But it's changing, and it's very good. 89 00:11:05,020 --> 00:11:10,440 I mean, from my perspective, because I enjoy it more, and from security perspective, because it's becoming harder. 90 00:11:11,140 --> 00:11:18,840 And some changes that was introduced was that because, for example, 4 years ago, as I mentioned, I was working on TTF exploitation. 91 00:11:19,080 --> 00:11:23,500 But for now, TTF bugs, it's not so prominent now. 92 00:11:23,500 --> 00:11:33,760 Because they put it from the kernel mode, from custom foams to user modes, they get into some fairly restricted sandbox. 93 00:11:33,820 --> 00:11:52,120 So it means even if you can somehow find the vulnerabilities, for example, system foams, where you can't load your custom, if you can't load your custom foams, and you try to exploit, even if you exploit successfully, you end up in fairly restricted environments, 94 00:11:52,120 --> 00:11:55,780 most likely more restricted than you begin with. 95 00:11:56,000 --> 00:11:58,240 And that's the problem of 4 years exploiting. 96 00:11:59,200 --> 00:12:02,760 And also then, there is still Mint2K. 97 00:12:03,300 --> 00:12:07,940 For example, I mostly have Mint2K for several of my parts. 98 00:12:07,980 --> 00:12:10,860 A few of them are user parts and GTF parts. 99 00:12:10,920 --> 00:12:17,460 GTF part is responsible for driving a lot of some pretty nice things on screen. 100 00:12:17,940 --> 00:12:21,020 And the magic of this part is that you have a lot of objects. 101 00:12:21,020 --> 00:12:27,520 You have Bitmap, you have PC, you have Region, you have Palette, you have a lot of different objects. 102 00:12:27,840 --> 00:12:31,780 And the joy of this is that you can actually interact with each other. 103 00:12:31,780 --> 00:12:33,980 And the interaction is a problem. 104 00:12:34,060 --> 00:12:48,480 Because even if there will be no such complex code behind, it's still, when you say OK, for some object, OK, do this thing, but it incorporates this second object, it introduces a lot of problems. 105 00:12:48,480 --> 00:12:51,360 Because it needs, it has some connection. 106 00:12:51,360 --> 00:12:53,820 It can have some reference counting to each other. 107 00:12:53,820 --> 00:12:57,340 It can have some members dependent on the other members. 108 00:12:57,340 --> 00:12:59,460 And it can cause different problems. 109 00:12:59,460 --> 00:13:02,780 Like user-to-preset confusions, even overflows. 110 00:13:03,120 --> 00:13:10,220 But fortunately, Microsoft started to link this one some years ago. 111 00:13:10,220 --> 00:13:13,060 And they introduced, they started refactoring the code. 112 00:13:13,060 --> 00:13:21,860 And it's adding some filter sets, which basically tell you, OK, you cannot access these Ciscos, but you can access most of the Ciscos. 113 00:13:21,860 --> 00:13:24,100 Depends how you set your filter. 114 00:13:24,580 --> 00:13:28,980 But it's even better, you can even prohibit all of the big 2K Ciscos. 115 00:13:28,980 --> 00:13:30,240 That's pretty nice. 116 00:13:30,240 --> 00:13:35,100 But at the end, when the application is basically working, interactive user, you need it. 117 00:13:35,100 --> 00:13:37,960 So at some point your application, some process, will have access. 118 00:13:37,960 --> 00:13:41,620 But this filter set is meant for this one. 119 00:13:41,620 --> 00:13:46,440 And it's access only to the necessary functionality of this 3G 2K. 120 00:13:48,180 --> 00:13:50,240 And of course, there's the user part. 121 00:13:50,240 --> 00:13:53,080 And the user part is a huge thing. 122 00:13:53,080 --> 00:14:03,420 Actually, it was about 10 years ago, 15 years ago, there were some nice researches about using more callbacks. 123 00:14:03,460 --> 00:14:07,340 Basically, you decide, OK, I will call to Kernel. 124 00:14:07,340 --> 00:14:11,060 But Kernel will decide, OK, no, no, no, I need some more information. 125 00:14:11,060 --> 00:14:14,880 So what it will do, it will just stop and call back to user modes. 126 00:14:14,940 --> 00:14:17,800 But without exiting actual Cisco. 127 00:14:17,800 --> 00:14:32,720 And this is actually a big problem, because it's basically your state is pending, and you can involve some other threads to do something with the states of the country that this object is behind. 128 00:14:34,060 --> 00:14:36,000 It's hard to mitigate. 129 00:14:36,000 --> 00:14:39,040 But, as I said, with filter sets, it's harder to... 130 00:14:40,140 --> 00:14:42,800 It should be harder, to be true. 131 00:14:42,800 --> 00:14:47,140 But unfortunately, filter set allows all of this, user mode callbacks. 132 00:14:47,340 --> 00:14:49,000 And this is still a big issue. 133 00:14:52,140 --> 00:14:56,440 So, as I said, they're starting with filtering Cisco's. 134 00:14:56,440 --> 00:14:57,920 And it's the shortest request. 135 00:14:57,920 --> 00:15:05,820 I think this is the most efficient way how to protect some crucial parts of anything. 136 00:15:06,480 --> 00:15:14,440 And then, they don't stop here, but they go further for, OK, user vulnerability. 137 00:15:14,480 --> 00:15:15,760 That's the techniques. 138 00:15:15,760 --> 00:15:18,440 But now, can you somehow use this vulnerability? 139 00:15:18,600 --> 00:15:22,660 And that's, for example, this tag installation I will tell you about later. 140 00:15:22,660 --> 00:15:33,120 And as well, for target no mitigations, basically telling you, OK, you're using your vulnerability, you managed to somehow work with it, but can you actually use it for something meaningful? 141 00:15:33,120 --> 00:15:37,220 Like, read the rights to your targets, to get them. 142 00:15:38,040 --> 00:15:41,300 And also, the other thing is that excessive mitigations. 143 00:15:42,220 --> 00:15:53,160 Since Microsoft started to pay attention to this one, and they introduced a lot of programs like MS-DACI, Tobana, JIT, they need to decide their bounties. 144 00:15:53,580 --> 00:15:59,360 And all of this somehow encouraged researchers to publish, to report the more bugs. 145 00:15:59,360 --> 00:16:01,020 And you can see on the... 146 00:16:01,460 --> 00:16:13,500 For example, when I was fuzzing, when I was fuzzing the Mint 2.0 game, before, I found some bugs, some shallow bugs, but it can survive. 147 00:16:13,500 --> 00:16:15,520 One year, no problem. 148 00:16:16,280 --> 00:16:22,280 I don't make POC because I want to do more work, for example, on fuzzer itself. 149 00:16:22,540 --> 00:16:29,040 And I can come back to the bug, I think, one year later, and then I can make POC and make it useful, for example, on different competitions. 150 00:16:29,040 --> 00:16:41,420 But last year, I said, I still work on improving fuzzer, but then I see, OK, I have some bunch of bugs, but three months later, it was fixed. 151 00:16:41,420 --> 00:16:47,020 It was OK for some other bugs instead, but those bugs were fixed already. 152 00:16:47,020 --> 00:16:48,340 And it was really unexpected. 153 00:16:48,480 --> 00:16:58,000 So it seems that this is helping that security researchers are reporting bugs, and that they should probably do some internal fuzzing, which is really good for security. 154 00:16:58,960 --> 00:17:03,900 But on the other side, still, if it's OK, it's still alive. 155 00:17:04,080 --> 00:17:04,540 Why? 156 00:17:04,540 --> 00:17:15,260 It's because even when you have a more explicit filter set, still, you can access a lot of DirectX syscalls. 157 00:17:15,620 --> 00:17:27,180 And DirectX is pretty much a huge part, and still, it's, for example, the main component, which handles Microsoft itself. 158 00:17:27,180 --> 00:17:37,540 It's not so heavy logic, because it's only some allocations behind, but still, it's about four or five different objects, and you can interact, so you can find the bugs there. 159 00:17:37,840 --> 00:17:42,640 It's not promising as a user-oriented API, but still, good address interface. 160 00:17:42,920 --> 00:17:54,580 And in addition, when you're able to reach some bugs, which is not coded by Microsoft, but third-party vendors, like graphic vendors, they usually do some data parsing in Kernel, and this is probably the best. 161 00:17:55,800 --> 00:18:06,320 And as I mentioned, user-mode callbacks, still there, even with big filter sets, so this is also a problem, but probably they will somehow change it, maybe. 162 00:18:06,320 --> 00:18:06,720 Let's see. 163 00:18:06,720 --> 00:18:10,880 For now, it can be good source of bugs, and we'll care for it. 164 00:18:12,100 --> 00:18:20,800 And still, yes, it's still a smart part of GDR, but it's early, less and less, that you can attack, which is good. 165 00:18:21,820 --> 00:18:41,280 But still, even when you have applied, for example, all of these filter sets and lockdowns on IP2K, still it's possible that you can, as I said, your IPP can have more processes connected to each other, and some of them can have less restrictions on this IP2K. 166 00:18:41,280 --> 00:18:48,880 And so it's just a matter of getting it to get to those different processes, which you can use to call more systems. 167 00:18:49,640 --> 00:18:50,920 It's possible. 168 00:18:52,080 --> 00:18:55,800 So, coming to the next part, it's about the end-use kernel. 169 00:18:56,240 --> 00:19:00,840 This end-use kernel is also big, but it's harder to find a buyer for that. 170 00:19:00,840 --> 00:19:01,560 Why? 171 00:19:01,980 --> 00:19:24,400 The reason why is that, because this core component, as I heard from Max's guys, they put a lot of effort to review the code, it's a long time, and that's STL, and they take pretty much care that the things that you can use that you can access from low privilege level, 172 00:19:24,400 --> 00:19:25,960 it's well-reviewed. 173 00:19:26,460 --> 00:19:41,140 And that's for attacker, it's really bad, because, I mean, when you have logic like a lock, unlock, allocate, it's free of using the pipe or using the LPC, and it's really without defense. 174 00:19:42,220 --> 00:19:45,260 You can have a hard time to find that bug. 175 00:19:45,420 --> 00:19:54,480 And even, for example, LPC, LPC is quite big, and it's good features and documenting, so you can hope that you can find more bugs there. 176 00:19:54,480 --> 00:20:07,000 I think you can find bugs there, but, for example, when Windows exploits some bugs using LPC mechanism, I can see from the code that it's really written with some security perspective in mind. 177 00:20:07,000 --> 00:20:09,940 There's a lot of security checks that I didn't expect. 178 00:20:10,160 --> 00:20:11,880 And it's pretty nice to see. 179 00:20:12,660 --> 00:20:26,520 And also, when you look at NQS, sometimes you might lack luck, like we had before, one or two years ago, when we discovered some new attacker interface, well, new for community, because not too many people know about it, this one. 180 00:20:26,680 --> 00:20:36,960 And it was TN driver and CLT driver, which, for them, basically, you can access some goods that are passing by in kernel with low privileges. 181 00:20:37,320 --> 00:20:42,880 But that's almost gone for CLTs, because it's now locked down from low-privileged processes. 182 00:20:44,940 --> 00:20:46,640 And that's LPC. 183 00:20:46,640 --> 00:20:48,100 LPC is pretty cool. 184 00:20:48,100 --> 00:20:54,120 It also communicates between processes, or between different processes. 185 00:20:54,420 --> 00:21:13,340 And when you strip apart, OK, my target may not be necessarily the kernel, but it can be some other process, which has more privileges, and you're looking for it, so LPC can be a good way to go for it, because, against that concept, you may target not the kernel part, 186 00:21:13,340 --> 00:21:21,420 or the mechanism, but you may target the parts where the different processes basically process your packet you send to them. 187 00:21:22,400 --> 00:21:30,820 And good news, not news, but good things, is that, I think, every process has to open at least one LPC port. 188 00:21:31,340 --> 00:21:44,460 And with some part of luck, you may find that some of your processes that you can open, or you have already opened, if that thing works, and open a few different and promising attack circuits. 189 00:21:44,940 --> 00:21:50,780 But it's based on LPCs that are undocumented, so it means that you can have a hard time to understand it. 190 00:21:50,860 --> 00:21:56,440 But fortunately, there was some good research by Alex Yunescu, which brings more light to this area. 191 00:21:56,660 --> 00:22:05,400 And also, there were recent papers about the attacking of Vista, and it was pretty nice. 192 00:22:06,960 --> 00:22:10,760 But ok, let's assume we have known everything. 193 00:22:11,360 --> 00:22:14,200 But it's game over, it's easy to explain. 194 00:22:14,560 --> 00:22:16,120 Well, let's see. 195 00:22:17,580 --> 00:22:23,460 Before freeze, yes, it was quite straightforward, it was easy. 196 00:22:23,480 --> 00:22:24,820 But now we're changing it. 197 00:22:24,820 --> 00:22:28,260 I'm not saying that it's impossible, or it's really hard. 198 00:22:28,280 --> 00:22:31,820 But definitely it's a bit harder, at least. 199 00:22:31,820 --> 00:22:36,740 And sometimes it can be not possible, in some corner cases. 200 00:22:37,660 --> 00:22:46,640 For example, as I mentioned, you have the filter sets, that restrict you some part of the syscode that you can use. 201 00:22:46,760 --> 00:22:50,480 Then you have lockdowns, which was applied for graphics, and also for CLFS. 202 00:22:50,960 --> 00:22:56,680 Before freeze, we find that CLFS is very dangerous, from under the level. 203 00:22:56,780 --> 00:23:03,300 And this year we see that, ok, there are lockdowns, it's nice. 204 00:23:04,060 --> 00:23:14,740 And then you have, ok, that's the first thing, if you have a vulnerability, you think, can I use it? 205 00:23:14,740 --> 00:23:17,820 Can I really trigger that vulnerability and use it somehow? 206 00:23:17,820 --> 00:23:24,340 That's for its tactical mitigations, and some kind of time isolation and other things. 207 00:23:24,420 --> 00:23:32,740 But even after, ok, I achieved the rights, now I want to do some code execution, and data flow control. 208 00:23:33,840 --> 00:23:38,880 Data flow control is still, somehow, not so well mitigated. 209 00:23:39,460 --> 00:23:41,700 I mean, probably not at all. 210 00:23:41,780 --> 00:23:47,540 But about the code execution, it's starting to be more challenging. 211 00:23:47,540 --> 00:23:52,060 There are a lot of bugs, as you can see on the right side. 212 00:23:52,500 --> 00:23:54,200 It's a lot of bugs. 213 00:23:54,360 --> 00:23:56,200 So what are these bugs for? 214 00:23:56,200 --> 00:24:00,100 If you don't know about them, I recommend those two articles. 215 00:24:01,820 --> 00:24:03,460 Those are pretty much essential. 216 00:24:03,500 --> 00:24:19,720 They finally open the priorities, what are they doing, what they are doing, what are plans, what are the problems with my implementation, and some weaknesses. 217 00:24:22,300 --> 00:24:26,600 I mean, it's pretty much informative, those two articles. 218 00:24:27,400 --> 00:24:29,780 And especially for you when you want to apply 219 00:24:34,900 --> 00:24:37,160 some public APIs. 220 00:24:38,540 --> 00:24:41,380 So for process mitigation, it's CFG. 221 00:24:41,380 --> 00:24:45,760 Probably most of you guys already know about this one, so just pay attention. 222 00:24:45,980 --> 00:24:58,280 Basically, when you freight writes to your targets, one pretty much common technique was just, OK, I know that, for example, it's C++ code, and you still need toggles. 223 00:24:58,280 --> 00:25:15,720 So my target is, OK, I just find the input table, I change it, and next time, when there will be some object which I can invoke in the virtual world, basically it will just use this address and jump to where I want, and I get code execution for free. 224 00:25:15,980 --> 00:25:28,960 But with CFG, basically before this toggle appears, it's just checking if it's destination address is relatively correct, or not. 225 00:25:31,820 --> 00:25:33,000 It's just some approximation. 226 00:25:33,080 --> 00:25:34,940 But how can they do it? 227 00:25:34,940 --> 00:25:49,440 Actually, when you compile your process, your application, the CFG, it adds some information to its header, and at runtime, they can restore those information in an efficient way. 228 00:25:50,200 --> 00:26:03,740 To do a quick check, as quick as possible, and to do some approximation of what is valid and what is not valid, it's a little bit error-free. 229 00:26:03,740 --> 00:26:17,860 I mean, it's not so effective when you have, for example, you're working with a target which has JavaScript inside or some scripting engine, because simply you don't need to use this technique to generate some input table. 230 00:26:18,100 --> 00:26:27,200 But for some remote attacks, for example, if you want to attack through SMB or through Hyper-V, it can be a real issue. 231 00:26:27,720 --> 00:26:31,800 And that's the only thing for mitigations. 232 00:26:31,820 --> 00:26:34,980 To make it harder for execution. 233 00:26:37,990 --> 00:26:38,490 And so... 234 00:26:39,170 --> 00:26:49,470 But this is some fatal flaw, because you protect only from forward edges, only from when you want to invoke some call. 235 00:26:49,510 --> 00:26:56,830 And so it means backward edges, like changing the return address, it's still heavily unprotected. 236 00:26:56,830 --> 00:27:09,310 So what you will do, changing the input table, if you can just make it easy, at least in JavaScript, and just on this tag invite the return address. 237 00:27:09,590 --> 00:27:15,110 That is true, but I mean that for quite a reason, because there are a lot of terrible things. 238 00:27:15,590 --> 00:27:17,430 And Neo4j was pretty nice. 239 00:27:17,510 --> 00:27:36,890 I mean, it was a nice idea, because they introduced new memory, and what they're doing, when you do a call, they basically, at the beginning of the function, which is protected by this technology, this special region, the same return address. 240 00:27:37,450 --> 00:27:42,950 And at the return, they will check if the return address still matches with this one you've already saved. 241 00:27:42,950 --> 00:27:44,770 And if it doesn't match, it's failed. 242 00:27:44,970 --> 00:27:49,350 But if it matches, it means you should be safe. 243 00:27:49,550 --> 00:27:54,910 You should be safe, because it has some weaknesses. 244 00:27:56,450 --> 00:28:14,690 At first, I need to emphasize that I think it's a splendid idea, because it means that through this kind of methods, you can, for example, for Compound Logging Microsoft, I believe it can be hard to develop mitigation on large scale, because you need to deal with a lot of legacy stuff. 245 00:28:15,130 --> 00:28:27,830 And this way was very genius, I think, because you just compile, for example, your DLL with this technology, and you can just load it to unprotected process, and it will work. 246 00:28:27,830 --> 00:28:38,990 And you can load it to protected process, RNG, so it's pretty nice, doesn't break legacy, it's fast, only about 5 instructions, it's pretty neat. 247 00:28:39,390 --> 00:28:46,850 But the key weakness is that it's, as you can see on the previous slides, it has base conditions, I will show them in a moment. 248 00:28:47,130 --> 00:28:49,770 And the other thing is that it's backward-based. 249 00:28:49,810 --> 00:28:56,990 I mean, for this one, for example, for the shadow stack, it's in user mode, so it means you can write for this one. 250 00:28:57,530 --> 00:28:59,810 So, it's a problem. 251 00:28:59,990 --> 00:29:06,190 Now, what's the point that you can write, if you're already writing in Vue? 252 00:29:06,190 --> 00:29:08,290 You need to just find and rewrite it. 253 00:29:08,350 --> 00:29:09,490 But that's the key. 254 00:29:10,030 --> 00:29:25,370 The whole idea behind RNG was that we have no memory-pointed leaks to this region, and as you have terabytes of memory space, basically, if you hit the bed, then your process can be down and be killed. 255 00:29:25,770 --> 00:29:30,450 So, it's cool, it's just inefficient to search for it, because it's no memory leaks. 256 00:29:30,450 --> 00:29:32,250 But, what is the problem here? 257 00:29:32,250 --> 00:29:38,710 Because we have CPUs, which are not properly designed for security, and we have all those sidechannels. 258 00:29:38,710 --> 00:29:42,110 So, it means, second, this protection doesn't work. 259 00:29:43,510 --> 00:29:47,630 And, as I mentioned, first, those are base conditions. 260 00:29:47,630 --> 00:29:59,650 As you can see in the prologue and the epilogue, you can raise instructions, because, when you do call, the instruction will just redirect us to a normal stack. 261 00:30:00,450 --> 00:30:06,730 And the software can emulate it, so it will load it to your shadow stack. 262 00:30:06,730 --> 00:30:15,430 It basically cannot emulate, it just can wait until it's called, then it can read from the stack when it was original stored, and then put it on the shadow stack. 263 00:30:15,910 --> 00:30:19,270 And this is a bit of a risk condition. 264 00:30:21,490 --> 00:30:23,890 I believe that's... I think that's... 265 00:30:23,890 --> 00:30:32,410 There was people thinking that's OK, of course they know about this risk condition, but it's been in some reasonable manner. 266 00:30:32,650 --> 00:30:40,430 But in fact, as this happened, some submission, successfully, it was able, and was able to safely to do it. 267 00:30:42,990 --> 00:30:57,290 But, if allergies do some, at least, for example, it's for this to be consistent, it's cooled down, so it's, again, it's not protected by allergies, but no worries, it will go to your back, and maybe in three years, five, I don't know 268 00:31:00,450 --> 00:31:08,910 and that will mean that it will be protected calls and returns by half itself, which is always pretty neat. 269 00:31:08,910 --> 00:31:22,350 It will be not probably 100% secure for attacks against hijacking counterflow, but it's built pretty much by boundary for you to bypass. 270 00:31:24,010 --> 00:31:32,250 And, but, let's say that OK, forward and backward edges is still important, but it seems they don't stop there. 271 00:31:32,250 --> 00:31:33,230 Why? 272 00:31:33,390 --> 00:31:41,290 Simply because before, and also nowadays, when you have, for example, CFG and whites, and you start with error ping. 273 00:31:41,290 --> 00:32:03,210 Error ping is pretty nice, but it can be problematic when you need to do all payloads, just by error ping, call all the syscalls, all the arguments, and that's why the people usually just allocate new memory, put their codes, into the executable, and then just jump this one, 274 00:32:03,210 --> 00:32:08,230 for example, through changing the return address. 275 00:32:08,830 --> 00:32:13,250 And that's where CAG, ACG, and the other codes come to play. 276 00:32:15,030 --> 00:32:19,990 To prevent this kind of execution, your own codes inside your targets. 277 00:32:20,050 --> 00:32:26,850 So first, CAG, Code Integrated Guards, is linked to be, OK, it will be a trivial, then you can just, through error ping, 278 00:32:30,070 --> 00:32:37,250 and that's it, because the library can be wrong if you before drop the file, and basically, you won already. 279 00:32:37,710 --> 00:32:48,730 But CAG says, OK, no, no, you cannot do it, because it's not a valid signature, and as an attacker, it probably shouldn't be easy for you to get a valid signature. 280 00:32:50,670 --> 00:33:07,750 But still, OK, we can unload the library, but OK, we can go for allocating memory and making an executable, so OK, Arbitrary Code Guards say, OK, no, you cannot do it, because once memory is breakable, you can't change it to executable anymore. 281 00:33:08,090 --> 00:33:10,950 And then, wow, but this is interesting. 282 00:33:11,290 --> 00:33:24,910 Then when it comes to browsers, like Niche, they have JIT, JIT Engine, and what they really need is, but OK, and this is also a pretty nice design, so how do they deal with this one? 283 00:33:24,910 --> 00:33:26,870 So they just say, OK, we don't need it, 284 00:33:30,070 --> 00:33:39,250 because in your own process, you cannot disable Arbitrary Code Guards, but what you can do, is that different processes can do it for you. 285 00:33:39,570 --> 00:33:51,510 So they basically introduce another process, which basically unpacks an idiom, injects the code inside your target process, and makes it executable. 286 00:33:51,910 --> 00:33:54,630 And of course, there are CRG and these kind of things for it. 287 00:33:55,170 --> 00:34:10,390 So it's also a neat design, but on the other side, there's a problem, because there's a problem, OK, what about framing the memory in my own process, when the different processes allocate bits, and getting or rewrite the memory? 288 00:34:10,890 --> 00:34:17,210 There are lots of tricky things to do, but I guess they will handle it step by step. 289 00:34:18,030 --> 00:34:23,330 So it's very nice to see that Microsoft is doing this kind of challenging thing for us. 290 00:34:24,530 --> 00:34:27,810 And another thing, OK, this is not the native code execution piece, 291 00:34:31,870 --> 00:34:44,290 but before you can get native code execution, or data boning, and just rewriting some data, I think it's pretty much equal, by the way, to data tricks and code selection attacks. 292 00:34:44,350 --> 00:34:46,150 It just depends on the viewer. 293 00:34:46,370 --> 00:34:51,430 But even before you can do this one, you need to get good control of your room already. 294 00:34:52,010 --> 00:34:57,690 And that one was the next point, how to mitigate those kind of things. 295 00:34:57,930 --> 00:35:02,070 And one of these interesting things was how isolation algorithms were used. 296 00:35:02,870 --> 00:35:14,610 And, for example, before we have some technique that we have some object in Kata, which have some header and other, and they are really putting together. 297 00:35:14,730 --> 00:35:34,410 But the problem with this one is this, that when you can from those data overflow, when you have some bug in handling your object, and you can overflow to different objects, and then you can alter this data, so that's when comes type selection in. 298 00:35:34,410 --> 00:35:40,650 This separates different objects, headers and data, different chunks. 299 00:35:41,050 --> 00:35:43,890 Not all of them, but I guess pretty much this one. 300 00:35:44,230 --> 00:35:49,890 Even if you have overflow, it will be hard for you to attack the critical structures. 301 00:35:50,150 --> 00:36:04,250 And even if you have some result-free, it will be very difficult to, or maybe impossible, it will be difficult to get the different objects that were originally supposed to be there. 302 00:36:04,910 --> 00:36:06,530 That's a bit nice. 303 00:36:07,070 --> 00:36:20,610 But, for example, when it comes to overflows, if you have some crucial thing, that it will tell, for example, about the tactical mitigations. 304 00:36:22,990 --> 00:36:23,470 Because... 305 00:36:23,470 --> 00:36:41,010 I mean, about tactical mitigations, there is another thing that's OK, that you can get another control of your vulnerability, that you can somehow put it in a good object or it would get a lot of different objects. 306 00:36:41,150 --> 00:36:43,370 And now we can start working with it. 307 00:36:43,390 --> 00:36:50,530 And it was some known techniques, like BND or BigMap attacks. 308 00:36:50,790 --> 00:36:53,850 And if I get attacks, and they use the same pattern, 309 00:36:57,870 --> 00:36:59,350 that's our pointer. 310 00:37:00,610 --> 00:37:02,890 And that's why I was focusing on... 311 00:37:04,750 --> 00:37:08,430 it's not some generic approach, it's approach one by one. 312 00:37:08,750 --> 00:37:17,070 But it kind of helps, because when you know that a lot of people are using this technique and blocks it, eventually maybe it will get out of the arsenal. 313 00:37:17,790 --> 00:37:31,930 But what's going on here is that basically when before you do some manipulation over, for example, a pointer, index or some buffer, they will check it at first. 314 00:37:31,930 --> 00:37:37,690 OK, is this buffer, is this index inside some outer edges? 315 00:37:37,690 --> 00:37:40,250 If it's a buffer, it's quite cool. 316 00:37:40,950 --> 00:37:43,590 And that's what's called tactical mitigation. 317 00:37:43,610 --> 00:37:48,810 And it somehow helps to at least bank some techniques, or at least to make them harder. 318 00:37:48,850 --> 00:37:55,390 But what's crucial for this mitigation is that you should not be able to... 319 00:37:57,990 --> 00:38:12,330 you can have some limited safe writes in some boundaries, but being inside those boundaries has an important structure, which basically checks after those boundaries, and if it affects that one, it won't. 320 00:38:12,330 --> 00:38:14,270 And that was happened... 321 00:38:14,270 --> 00:38:27,810 at that article, I referenced it a lot, it's by Mortensen, and you can read it, it was, I think, a pretty nice bypass of one particular tactical mitigation. 322 00:38:28,450 --> 00:38:30,050 Targeting the BND. 323 00:38:31,830 --> 00:38:33,510 So, how it looks like. 324 00:38:33,750 --> 00:38:42,190 For example, on one of our bugs, I was checking, OK, it can be used, because it looks like a write, only primitive. 325 00:38:42,190 --> 00:38:45,770 So I try to check if it can be used also as a write primitive. 326 00:38:45,790 --> 00:38:51,850 So I'm going through the code, some different branches, and then in one branch, I see this kind of check. 327 00:38:51,850 --> 00:39:01,430 At the beginning, you see, B19 is less than B20, and B4 is bigger than B13, it just doesn't cross it more. 328 00:39:01,550 --> 00:39:18,250 And this kind of checks are usually not in place when you code, because as a developer, you will write some code, and you build, for example, some objects, and you will use index to index the memory, because this should be correct, this should be valid. 329 00:39:18,510 --> 00:39:20,910 But when an attacker can change it, 330 00:39:23,990 --> 00:39:29,830 and that's why you have this kind of checks, but as a normal developer, when developing code, you will not think of this one. 331 00:39:29,830 --> 00:39:36,170 But when you do some mitigations, like static ones, you will check for this education. 332 00:39:37,250 --> 00:39:47,830 Because if it's not this check, we can use it to write anywhere in the kernel, but this checks if it's a good full boundary, and goes a bit troublesome. 333 00:39:49,490 --> 00:40:10,790 So in fact, in theory, because Windows is developing these mitigations pretty much fast, I would say you have, I don't know, maybe 80 or more native code execs mitigations, and you have this type of static mitigations, type of isolations, and different kind of things, 334 00:40:10,790 --> 00:40:12,050 which is pretty nice. 335 00:40:12,050 --> 00:40:33,510 So in theory, it should be pretty nice strongholds, so you cannot do any more to re-write the memory, you cannot load arbitrary modules, RIPs, and also even overflows, there will be some limits that you cannot touch anywhere in the kernel, but just in some parts. 336 00:40:33,510 --> 00:40:35,910 But it's some kind of suggestions in theory. 337 00:40:36,490 --> 00:40:57,630 It certainly makes it a little bit harder, but it's not game over, because it's still a lot of legacy, so it's hard to do it in large scale properly, and also there's a lot of, then you have some... 338 00:40:57,630 --> 00:41:10,170 Recently, for example, in mitigation, when you can see mitigation rules, mitigation mappable rules, you can see that it's out of scope for some categories, race conditions, and it's a butterfuck. 339 00:41:10,170 --> 00:41:24,950 Race conditions, I mean, when you write race conditions, it's like saying, OK, we have a really big problem, because we cannot defend against them, but it's still a big problem, because you have process, you have a lot of environments. 340 00:41:26,190 --> 00:41:32,110 But it looks like it's really hard to protect against some race conditions. 341 00:41:34,430 --> 00:41:53,190 But at least, I want to say that in Windows, what I like from past years, from now, that's the way changing, looking at the early shift towards security, and that at least makes for me, it's a bit more challenging, I can more use my brain, it's not like, 342 00:41:53,190 --> 00:41:56,350 OK, I just sit one or two days, and it's done. 343 00:41:56,350 --> 00:41:59,270 But now I need to, OK, be more creative. 344 00:41:59,370 --> 00:42:00,530 So for me, it's good. 345 00:42:00,770 --> 00:42:07,690 And also for normal users, it's good, because it makes for all the people to work harder. 346 00:42:09,330 --> 00:42:17,190 So, we have sandbox, we have native code executions, we have some tactical mitigations, but what else? 347 00:42:17,810 --> 00:42:31,390 Still, a lot of bugs, and still people bypass it, and introduce some new thing, I mean, it's not new thing, but it's coming to life, that you see, make use of virtualization. 348 00:42:31,710 --> 00:42:49,390 And virtualization is pretty neat, because as I said before, I enjoy Kernel, because I like it, but also because, before, you own Kernel, you own, but now you own Kernel, and it can be just one point in your checkbox, in your to-do list. 349 00:42:52,730 --> 00:43:02,050 And it's limited, you can link the data, and that's not all what you want, you want less data. 350 00:43:02,630 --> 00:43:07,250 And that's what virtualization is about. 351 00:43:07,450 --> 00:43:21,970 And really good is that they are using Hyper-V, because Hyper-V is well designed, when you look inside, you see that also a lot of security perspective applied to this module. 352 00:43:21,990 --> 00:43:34,550 And you can see that it's a lot of C++, I mean, I enjoy C++, but on the side, it can be bad because C++ is really hard to do it good, it's really easy to make mistakes, and bad mistakes. 353 00:43:34,650 --> 00:43:45,810 But when you look at these components, it's not C++ is good, it's code, it's pointers, they are pretty much separation of logic, it's clean design. 354 00:43:46,290 --> 00:43:47,990 So it's... I like it. 355 00:43:47,990 --> 00:44:00,410 I mean, it's challenging, when you want to find bugs there, it's a big challenge, and when you go on the kernel, and these are the applied, you may have problems. 356 00:44:02,510 --> 00:44:07,750 So, for example, about Hyper-V, one of the core components is VNVP. 357 00:44:07,750 --> 00:44:08,770 And what's VNVP? 358 00:44:09,630 --> 00:44:11,630 It's a virtual machine order process. 359 00:44:11,630 --> 00:44:16,470 It's basically the process in the host, which manages the virtual machine. 360 00:44:17,490 --> 00:44:25,530 Now this you can maybe, when you try to hyper-application guards, so you can try it. 361 00:44:25,530 --> 00:44:37,790 But you can see that it's not so useful, because you can maybe go to Twitter or watch porn sites, but it's not so useful for real applications, for real life, because all those data are just inside the container. 362 00:44:38,150 --> 00:44:40,910 But in the future, it will be a bit more and more applicable. 363 00:44:42,730 --> 00:44:43,170 And... 364 00:44:45,070 --> 00:44:47,410 this VNVP will be more crucial. 365 00:44:47,970 --> 00:45:03,170 And when you look on the virtual machine that's going inside, for example, about the emulates, you will see that it's not a lot of things, it's relatively clean, and you have minimal... 366 00:45:03,770 --> 00:45:09,430 you don't have too much legacy, you don't have a drag-and-drop, you have basic sessions by default, 367 00:45:13,170 --> 00:45:13,850 so it's... 368 00:45:15,730 --> 00:45:20,190 it's not a big attack surface, as some other virtual machines maybe. 369 00:45:20,790 --> 00:45:38,030 And it can be good, but as I use it, as I try to use it sometimes, as for example for browsing, I don't feel it too much, so I don't think it's a virtualization as boundaries right now here, but I think maybe soon will be. 370 00:45:38,030 --> 00:45:44,410 So for this one, the reference type of VNVP can be pretty good. 371 00:45:45,590 --> 00:46:05,170 So in the future, what it looks like, maybe the attack, it can be composed from many small parts, because you need, at first, to get back in your target, which can be browser, it can be some ADP, like Skype or whatever, and then it's OK, you get back. 372 00:46:05,170 --> 00:46:15,110 Then you need to get the remote code execution, so you need to bypass some net code execution bugs, and before, maybe you need to handle the tag isolation, this kind of things. 373 00:46:15,290 --> 00:46:19,590 Then, OK, I get the remote code execution, but I need to escape from the sandbox. 374 00:46:20,030 --> 00:46:20,870 And why? 375 00:46:22,190 --> 00:46:26,650 Because I'm inside the virtualization, so I need to attack the cadena, the improviser. 376 00:46:26,650 --> 00:46:31,830 But the improviser can attack only from the cadena, so even, for example, I got out from the sandbox, 377 00:46:35,170 --> 00:46:43,790 then it's true, be sure to look for the cadena, or at least, I have no need, maybe, in code execution there, but at least it writes. 378 00:46:44,290 --> 00:46:56,790 And from that point, you need to find the bug in virtualization, and then you have the bug in virtualization, and to be able to exploit it, and when you have exploited it, so in that host, when you are in cadena, it's OK, but when you are in user mode, 379 00:46:56,790 --> 00:47:01,230 then you still need to find where it was also in virtualization, it's locked down. 380 00:47:01,790 --> 00:47:06,710 So it can be... it's promising, it can be a good challenge in the future. 381 00:47:07,350 --> 00:47:13,390 They are not there, but I believe that they will be, at one point, and it will be interesting. 382 00:47:13,910 --> 00:47:17,050 At least, for me, it will be a nice challenge. 383 00:47:19,210 --> 00:47:27,690 So, but still, before all of this, when you want to exploit, make use of sandbox, you need first to find them. 384 00:47:28,110 --> 00:47:29,330 So how to do it? 385 00:47:30,510 --> 00:47:46,870 Actually, before, it was more troublesome, because you don't have too much open source tools, you need to create your own clusters, and by creating the things, I mean, it's nice to create it and everything, but it can be a little over-engineered. 386 00:47:47,350 --> 00:48:08,150 And at first, for example now, you have pretty much a lot of open source tools, you have syscaller, you have key, you have hypervisors, which you can utilize, which you have also, you have qm, kvm, which is not just for debugging, and you have the technologies for debugging. 387 00:48:08,150 --> 00:48:14,270 You can use all of these, and it will help you, and you have all the resources. 388 00:48:14,270 --> 00:48:19,470 But I don't recommend to start, for example, to make it faster from the scratch. 389 00:48:19,610 --> 00:48:25,830 At first, I guess you need to understand how the state-of-the-art tools work. 390 00:48:26,190 --> 00:48:40,670 Those are, for example, KFL, and when you want to work in the kernel, you can use an adaptation in the form of KFL, which you can also use for Windows or for other platforms, and the same applies for syscaller. 391 00:48:40,670 --> 00:48:45,330 KFL is for data-fuzzing, and syscaller is for state-fuzzing. 392 00:48:46,090 --> 00:49:04,450 And so at first, when you understand the square root of tools, and you know how to work with them, what their weaknesses are, and what you want to improve, then I suppose you should go further with your own tool. 393 00:49:04,830 --> 00:49:05,570 Depends. 394 00:49:05,570 --> 00:49:07,190 Depends case by case. 395 00:49:07,190 --> 00:49:14,110 But at first, I think it's not a good idea to rely on this wheel again and again. 396 00:49:14,110 --> 00:49:21,810 At first, understand, and then see if you really need to do something new, and if yes, then do it good. 397 00:49:23,570 --> 00:49:29,510 And then the really common question, maybe not a question, but it's there to approaches. 398 00:49:29,530 --> 00:49:32,950 People are a lot of times just looking for bugs. 399 00:49:36,750 --> 00:49:41,290 But what I would like to do is combine those two approaches. 400 00:49:41,450 --> 00:49:42,190 Why? 401 00:49:42,350 --> 00:49:43,550 Because who's fuzzing? 402 00:49:43,750 --> 00:49:46,190 It's fuzzing super easy. 403 00:49:46,190 --> 00:49:49,150 I mean, you can write a program, and you can call it fuzzer. 404 00:49:49,410 --> 00:49:54,270 And it's okay, because it does something, but it depends if it does something reasonable. 405 00:49:54,270 --> 00:49:57,990 Because it's really easy to do just fuzzer, which does nothing. 406 00:50:03,090 --> 00:50:12,010 If you tell him exactly what to do, or limit him too much, it will not be random enough, or will not do enough house and interesting behavior. 407 00:50:12,150 --> 00:50:17,350 Because people just look at some some predefinite paths. 408 00:50:18,170 --> 00:50:24,270 On the other side, when you're looking just by eyes, well, it can be really tiring for you. 409 00:50:25,650 --> 00:50:27,070 You can find... 410 00:50:27,070 --> 00:50:39,330 you can easily sleep some easy bug or, on that side, it's really hard to comprehend some complex connections. 411 00:50:39,370 --> 00:50:47,670 For example, some race conditions, or some connection five lives ago, some connections, two things together. 412 00:50:48,170 --> 00:50:54,610 And this can be really hard to comprehend, really, to see the bug there. 413 00:50:54,970 --> 00:50:56,850 And also, the same applies for the fuzzer. 414 00:50:56,850 --> 00:51:07,310 It's not so easy for the fuzzer to go for some deep bugs, but on that side, when you combine these two approaches together, it can have a good effect. 415 00:51:07,510 --> 00:51:12,630 You will just see a lot of random fuzzer, and then you will improve. 416 00:51:12,630 --> 00:51:19,950 OK, I get a deep bug, for example, I cover these parts, but I know that this part seems more interesting, so I want to go more deep. 417 00:51:19,950 --> 00:51:26,870 So I will shift the fuzzer, for example, templates, and some logic in the fuzzer, to go with that part finally. 418 00:51:27,310 --> 00:51:34,850 And maybe to provide some callbacks, and enhance the fuzzing. 419 00:51:35,590 --> 00:51:37,670 It's a lot of things, what you can do. 420 00:51:40,530 --> 00:51:45,670 And also, the other thing, is choosing about the targets. 421 00:51:46,890 --> 00:51:49,570 As you see, I'm not just about the browsers. 422 00:51:49,570 --> 00:51:56,130 Browsers are just one thing, which is really dangerous, if it's done wrong. 423 00:51:56,270 --> 00:52:00,610 But there are a lot of applications, which basically communicate with the Internet. 424 00:52:00,610 --> 00:52:09,690 So when you are using Skype, when you are using Slack, emails, or different applications, a lot of things communicate with the Internet. 425 00:52:10,250 --> 00:52:19,370 And so when you know that your target is using this program, and you know, for example, this is weaker than some browser, then you probably go for that one. 426 00:52:19,370 --> 00:52:20,170 Why not? 427 00:52:21,690 --> 00:52:23,330 And this is also SMB. 428 00:52:25,350 --> 00:52:27,110 Because there were some bugs, 429 00:52:31,510 --> 00:52:35,430 not so easy bugs, but for me it's unbelievable that those kinds of bugs exist. 430 00:52:35,430 --> 00:52:37,150 Non-authenticated bugs. 431 00:52:39,310 --> 00:52:43,910 But when you run some simple dummy fuzzing, you can find a lot of those bugs. 432 00:52:44,310 --> 00:52:53,190 I mean, not dummy fuzzing, but for example, more efficient, like APM, that has some strategy approach to find them. 433 00:52:53,290 --> 00:52:56,830 But when you just apply, I think, baseline, you will find them. 434 00:53:00,610 --> 00:53:02,450 I mean, internally, from Microsoft, as I hear. 435 00:53:02,990 --> 00:53:08,250 And from where you see from CVs, they follow CVs to Microsoft for critical stuff about SMB. 436 00:53:09,230 --> 00:53:11,090 And so I check it also. 437 00:53:11,750 --> 00:53:13,050 And it's hard to find now. 438 00:53:13,050 --> 00:53:19,830 I think non-authentication bugs will be a good lag, or that would be a good way to find it. 439 00:53:20,190 --> 00:53:26,490 But now, for example, authentication bugs are really also important, but it can be hard to find. 440 00:53:27,530 --> 00:53:32,970 And also, when you look in the windows, it's not about... 441 00:53:32,970 --> 00:53:37,490 you can find different things also in the kernel, because they introduced some new technologies. 442 00:53:37,490 --> 00:53:42,230 For example, Ubuntu on Windows, which is pretty nice, but it needs a whole new subsystem. 443 00:53:42,830 --> 00:53:47,890 And it depends on good facets, good reviews, it all depends. 444 00:53:48,270 --> 00:53:51,650 And maybe you can start looking at it, you can find more and more stuff. 445 00:53:52,510 --> 00:53:58,250 And you'll find, for example, SMB, MDP, and other things to look for. 446 00:54:03,450 --> 00:54:06,710 It's more and more challenging from the perspective of... 447 00:54:06,710 --> 00:54:09,530 you need to use more RAM to exploit something. 448 00:54:09,890 --> 00:54:12,750 And you have a lot of targets to exercise on. 449 00:54:14,750 --> 00:54:21,810 So, to think about the conclusions, the single most important thing about mitigation is attack-to-fat reduction. 450 00:54:21,810 --> 00:54:25,690 If you reduce me to... I can do nothing, then I just can do nothing. 451 00:54:27,430 --> 00:54:29,970 Then, sandboxing is very important. 452 00:54:30,890 --> 00:54:38,710 Because when you're living with only some small parts that I need to jump from one processor to another, I need to change multiple vulnerabilities. 453 00:54:39,230 --> 00:54:44,230 And that can be really annoying at this, and sometimes making it impossible. 454 00:54:45,070 --> 00:54:46,850 And it's also not difficult execution. 455 00:54:46,910 --> 00:54:51,030 I mean, it's public bypasses for them, usually. 456 00:54:51,490 --> 00:54:56,550 But still, for example, in the remote case, it can play a big role. 457 00:54:56,910 --> 00:55:03,130 And also in normal case, at least it will say, OK, but we need to bypass this one at first. 458 00:55:03,530 --> 00:55:07,050 Nobody will say that's impossible, but you will need to think about this one. 459 00:55:07,330 --> 00:55:08,950 So at least it's good. 460 00:55:09,550 --> 00:55:11,310 You can be more creative. 461 00:55:11,950 --> 00:55:13,470 Enjoy more, let's say.