1 00:00:34,240 --> 00:00:36,200 Okay, we're streaming. 2 00:00:37,780 --> 00:00:41,620 Everyone, welcome back to, I guess, the very first talk of... 3 00:00:41,620 --> 00:00:43,020 Okay, we're streaming. 4 00:00:45,610 --> 00:00:46,310 ...speakers. 5 00:00:46,870 --> 00:00:52,370 This is the How to Hack Windows Machines with Printing Protocols. 6 00:00:52,370 --> 00:00:53,850 I forgot the most important part of that, right? 7 00:00:53,850 --> 00:00:54,910 Evil Printer. 8 00:00:54,950 --> 00:00:57,830 How to Hack Windows Machines with Printing Protocols. 9 00:00:57,830 --> 00:01:02,610 Would you guys mind introducing yourselves, since I've already said that it's really late where y'all are at? 10 00:01:02,610 --> 00:01:07,530 Okay, so we are speakers from Beijing, China. 11 00:01:07,530 --> 00:01:10,830 And we work at Tencent Security Chef Lab. 12 00:01:11,170 --> 00:01:17,910 And this is the main speaker, or the author of the presentation, Jim Hongbo. 13 00:01:18,990 --> 00:01:21,770 He is the senior researcher on this project. 14 00:01:21,770 --> 00:01:31,330 And I'm the co-author of the presentation, slash translator for this talk, slash voice cast for the talk, actually. 15 00:01:32,710 --> 00:01:44,170 For anyone who maybe didn't get a chance to finish watching the talk, or just got overwhelmed with how many there are already, would you be willing to just kind of give us a brief overview of what all your talk, your presentation, entails? 16 00:01:45,150 --> 00:01:53,110 So basically we are showcasing a vulnerability we've discovered in Windows Printing Protocol. 17 00:01:53,110 --> 00:02:00,910 And this vulnerability can basically pose locally privileged escalation. 18 00:02:00,910 --> 00:02:05,130 So maybe from sandbox apps to normal user. 19 00:02:05,170 --> 00:02:12,930 And also escalate from normal user to system root on Linux. 20 00:02:12,990 --> 00:02:14,710 System on Linux. 21 00:02:15,570 --> 00:02:20,830 And basically we can also do it remotely as remote code execution. 22 00:02:21,550 --> 00:02:27,170 Maybe you can affect other users who are connecting to the printer. 23 00:02:27,170 --> 00:02:35,030 And when the user connects to that printer, it automatically gets code executed on their machine. 24 00:02:36,950 --> 00:02:44,430 First question we had come in is, why would a sandbox app, like a browser, even need access to the printer server? 25 00:02:46,070 --> 00:02:49,850 Well, browser, as you can see, is a very complex app. 26 00:02:49,850 --> 00:02:56,630 When you use the browser, you actually have many different needs for different users. 27 00:02:57,210 --> 00:03:07,690 Many of the users would like to print documents that they are using a, for example, PDF reader in the browser. 28 00:03:07,750 --> 00:03:10,850 And you may want to print that PDF document. 29 00:03:11,290 --> 00:03:18,810 And that's when the browser needs to talk to a printer through the Windows Printing Protocol. 30 00:03:20,470 --> 00:03:34,470 And that opens up a channel from the sandbox app or the browser to the privileged service, the Windows Printing Service, the Print Spooler. 31 00:03:34,470 --> 00:03:41,730 So that's why this vulnerability can affect a sandbox app like browsers. 32 00:03:42,030 --> 00:03:45,930 Is this throughout all of the Windows Suite that's out there? 33 00:03:45,930 --> 00:03:49,850 Are there certain versions that are susceptible that others aren't? 34 00:03:50,110 --> 00:03:57,310 Well, we did test through Windows 10 to legacy Windows 7. 35 00:03:57,570 --> 00:04:02,950 Theoretically, it does affect even older versions like Windows 2000. 36 00:04:04,090 --> 00:04:06,790 But we haven't tested that yet. 37 00:04:06,790 --> 00:04:18,790 The Windows Spooler service, which is a very patient or legacy service, exists in more than 25 years. 38 00:04:18,790 --> 00:04:23,570 So that really does affect a lot of versions in between. 39 00:04:24,970 --> 00:04:28,270 Is this still research that you guys are planning on going further down? 40 00:04:28,270 --> 00:04:30,650 Is this going to pivot into something else? 41 00:04:31,410 --> 00:04:40,230 Well, we've been doing this research on Windows Privileged Escalation for many years now. 42 00:04:40,230 --> 00:04:50,910 So we did research other parts of the Windows operating system, and this is one of our latest findings, actually. 43 00:04:51,910 --> 00:05:02,130 By the way, we did discover another Privileged Escalation vulnerability just after finishing the talk. 44 00:05:02,130 --> 00:05:05,350 Are you ready to talk about it here? 45 00:05:05,350 --> 00:05:13,990 Not really, because Microsoft decided it will postpone the fix to December. 46 00:05:14,830 --> 00:05:16,890 Maybe next year. 47 00:05:16,890 --> 00:05:23,290 I think they're teasing us, guys, like, hey, if you want us back next year, we've got more to drop on y'all. 48 00:05:23,810 --> 00:05:32,870 Yeah, actually, we did write a lot about how to find similar bugs, or similar kinds of logical bugs. 49 00:05:33,650 --> 00:05:37,830 We did a submission this year, but unfortunately... 50 00:05:38,570 --> 00:05:40,370 Maybe next year. 51 00:05:40,570 --> 00:05:44,870 How to do logical bug finding generically. 52 00:05:44,870 --> 00:05:47,250 Maybe I'll just put you guys on the spot a little bit. 53 00:05:47,250 --> 00:05:54,150 Will you give us a little bit of teaser, a 1,000-mile overview of how you would go about finding interesting bugs like this? 54 00:05:54,150 --> 00:05:56,750 Not your full talk, but... 55 00:05:56,750 --> 00:06:05,150 Well, I can basically summarize into a few things. 56 00:06:05,390 --> 00:06:11,090 First thing is you have to have in-depth knowledge about operating system kernels. 57 00:06:11,090 --> 00:06:19,190 So sometimes even more in-depth than the person who is actually writing the operating system components. 58 00:06:19,190 --> 00:06:27,350 So basically more knowledge than the average Microsoft employee, or average Microsoft engineers. 59 00:06:27,690 --> 00:06:35,430 That's how deep you are going to get to actually find the interesting bugs in Windows operating system. 60 00:06:35,430 --> 00:06:41,750 And second is, I think, the tooling is very important. 61 00:06:41,750 --> 00:06:50,850 So you have to have your own tooling for the research that you want to make. 62 00:06:51,610 --> 00:07:00,730 We really recommend you guys check out James' awesome OLU.net. 63 00:07:00,730 --> 00:07:02,430 It's an awesome tool. 64 00:07:02,430 --> 00:07:06,370 But don't just use the tool. 65 00:07:06,370 --> 00:07:07,870 Write your own. 66 00:07:08,290 --> 00:07:11,350 You can write the tool. 67 00:07:11,350 --> 00:07:14,750 It depends on the other people's tools. 68 00:07:14,750 --> 00:07:29,670 But try to write your own, because writing that tool, you get more knowledge about the kernel stuff, how it works, and how they decide certain things. 69 00:07:29,670 --> 00:07:34,910 The engineer view of the operating system is very important. 70 00:07:40,180 --> 00:07:41,480 I always end up with audio issues. 71 00:07:41,480 --> 00:07:42,400 Sorry about that. 72 00:07:42,400 --> 00:07:43,920 We had a question come in. 73 00:07:44,140 --> 00:07:48,240 Have you noticed any easy access for printer memory? 74 00:07:48,460 --> 00:07:53,780 They went on to say, I know that the DoD has been trying to crack down on this for decades. 75 00:07:55,940 --> 00:07:58,440 What do you mean by printer memory? 76 00:07:58,440 --> 00:08:01,240 The memory on the actual physical printer? 77 00:08:03,020 --> 00:08:09,580 I think they have a bit of a follow-up for you there, so hopefully he'll get back to us. 78 00:08:09,580 --> 00:08:15,920 In the meantime, though, you've said that you've kind of been investigating all this in privileged escalation for a while. 79 00:08:15,920 --> 00:08:17,620 What got you guys into this track? 80 00:08:17,620 --> 00:08:22,840 What got you excited about digging in to the point where you're writing your own tools for all of this? 81 00:08:23,660 --> 00:08:40,760 Well, as I said, the tooling is very important because it not only lets you know the internals of the operating system, how it works and why it works, or why they are designed this way. 82 00:08:40,760 --> 00:08:49,960 Also, it will get you further than other people's generic tools don't get. 83 00:08:50,960 --> 00:08:59,260 That's why we are recommending everybody to have their own tools instead of using the generic ones. 84 00:09:01,120 --> 00:09:12,360 And the curiosity in the internals is very important for finding logical bugs. 85 00:09:12,780 --> 00:09:19,720 That's why we started doing logical privileged escalation instead of memory corruptions. 86 00:09:19,720 --> 00:09:21,780 Everybody is working on that. 87 00:09:22,860 --> 00:09:30,000 But logical bugs are quite fun, actually, to find it and to talk about it. 88 00:09:31,820 --> 00:09:37,980 It was definitely a really interesting talk to listen to because I think it's something that can affect everyone, right? 89 00:09:37,980 --> 00:09:40,600 Not just companies, but writing your own home. 90 00:09:40,980 --> 00:09:44,140 Those are always... I don't even know the right word for it. 91 00:09:44,140 --> 00:09:44,920 Unsettling? 92 00:09:44,920 --> 00:09:46,940 Would that be the correct term? 93 00:09:46,940 --> 00:09:52,960 I'm waiting on Hakai to get back to us on the rest of his questions. 94 00:09:53,700 --> 00:09:54,940 Hakai, can you get that in? 95 00:09:54,940 --> 00:09:56,400 I'm not ignoring it. 96 00:09:57,820 --> 00:10:01,080 While we're waiting, I did have a question. 97 00:10:01,080 --> 00:10:25,120 When you were talking about the previous CVE fix where they just simply put a warning up to install the bad driver, or before they installed drivers, it didn't seem like there was anything other than just telling the user that there's a risk to installing a driver writ large. 98 00:10:25,120 --> 00:10:29,020 There was nothing that said whether a driver could be good or bad. 99 00:10:29,020 --> 00:10:32,440 Was that your take of it? 100 00:10:32,540 --> 00:10:36,280 It seems kind of like a punt on Microsoft's part. 101 00:10:37,260 --> 00:10:50,480 Well, because they have certain bars for servicing, or should I say certain bars for vulnerability, what they are considering vulnerability and what they are not considering vulnerability. 102 00:10:50,900 --> 00:10:59,760 So the most important bar for the vulnerability consideration is user interaction. 103 00:10:59,760 --> 00:11:07,960 If you have more than one user interaction, that doesn't seem to be a vulnerability by their view. 104 00:11:08,500 --> 00:11:13,980 So they put up a warning dialogue and they think maybe it's good enough. 105 00:11:15,220 --> 00:11:17,580 That's how it works. 106 00:11:18,240 --> 00:11:26,880 Yeah, but it's not like they're signed where I can trust these drivers and I can't trust those drivers, right? 107 00:11:26,880 --> 00:11:37,260 Well, actually the newer protocol is basically invented for checking the signatures of the drivers. 108 00:11:37,540 --> 00:11:45,100 So that's the implementation of that protocol, the source of the vulnerability. 109 00:11:45,520 --> 00:11:48,980 So that's quite ironic. 110 00:11:53,740 --> 00:11:58,140 Just clarifying for me on that answer. 111 00:11:58,140 --> 00:12:06,600 So the patches that have come out, are they only affecting Windows printing or are those patches also affecting other services and components? 112 00:12:07,680 --> 00:12:13,800 Well, the patch is for the cabinet instruction part of the system. 113 00:12:14,200 --> 00:12:27,380 So the one thing about the cabinet API in Windows is that when you are calling that API, you're actually handing over a few callback functions to that API. 114 00:12:27,380 --> 00:12:33,680 Basically, the API calls you back when it's extracting the files. 115 00:12:34,560 --> 00:12:44,580 And so the vulnerability is actually not inside the cabinet API but the callback that Windows printing is handling to the API. 116 00:12:45,280 --> 00:13:01,140 So the patch actually did fix that vulnerability and whether or not there's other vulnerabilities regarding the cabinet API is basically depends on the user of the API itself. 117 00:13:01,240 --> 00:13:04,940 The API seems secure to me. 118 00:13:08,620 --> 00:13:12,000 Seems like famous last words at a conference like this, right? 119 00:13:12,420 --> 00:13:14,640 Somebody out there is going challenge accepted. 120 00:13:16,660 --> 00:13:20,980 I'm sorry, I think I cut you off in the middle of the question earlier there. 121 00:13:23,510 --> 00:13:29,930 I was going to ask about the... I mean, fundamentally, this is a path transversal bug you found. 122 00:13:29,930 --> 00:13:41,130 But I think you answered it earlier in that the architecture itself seems to have some flaws and the way it trusts things. 123 00:13:41,170 --> 00:13:49,050 And if I had to guess, I'd say that your undisclosed vulnerability you found is probably along the same lines. 124 00:13:49,050 --> 00:13:56,910 Do you think just the actual architecture of that driver handshake is flawed? 125 00:13:59,420 --> 00:14:09,720 Well, I would like to say that the design problem is basically you shouldn't have put that service at such a privileged level. 126 00:14:10,560 --> 00:14:15,640 The printer driver is actually not a device driver traditionally. 127 00:14:15,640 --> 00:14:21,060 A traditional device driver is actually a bunch of DL files, dynamic link files. 128 00:14:21,580 --> 00:14:27,640 That's loaded by the driver, by these prints for the process. 129 00:14:27,740 --> 00:14:34,740 So the fundamental problem is you shouldn't have that much of a privilege by design. 130 00:14:37,480 --> 00:14:49,720 And basically, I think Microsoft may be considering, you know, after all these vulnerabilities recently, they may be considering a redesign or re-architect the entire printing stack. 131 00:14:50,480 --> 00:14:54,880 Maybe that's why we are pushing the patch to some direction. 132 00:14:57,880 --> 00:15:10,520 Kind of off-topic, but you made me wonder, you know, if they're rethinking the design of this, have you done any investigation on how this would impact or is implemented on other operating systems like Linux or Mac OS? 133 00:15:12,680 --> 00:15:15,940 Printing is really a legacy thing. 134 00:15:15,940 --> 00:15:20,640 All operating system kinds of implement is in their place. 135 00:15:20,640 --> 00:15:26,440 We did the research on a few operating systems, but not all. 136 00:15:29,410 --> 00:15:32,220 We did find a few issues. 137 00:15:42,940 --> 00:15:46,840 So basically, yeah, that's all I've got to say. 138 00:15:47,820 --> 00:15:54,140 So I think what we're getting is if you want the real meat and bones about this, you're going to have to keep inviting us back to different dot-coms. 139 00:15:54,980 --> 00:15:56,380 I didn't say that. 140 00:15:57,400 --> 00:16:02,200 No, it sounds like there's definitely a lot more to the research that you guys are doing. 141 00:16:02,200 --> 00:16:04,940 I'm a little scared right now, though, being a Linux user. 142 00:16:05,420 --> 00:16:10,020 Into the research that you guys are doing, what's your next big project? 143 00:16:10,020 --> 00:16:14,060 What is the next thing after this talk is out of the way that you guys are going to delve into? 144 00:16:16,300 --> 00:16:19,640 Operating system has a lot of attacks of this. 145 00:16:20,820 --> 00:16:23,440 Printing is a very small fraction of it. 146 00:16:23,440 --> 00:16:38,580 We did have different kinds of research on, for example, the ALPC, which is a pretty advanced inter-process communication channel on Windows. 147 00:16:39,020 --> 00:16:47,200 We also have COM, which is another IPC channel, a legacy channel on Windows. 148 00:16:47,380 --> 00:16:53,060 And we did find a lot of bugs regarding those two channels. 149 00:16:55,380 --> 00:17:06,000 Basically, we started research from the browser aspect. 150 00:17:06,000 --> 00:17:10,940 So that's how to get out of the browser sandbox. 151 00:17:10,940 --> 00:17:13,160 We started research from there. 152 00:17:13,160 --> 00:17:21,180 And we gradually became more generic, doing research in other parts of the system. 153 00:17:22,100 --> 00:17:29,520 So we did a lot of normal-to-system privilege escalations, basically. 154 00:17:29,900 --> 00:17:34,880 So that's expanding our research throughout the parts of the system. 155 00:17:37,180 --> 00:17:40,480 Obviously, there is a lot more to be researched here. 156 00:17:40,480 --> 00:17:43,900 And I know earlier you said the key point is you have to be curious. 157 00:17:43,900 --> 00:17:46,960 You can't rely on other people's tools. 158 00:17:46,960 --> 00:17:48,180 You have to be willing to write your own. 159 00:17:48,180 --> 00:17:52,500 And you need to know the fundamentals better even than the developers do. 160 00:17:52,600 --> 00:17:56,180 But if somebody out there is going like, OK, you know what, I'm really interested in this. 161 00:17:56,180 --> 00:17:57,980 This is something that I want to get into. 162 00:17:57,980 --> 00:18:02,660 What resources, recommendations would you give them as a starting point? 163 00:18:02,660 --> 00:18:05,920 You know, you guys started in the browser, but you already had that fundamental knowledge. 164 00:18:05,920 --> 00:18:07,440 Where could they get started? 165 00:18:08,680 --> 00:18:13,760 Well, the starting point can be anywhere you like to. 166 00:18:13,760 --> 00:18:16,940 But the curiosity part is the most important thing. 167 00:18:16,940 --> 00:18:21,220 You have to have a curiosity in how things work. 168 00:18:21,220 --> 00:18:25,080 How they work internally. 169 00:18:25,280 --> 00:18:31,820 And just play with the tool and get used to it. 170 00:18:31,820 --> 00:18:37,840 And just looking at other parts of the system. 171 00:18:37,840 --> 00:18:39,400 Just look away. 172 00:18:39,640 --> 00:18:45,660 You have to have in-depth research than average engineers. 173 00:18:45,660 --> 00:18:55,260 The engineers basically have different types of requirements. 174 00:18:55,260 --> 00:19:01,060 They basically want to complete a certain feature in a certain time frame. 175 00:19:01,360 --> 00:19:03,000 Within a certain budget. 176 00:19:03,000 --> 00:19:04,940 But security research is different. 177 00:19:06,340 --> 00:19:11,140 They do have the requirement of getting deeper than others. 178 00:19:11,140 --> 00:19:12,760 Other competitors. 179 00:19:14,720 --> 00:19:18,380 The more deep you get, the more bugs you can find. 180 00:19:21,320 --> 00:19:25,420 That's a great way to just sum up what a security researcher does right there. 181 00:19:26,300 --> 00:19:29,080 We're kind of coming to the end of our time together. 182 00:19:29,080 --> 00:19:32,560 And I was wondering, is there anything that maybe didn't make it into y'all's talk? 183 00:19:32,560 --> 00:19:37,440 Or anything that you wish you would have focused more around that you're hoping to let people know about now? 184 00:19:38,600 --> 00:19:44,480 Well, we actually did two submissions, as I said earlier. 185 00:19:44,480 --> 00:19:52,740 And that part that didn't make it into this talk was, how do I find these similar bugs? 186 00:19:52,740 --> 00:19:53,800 Generically. 187 00:19:55,440 --> 00:19:57,060 Even with automation. 188 00:19:57,060 --> 00:20:01,920 Like , without even intervention. 189 00:20:01,920 --> 00:20:05,240 That's the thing I want to talk about. 190 00:20:05,560 --> 00:20:06,880 Maybe next time. 191 00:20:06,880 --> 00:20:09,480 Or other places. 192 00:20:11,380 --> 00:20:15,540 But that's a really fun thing to talk about. 193 00:20:16,440 --> 00:20:23,140 If people have more questions or anything they'd like to get a hold of you with about, what's the best way for them to reach out to you? 194 00:20:23,140 --> 00:20:28,160 You can add us as friends on Discord or maybe Twitter. 195 00:20:28,160 --> 00:20:32,160 Twitter accounts are on the slides. 196 00:20:33,280 --> 00:20:39,000 You can DM us any questions or thoughts. 197 00:20:39,260 --> 00:20:43,760 You can DM us and we are glad to answer. 198 00:20:44,160 --> 00:20:45,440 That sounds great. 199 00:20:45,440 --> 00:20:47,800 Well, I don't see any more questions coming in. 200 00:20:47,800 --> 00:20:49,560 And we're kind of already towards the end of time anyway. 201 00:20:49,560 --> 00:20:52,440 So thank you guys for coming and sharing your talk with us. 202 00:20:52,440 --> 00:20:55,220 And scaring us about all the other things you haven't released yet. 203 00:20:55,220 --> 00:20:56,200 That would be great. 204 00:20:57,740 --> 00:20:59,020 Y'all have a great night. 205 00:20:59,020 --> 00:21:03,360 Thank you.