1 00:00:00,000 --> 00:00:00,260 All right. 2 00:00:00,280 --> 00:00:02,440 So today we're going to talk about hardware backdrying. 3 00:00:04,280 --> 00:00:07,840 So just a bit of disclaimer, I'm not a terrorist. 4 00:00:08,240 --> 00:00:13,260 That being said, if you read the abstract, you already know that everything is open source, 5 00:00:13,460 --> 00:00:15,280 so like there is nothing much to release. 6 00:00:17,720 --> 00:00:23,980 The whole point of this talk is to demonstrate something you somehow probably know a little 7 00:00:23,980 --> 00:00:28,840 bit, which is that the x86 architecture is massively plagued by legacy. 8 00:00:30,860 --> 00:00:35,180 I still think the talk is relevant because we're trying to ‑‑ I mean, you will see 9 00:00:35,180 --> 00:00:41,740 that the backdoor we're doing is orders of magnitude better than existing work. 10 00:00:42,940 --> 00:00:43,660 All right. 11 00:00:46,220 --> 00:00:52,620 So we'll start by a bit of architecture, trying to introduce a problem and ‑‑ or we engineer 12 00:00:52,620 --> 00:00:53,280 this backdoor. 13 00:00:53,380 --> 00:00:53,960 Okay. 14 00:00:53,980 --> 00:01:01,320 We'll do a bit of an overview of the state of the art, introduce you to the proper backdoor 15 00:01:01,320 --> 00:01:06,820 itself, and we'll discuss a bit of cryptography and why it's actually not helping. 16 00:01:08,460 --> 00:01:13,460 And to finish, I'll explain to you like how we can extend this work to backdoor like a 17 00:01:13,460 --> 00:01:14,840 proper nation state. 18 00:01:15,260 --> 00:01:15,680 Woohoo. 19 00:01:16,620 --> 00:01:17,260 All right. 20 00:01:17,280 --> 00:01:20,500 So this is a sexy slide, or maybe not so much. 21 00:01:22,340 --> 00:01:29,800 I basically started working with computers by disassembling viruses and reading assembly 22 00:01:30,280 --> 00:01:31,320 when I was like 15. 23 00:01:32,080 --> 00:01:35,280 And nobody told me it was hard, so like it didn't seem as such. 24 00:01:37,440 --> 00:01:40,400 I'm a big fan of like anything low level, to be honest. 25 00:01:40,700 --> 00:01:44,540 I think hardware backdooring is like pretty much the limit where you can go. 26 00:01:46,300 --> 00:01:47,280 So what's relevant? 27 00:01:47,640 --> 00:01:50,340 We do ‑‑ I mean, I'm part of the organization. 28 00:01:50,500 --> 00:01:53,360 I'm part of the organization of a conference in Paris, it's called Aki to Argosome. 29 00:01:53,980 --> 00:01:54,520 All right. 30 00:01:54,540 --> 00:02:02,560 So for the sexy slide that the Aki to Argosome T‑shirt, if you're fond of cryptography, 31 00:02:02,820 --> 00:02:05,020 anything low level, feel free to submit. 32 00:02:06,160 --> 00:02:11,840 And if you don't understand what I'm saying, I'm French, I learned English in India, and 33 00:02:11,840 --> 00:02:12,560 I live in Australia. 34 00:02:12,760 --> 00:02:17,540 So that's three degrees in, as pure as it gets. 35 00:02:17,800 --> 00:02:20,480 So if at any point in time, like, you're already done. 36 00:02:20,480 --> 00:02:23,280 If you do not understand what I'm saying, please ask me to reformulate. 37 00:02:24,280 --> 00:02:24,900 All right. 38 00:02:24,980 --> 00:02:26,120 Let's start with a bit of fun. 39 00:02:27,220 --> 00:02:34,320 So in case you've been in Bernadine for like the past few months, there was a report for 40 00:02:34,320 --> 00:02:39,000 the U.S. Senate where they basically realized that every computer is built in China nowadays. 41 00:02:39,820 --> 00:02:45,940 I mean, even if it's designed in western countries, it's essentially manufactured based on components 42 00:02:45,940 --> 00:02:47,860 coming from China anyway. 43 00:02:48,320 --> 00:02:50,460 So this leads to a bit of fun. 44 00:02:51,200 --> 00:02:55,800 I mean, how can we guarantee that this hardware is not back-door? 45 00:02:59,320 --> 00:03:05,280 So a bit more fun, like, if you've read the media recently, like, it's very much in the 46 00:03:05,280 --> 00:03:06,880 air to say that China is back-dooring. 47 00:03:07,440 --> 00:03:11,700 I'd like to say ‑‑ I mean, I'd like to go a bit more technical, like, is it actually 48 00:03:11,700 --> 00:03:12,080 credible? 49 00:03:12,340 --> 00:03:14,020 Is it possible to back-door hardware at all? 50 00:03:15,440 --> 00:03:20,440 For instance, in France last week, the government realized that all the root systems in the 51 00:03:20,460 --> 00:03:27,360 clusters we have on our core network is basically UI or ZTE, and they said, wow, that's scary. 52 00:03:27,560 --> 00:03:30,000 Let's change everything and buy Alcatel Lucent instead. 53 00:03:32,580 --> 00:03:33,420 All right. 54 00:03:33,420 --> 00:03:34,400 So enough fun. 55 00:03:34,800 --> 00:03:36,400 Let's talk a bit about architecture. 56 00:03:36,920 --> 00:03:39,420 So let me introduce you to the problem. 57 00:03:40,200 --> 00:03:41,460 This is the problem. 58 00:03:43,380 --> 00:03:47,520 So this is, of course, the x86 architecture. 59 00:03:48,640 --> 00:03:49,700 All right. 60 00:03:49,860 --> 00:03:50,440 All right. 61 00:03:50,460 --> 00:03:54,760 So it was designed in 1981, and it has evolved very little. 62 00:03:55,860 --> 00:04:03,260 So basically you have to the bottom, you have what we call the super I.O., to which the 63 00:04:03,260 --> 00:04:07,400 very slow peripherals are connected, like a flippy, the mouse, the keyboard. 64 00:04:08,440 --> 00:04:10,740 Then you have the source bridge, which is a bit faster. 65 00:04:11,820 --> 00:04:18,660 Typically your Ethernet card, your CD ROM, your sound driver would be there. 66 00:04:18,660 --> 00:04:23,860 Then you have the north bridge, where much faster peripherals are connected. 67 00:04:24,220 --> 00:04:26,860 So typically following the PCI extension. 68 00:04:27,980 --> 00:04:33,320 So it could be like, you know, gigabyte, Ethernet, WiMAX, or video. 69 00:04:35,080 --> 00:04:36,320 So what's the big problem? 70 00:04:36,620 --> 00:04:37,660 There are actually two problems. 71 00:04:38,100 --> 00:04:43,040 The first problem is that at each layer, so say you take the soft bridge. 72 00:04:43,860 --> 00:04:47,080 You have a CD ROM driver, and you have an Ethernet card. 73 00:04:47,540 --> 00:04:48,640 So they are like this. 74 00:04:48,660 --> 00:04:51,120 They are very much physical peripherals. 75 00:04:51,580 --> 00:05:03,980 They both contain firmware, which allow to, I mean, control the behavior and allow software, 76 00:05:04,260 --> 00:05:07,760 I mean, from an operating system to actually interact with them. 77 00:05:08,720 --> 00:05:17,260 The big problem is that your CD ROM driver can't control your network card and vice versa, 78 00:05:17,360 --> 00:05:17,780 actually. 79 00:05:18,660 --> 00:05:20,020 And this is a bit unexpected. 80 00:05:20,880 --> 00:05:27,200 Another problem that we will discuss later is that the TPM chip is actually very low 81 00:05:27,200 --> 00:05:27,940 in the full chain. 82 00:05:28,320 --> 00:05:36,040 It's a passive chip, unlike from game consoles, for instance, where if you remove the crypto 83 00:05:36,040 --> 00:05:40,860 chip, or if the software is actually not calling it, the whole thing won't boot. 84 00:05:42,260 --> 00:05:44,680 It's very good, but don't do it. 85 00:05:44,680 --> 00:05:48,640 So then you have a two-way connection, which controls the display interface and, essentially, 86 00:05:48,640 --> 00:05:53,320 It's much like an HSM, really, so it actually also provides functions to do cryptography 87 00:05:53,320 --> 00:05:54,440 and not just the keys. 88 00:05:55,800 --> 00:05:57,800 If you don't want to use it, you don't have to. 89 00:05:58,060 --> 00:06:01,600 So like ‑‑ let me not spoil it. 90 00:06:01,800 --> 00:06:03,380 I'll get back to this later. 91 00:06:05,040 --> 00:06:06,280 A bit of state of the art. 92 00:06:08,400 --> 00:06:15,100 So I mean, going as ‑‑ getting execution as early as possible has been a goal since 93 00:06:15,100 --> 00:06:17,440 pretty much the first viruses. 94 00:06:18,520 --> 00:06:26,420 Brain was the first acknowledged IBM PC virus back in the 80s. 95 00:06:28,220 --> 00:06:33,080 The work which is really relevant to us would be like the 2009 research from call security. 96 00:06:35,740 --> 00:06:42,460 They actually did, in fact, a bios firmware, and they did it the hard way. 97 00:06:42,700 --> 00:06:44,920 Like they took a whole world phoenix. 98 00:06:44,920 --> 00:06:49,720 They identified where is the checksumming function. 99 00:06:50,920 --> 00:06:59,640 They introduced new code inside it, hostile code, and they compensated the checksum. 100 00:07:00,140 --> 00:07:05,200 So in terms of reverse engineering, if you want to go this way, it's going to be pretty 101 00:07:05,200 --> 00:07:07,540 tough to infect a new motherboard. 102 00:07:07,860 --> 00:07:10,740 You need to reverse engineer again, like the whole firmware. 103 00:07:13,460 --> 00:07:14,900 Other work relevant to us. 104 00:07:14,920 --> 00:07:17,660 This is mostly bootkitting, which is something entirely different. 105 00:07:17,920 --> 00:07:19,000 It has nothing to do with the bias. 106 00:07:19,820 --> 00:07:25,540 It's the fact of booting a computer from a CD-ROM or a floppy and patch the kernel 107 00:07:25,540 --> 00:07:26,020 on the fly. 108 00:07:28,120 --> 00:07:30,080 So basically they all work the same way. 109 00:07:31,780 --> 00:07:39,860 You hook in the interrupt vector table, interruption 13, which is anything which is discredited. 110 00:07:40,060 --> 00:07:43,500 So like if you want to write to disk or write from ‑‑ sorry. 111 00:07:43,660 --> 00:07:44,140 Write. 112 00:07:45,320 --> 00:07:51,440 To disk or read from disk in memory, one sector at a time, you do it through interruption 113 00:07:51,440 --> 00:07:51,720 13. 114 00:07:54,480 --> 00:07:59,440 The whole point of the bootloader, which is, you know, the master record of the first 115 00:08:00,920 --> 00:08:04,740 bootable hard drive, is actually to unpack a kernel in memory. 116 00:08:05,600 --> 00:08:10,180 And once this is done, you never use the interrupt vector table again. 117 00:08:12,900 --> 00:08:13,380 Awesome. 118 00:08:13,620 --> 00:08:14,780 There must be a party or something. 119 00:08:14,820 --> 00:08:14,900 Okay. 120 00:08:15,820 --> 00:08:16,700 All right. 121 00:08:16,740 --> 00:08:24,680 So the idea is that if you hook this interruption 13, while the operating system is trying to 122 00:08:24,680 --> 00:08:25,540 load ‑‑ sorry. 123 00:08:25,660 --> 00:08:30,080 While the bootloader is trying to unpack a kernel in memory, you can actually hook 124 00:08:30,080 --> 00:08:31,040 any read or write. 125 00:08:31,640 --> 00:08:34,280 And you can patch the kernel on the fly. 126 00:08:34,480 --> 00:08:36,520 And you don't have to touch the file system at all. 127 00:08:40,400 --> 00:08:40,840 Okay. 128 00:08:40,920 --> 00:08:44,600 So now let me get to the meat. 129 00:08:44,740 --> 00:08:44,880 Okay. 130 00:08:49,500 --> 00:08:56,380 So pretty much like you, I guess, I'm not being paid to actually write malware. 131 00:08:59,300 --> 00:09:03,200 That being said, let's imagine for a minute that we want to do malware. 132 00:09:04,400 --> 00:09:08,880 If I have to do one, I'd better make one which is actually awesome because I don't 133 00:09:08,880 --> 00:09:09,640 want to do that again. 134 00:09:10,820 --> 00:09:12,100 So I want it to be persistent. 135 00:09:12,100 --> 00:09:17,640 Not just between boots, but like even if you remove, you know, physical parts of your 136 00:09:17,640 --> 00:09:21,480 machine or if you remove the hard drive entirely. 137 00:09:22,000 --> 00:09:27,700 Like if you replace the entire operating system, I still want to get to have persistence. 138 00:09:29,860 --> 00:09:31,520 The stuff should be still. 139 00:09:31,660 --> 00:09:38,120 So we see that it's actually possible to make a malware where 0% of hostile code is on the 140 00:09:38,120 --> 00:09:38,380 machine. 141 00:09:38,560 --> 00:09:41,140 Not even on firmwares and PCI firmwares, et cetera. 142 00:09:42,360 --> 00:09:45,520 Ideally, it should be portable as in OS independent. 143 00:09:46,860 --> 00:09:48,620 Of course, we want remote access. 144 00:09:48,920 --> 00:09:53,920 We want to be able to push remote updates even if we're going to backdoor essentially 145 00:09:55,340 --> 00:09:58,380 PCI expansion ROMs and the BIOS firmware. 146 00:10:00,340 --> 00:10:00,820 Okay. 147 00:10:00,880 --> 00:10:05,660 When you come to state level quality, there are basically two features which make it 148 00:10:05,660 --> 00:10:07,480 like, all right, this is usable by state. 149 00:10:07,480 --> 00:10:09,560 Let's say, anywhere in the state, it's usable by state. 150 00:10:09,560 --> 00:10:11,060 The first one is plausible-deniability. 151 00:10:11,820 --> 00:10:19,640 It's the fact of saying, well, you know, it's offering an alternative to explain why something 152 00:10:19,640 --> 00:10:21,520 went bad in case you discovered. 153 00:10:23,160 --> 00:10:26,340 Saying for instance, oh, you know, it was a mistake or something like that. 154 00:10:26,620 --> 00:10:31,360 And this second alternative allows you to, you know, in case people really insist, like, 155 00:10:31,360 --> 00:10:34,580 oh, you tried to do evil, you can say, nah, you're a conspirationalist. 156 00:10:35,220 --> 00:10:35,700 . 157 00:10:36,980 --> 00:10:37,460 . 158 00:10:37,460 --> 00:10:42,480 is nonattribution, which is really saying it wasn't me. Usually nowadays it's like it 159 00:10:42,480 --> 00:10:49,820 wasn't me, it was China. If we make a backdoor, I want it to cross 160 00:10:49,820 --> 00:10:56,520 network parameters, bypass firewalls, authentication proxies, et cetera, because they are so abundant 161 00:10:56,520 --> 00:11:02,640 in corporations nowadays. I want some degree of redundancy and it's needless to say I don't 162 00:11:02,640 --> 00:11:11,240 want it to be detected by any antivirus. Let me explain it works roughly. Sorry. I'm 163 00:11:11,240 --> 00:11:16,920 a bit sick. This is a typical corporate network. You 164 00:11:16,920 --> 00:11:24,140 have the users. You have some toys in the middle. Can be like IDS, IPS, you know, gateway 165 00:11:24,140 --> 00:11:32,140 with firewalls, sorry, with antiviruses, whatever. And you have firewalls with proper DNS segmentation 166 00:11:32,140 --> 00:11:37,020 authentication, which allows only HTTP after authentication. So basically, if you want 167 00:11:37,020 --> 00:11:41,220 to reach the network, it's going to be a bit tough. It's supposed to work this way. The 168 00:11:41,220 --> 00:11:46,320 user is supposed to authenticate against a firewall before reaching the Internet. So 169 00:11:46,320 --> 00:11:53,560 this is how it's supposed to work. What we're really going to try to do is this. We're going 170 00:11:53,560 --> 00:12:03,320 to come with a Wi-Fi router, have the BIOS try to connect to this Wi-Fi router. And if we do 171 00:12:03,320 --> 00:12:12,660 that, like basically all the IPS, IDS, only parts you may find in the middle are basically 172 00:12:12,660 --> 00:12:17,280 going to be useless. That being said, if it doesn't work for whatever reason, we can still 173 00:12:17,280 --> 00:12:23,400 default to using Ethernet. Okay. So let's go to the design. 174 00:12:26,100 --> 00:12:36,000 So instead of starting my malware from scratch, like most virus authors do, I took advantage 175 00:12:36,000 --> 00:12:41,460 of open source software. And I think it's actually a massively good idea for several reasons. 176 00:12:43,220 --> 00:12:49,520 So the base component is core boot, which is the back end of a BIOS. Basically, when you 177 00:12:49,520 --> 00:12:53,540 boot your computer, the first software which is actually executing in memory, the first 178 00:12:53,560 --> 00:12:58,640 memory is responsible for discovering where is the RAM, where is the hard drive, where 179 00:12:58,640 --> 00:13:05,120 are the peripherals. So this is the role of core boot. CBIOS is the front end of the 180 00:13:05,120 --> 00:13:12,580 BIOS. In the core boot language, it's a payload. But I use another ‑‑ I mean, I will define 181 00:13:12,580 --> 00:13:17,920 something else as a payload. So CBIOS is really responsible for creating an interop 182 00:13:17,920 --> 00:13:22,680 vector table in memory. And if you have core boot plus CBIOS, you can actually boot an 183 00:13:22,680 --> 00:13:23,300 operating system. 184 00:13:24,140 --> 00:13:29,540 And an amazing thing about core boot is that it's super modular. And you can actually embed 185 00:13:29,540 --> 00:13:37,160 any PCI firmware to control, like, peripherals directly inside the main firmware. So I'm 186 00:13:37,160 --> 00:13:42,440 using one which is called IPXE, which is an extension of the PXE standard, which instead 187 00:13:42,440 --> 00:13:49,520 of doing just DHCP and FTP, can actually boot an operating system remotely over, say, HTTP. 188 00:13:50,460 --> 00:13:53,280 And instead of using just DHCP and FTP, you can actually boot an operating system remotely 189 00:13:53,300 --> 00:14:02,460 over Ethernet. IPXE allows you to use Wi‑Fi, Wi‑Max. It knows a bunch of protocols, 190 00:14:02,840 --> 00:14:12,660 like it has a full TCP stack, and even higher protocols, like it has FTP, HTTP, even HTTPS. 191 00:14:14,220 --> 00:14:20,200 So that's pretty awesome. Like, you don't have to do all that yourself again. And then 192 00:14:20,200 --> 00:14:23,280 we use a bunch of payloads, which are basically boot kits. I get back to you when I'm done. 193 00:14:23,300 --> 00:14:23,600 Back to this. 194 00:14:26,380 --> 00:14:31,480 So I was mentioning nonattribution. One of the benefits of using open source is that 195 00:14:31,480 --> 00:14:37,440 it wasn't written by me. It's actually written by something else, but really. In terms of 196 00:14:37,440 --> 00:14:43,720 development, I mean, if you ask journalists, like, yeah, Stuxnet took years to develop 197 00:14:43,720 --> 00:14:50,500 by a whole team of specialists. So I did this by myself in four weeks. And I think 198 00:14:50,500 --> 00:14:53,220 it's really, really, really, really, really hard to detect as malicious. 199 00:14:53,300 --> 00:14:59,320 Because all those components are actually not malicious, apart from the payload. But, 200 00:14:59,420 --> 00:15:06,420 well, there is a trick. So it works like this. We're going to flash the bias. Let's assume 201 00:15:06,420 --> 00:15:11,780 we are a manufacturer in China or whatever. Or I'm just part of the supply chain delivering 202 00:15:11,780 --> 00:15:22,120 your laptop. Like, when you buy your laptop, anybody who touches it before you can actually 203 00:15:22,120 --> 00:15:22,660 backdoor it. 204 00:15:24,360 --> 00:15:30,760 So we're going to flash not only the main bias, but also a few PCI expansion ROMs. Like 205 00:15:30,760 --> 00:15:36,380 I explained to you, if we flash only the CD-ROM drive, we can actually control the network 206 00:15:36,380 --> 00:15:44,000 card. The idea is to, in case the bias is ever flashed by someone for normal maintenance, 207 00:15:44,780 --> 00:15:50,900 we can flash it back using a PCI expansion ROM. 208 00:15:53,300 --> 00:15:58,460 We're going to boot the payload over the network, typically over HTTPS. Like I explained 209 00:15:58,460 --> 00:16:04,320 before, we're going to try to use Wi-Fi or WiMAX if it's available. Which leaves no trace 210 00:16:04,320 --> 00:16:14,640 on the corporate network. So it pretty much looks like this. The core, in blue, is made 211 00:16:14,640 --> 00:16:20,480 of core boot, then C-Bias, which is the front end, and IPXC, which is really a PCI expansion 212 00:16:20,480 --> 00:16:23,280 ROM. But also embedded in the main firmware of the laptop. So it's a really good idea. 213 00:16:23,280 --> 00:16:28,000 I mean, in the main firmware, we're going to put in the BIOS. 214 00:16:29,480 --> 00:16:32,800 And then the only piece which is really malicious is the boot kit. 215 00:16:33,740 --> 00:16:38,660 But the boot kit never touches the disk and it's not embedded in your hardware, in your 216 00:16:38,660 --> 00:16:41,680 PCI expansion ROM or in your BIOS ROM either. 217 00:16:43,000 --> 00:16:45,240 Instead, so execution goes like this. 218 00:16:45,240 --> 00:16:53,540 So your CPU starts in 8086 compatibility mode, in real mode, which is essentially a legacy 219 00:16:53,540 --> 00:16:53,920 thing. 220 00:16:55,540 --> 00:17:00,860 I mean, for you, if you have done, like, programming under MS-DOS, you know how painful it is 221 00:17:00,860 --> 00:17:01,620 to work with this. 222 00:17:01,860 --> 00:17:03,180 You don't have multitasking. 223 00:17:03,440 --> 00:17:06,960 You have only access to the first megabyte of memory also. 224 00:17:09,520 --> 00:17:15,220 So core boot gives execution to CBIOS, which is going to set the integration. 225 00:17:15,240 --> 00:17:20,340 The core boot itself is going to call IPXE to perform network booting. 226 00:17:20,980 --> 00:17:28,700 And the only malicious piece is going to be fetched every time you boot over Wi-Fi or 227 00:17:28,700 --> 00:17:31,620 Ethernet, if nothing else is available, over HTTPS. 228 00:17:31,940 --> 00:17:39,260 So there again, in terms of, you know, analyzing network traffic, deep packet analysis, this 229 00:17:39,260 --> 00:17:40,320 is just not going to work. 230 00:17:41,020 --> 00:17:44,620 We can use, actually, client-side certificates to ensure that. 231 00:17:44,700 --> 00:17:45,220 Okay. 232 00:17:45,240 --> 00:17:56,940 is no man in the middle during the HTTPS connection. Any questions so far? Okay. So in terms of 233 00:17:57,920 --> 00:18:04,680 the features we're going to embed in Rackchassel. We're going to try to remove the NX bit. If 234 00:18:04,680 --> 00:18:12,360 you manage to do this, every mapping becomes executable again. We're going to try to make 235 00:18:12,360 --> 00:18:19,060 every mapping in ring zero writable. We're going to try to remove CPU updates. So I don't 236 00:18:19,060 --> 00:18:24,820 know if you're really familiar with this. Every CPU vendor has basically a way to correct 237 00:18:25,340 --> 00:18:33,580 mistakes, like hardware has bugs also. If you look at the errata in the Intel CPU, it 238 00:18:33,580 --> 00:18:42,260 actually has a bunch of small mistakes which allow to modify the control flow of the 239 00:18:42,260 --> 00:18:49,180 execution. So it's actually big mistakes. When this happens, instead of replacing every 240 00:18:49,180 --> 00:18:55,480 physical CPU, what they do is pushing a small microcode, which is digitally signed by the 241 00:18:55,480 --> 00:19:04,420 manufacturer, typically Intel or AMD, inside the CPU and compensate for this problem. This 242 00:19:04,420 --> 00:19:11,060 is typically performed at BIOS level. We're going to remove anti-SMM protection. 243 00:19:12,840 --> 00:19:20,120 SMM, which stands for system management mode. It's like ring minus zero or patch mode, really. 244 00:19:21,960 --> 00:19:30,140 If you're familiar with the problem introduced by Duflo regarding SMM, in 2006 and 2009, 245 00:19:30,860 --> 00:19:37,020 there is basically a generic exploit locally, which will allow you to get to ring minus 246 00:19:37,020 --> 00:19:41,500 two. So even the operating system will not know what you're doing. And you're switching 247 00:19:41,500 --> 00:19:50,080 essentially to a 16-bit mode, which has higher privileges than the kernel. So like you can 248 00:19:50,080 --> 00:19:57,480 patch back the kernel, if you will. We're going to try to disable randomization. And eventually 249 00:19:57,480 --> 00:20:02,800 we're going to load a boot kit. So the boot kit was actually contributed by Piotr Bagnard. 250 00:20:03,040 --> 00:20:08,760 If you're familiar with COMBOOT, it's a modified version of COMBOOT to like remove the fancy 251 00:20:08,760 --> 00:20:11,060 displays and stuff, but essentially it's COMBOOT. 252 00:20:12,740 --> 00:20:19,860 All right. Let's do it. So if you want to remove the NX bit, first off, the NX bit is a model 253 00:20:19,860 --> 00:20:29,720 specific register. So if you read the EMD 64 manual, I mean, EMD was the first one to actually 254 00:20:30,600 --> 00:20:36,880 introduce an NX bit in 97. So it's pretty smart to look at how they did it before it was actually 255 00:20:36,880 --> 00:20:37,620 copied by Intel. 256 00:20:39,740 --> 00:20:41,000 So there is a 257 00:20:41,500 --> 00:20:51,360 specific bit in a model specific register, which is called the Extended Feature Enable 258 00:20:51,360 --> 00:21:01,460 Register. You hardly ever use that, honestly. If you flip the bit 11, every mapping becomes 259 00:21:01,460 --> 00:21:11,260 executable again. So like to do this, you must ‑‑ you first must make sure that your 260 00:21:11,500 --> 00:21:17,160 CPU actually does support NX. And essentially what you do is like the three last lines. 261 00:21:17,380 --> 00:21:24,460 You read the content of this model specific register. You flip bit 11, and you write 262 00:21:24,460 --> 00:21:30,100 it back. The only difference is that we don't do MOV with model specific registers. We use 263 00:21:30,100 --> 00:21:41,480 those RGMSR and WRMSR instructions to read and write to model specific registers. So 264 00:21:41,500 --> 00:21:51,780 this is only going to work if your CPU supports it. Okay. Changing every mapping, this is a 265 00:21:51,780 --> 00:21:58,660 difficult part, right? After we have the demos and the fancy shit. So basically in CR0, 266 00:21:58,920 --> 00:22:07,120 Control Register 0, B16 defines if what is mapped in memory is writeable or not. So it's 267 00:22:07,120 --> 00:22:11,480 actually something pretty common in viruses and in exploitation. If you have a very complex 268 00:22:11,480 --> 00:22:15,500 kernel, if you've seen last year at DEF CON Dan Rosenberg talking about remote kernel 269 00:22:15,500 --> 00:22:23,380 exploitation, he explained how to do it. So you read Control Register 0 into AEX, you flip the 270 00:22:23,380 --> 00:22:28,020 bit in question, you write it back, and that's it. You just ‑‑ every mapping just became 271 00:22:28,020 --> 00:22:34,260 writeable in ring 0. So it doesn't work for user LAN, just for ring 0. But like if ever you 272 00:22:34,260 --> 00:22:38,740 have a vulnerability affecting the kernel, you're going to be bank vulnerable. It's going to be a 273 00:22:38,740 --> 00:22:39,760 lot easier to exploit. 274 00:22:41,660 --> 00:22:49,640 Removing CPU updates. That's pretty easy. You just remove the microcodes from core boot and 275 00:22:49,640 --> 00:22:58,680 like there is nothing else to do. Regarding SMM, so typically the protection against SMM is 276 00:22:58,680 --> 00:23:09,000 to set a bit, which is called DLOCK, which prevents you to talk ever again to ‑‑ I mean, to 277 00:23:09,000 --> 00:23:11,460 switch ever again to system management mode when you're working on something. So if you're 278 00:23:11,480 --> 00:23:16,660 working on something and you trigger an SME. So since core boot actually does not support this 279 00:23:17,000 --> 00:23:20,320 feature, we have nothing to do, and the shell code to do it is just a NOP. 280 00:23:23,960 --> 00:23:33,060 Disable ASLR. All right. That's tougher. It's very much OS dependent. Because, I mean, 281 00:23:33,580 --> 00:23:39,660 hardware is not responsible for randomization. It's very much a software thing. The idea is that 282 00:23:39,660 --> 00:23:41,100 if you want full ASLR ‑‑ 283 00:23:41,480 --> 00:23:46,420 It has to be done in kernel land. If you don't have full randomization, it can actually 284 00:23:46,420 --> 00:23:53,160 be done in user land by patching the dynamic linker like Stefan did on iPhone, for instance. 285 00:23:54,140 --> 00:24:00,000 But if you want full ASLR, like the base address of your main binary has to be randomized, 286 00:24:00,480 --> 00:24:07,100 and only the kernel can do this. So the idea is actually to patch the seed, which is going 287 00:24:07,100 --> 00:24:10,240 to be used to create this randomization. 288 00:24:10,240 --> 00:24:17,100 And if you patch this seed, so it's been identified, for instance, for Windows 7 by Kumar and Kumar 289 00:24:17,100 --> 00:24:24,240 at in 2010, if you patch this seed with a known value, your mapping is going to be repeatable 290 00:24:24,820 --> 00:24:29,860 all the time. So what happened is that there is no randomization anymore. 291 00:24:31,640 --> 00:24:38,360 So if we manage to get all of this down, we have permanent lowering of the security 292 00:24:38,360 --> 00:24:40,180 of any operation. 293 00:24:40,240 --> 00:24:44,520 So what we're doing is we're actually lowering the security of the hardware. 294 00:24:45,000 --> 00:24:49,740 Like if we remove the CPU updates, what we're really lowering is the security of the hardware. 295 00:24:51,160 --> 00:24:57,720 And since NX was basically introduced in 97, you're back to the security of 97, which 296 00:24:57,720 --> 00:25:02,940 we ‑‑ with the knowledge we have of exploitation today, it's Christmas time. 297 00:25:06,840 --> 00:25:15,240 Indeed, since we do this in the firmware embedded in your hardware, even if you change, say, 298 00:25:15,400 --> 00:25:20,900 your hard drive entirely, or you replace the operating system, we still have persistence. 299 00:25:24,240 --> 00:25:29,240 Just a little bit more of Fiori, and then we go, I promise, to the demos. 300 00:25:30,140 --> 00:25:32,920 So currently, the boot kit I'm using is called Fiori. 301 00:25:32,940 --> 00:25:34,640 It's a slightly modified version. 302 00:25:35,040 --> 00:25:39,220 So it's capable of booting any version of Windows, 32 or 64 bit. 303 00:25:40,740 --> 00:25:50,600 That being said, if you want to be able to ‑‑ I mean, when Windows 8, for instance, is going to be released, 304 00:25:51,060 --> 00:25:53,960 we want to be capable of owning this. 305 00:25:54,240 --> 00:26:01,740 So instead of embedding Chrome boot directly into core boot, into the BIOS firmware, which we could do, 306 00:26:02,300 --> 00:26:02,920 it's a much easier way. 307 00:26:02,940 --> 00:26:07,180 It's a much better idea to do it remotely and to fetch it every time at boot time. 308 00:26:14,120 --> 00:26:14,940 Sorry about this. 309 00:26:16,600 --> 00:26:19,020 So we write nothing to the hard drive. 310 00:26:19,480 --> 00:26:21,920 So there is zero evidence on the file system. 311 00:26:22,580 --> 00:26:27,120 Like I told you, we try to have as little evidence on the network also as possible. 312 00:26:29,320 --> 00:26:34,260 The code which is flashed on the motherboard or on the PCI devices is not hostile. 313 00:26:34,620 --> 00:26:37,800 So there is zero reason for an antivirus to spot it as hostile. 314 00:26:38,140 --> 00:26:39,940 And if they do, it's actually a false positive. 315 00:26:44,000 --> 00:26:44,600 All right. 316 00:26:44,680 --> 00:26:45,720 I'll get back to the rest later. 317 00:26:46,920 --> 00:26:51,960 So I think it's actually a good approach to start using open source to make viruses. 318 00:26:53,160 --> 00:26:57,100 In terms of portability, core boot is capable of ‑‑ I mean, it's a good approach to start using open source to make viruses. 319 00:26:57,100 --> 00:26:58,720 I mean, it's supporting ‑‑ let me show you. 320 00:26:59,420 --> 00:27:08,040 We said the state of the art, the work from core security is to support one BIOS, which is like several motherboards. 321 00:27:13,340 --> 00:27:15,780 Core boot is actually supporting that many. 322 00:27:18,520 --> 00:27:24,020 So I had nothing to do, like ‑‑ all right. 323 00:27:24,040 --> 00:27:25,100 So this is pretty epic. 324 00:27:27,100 --> 00:27:29,840 The amount of reverse engineering they had to do is actually massive. 325 00:27:30,080 --> 00:27:32,700 Like for most of them, they don't even have the data sheets. 326 00:27:33,280 --> 00:27:40,120 What they do is they use a physical device which just gives you the last error code. 327 00:27:40,620 --> 00:27:43,460 So imagine trying to port a BIOS with that much information. 328 00:27:44,000 --> 00:27:44,660 It's sick. 329 00:27:46,120 --> 00:27:48,940 Anyway, and the good thing is that I don't have to maintain my back door. 330 00:27:49,040 --> 00:27:49,720 They do it for me. 331 00:27:51,060 --> 00:27:56,400 In terms of modularity, like we said, we can embed everything inside the BIOS itself or put several components. 332 00:27:56,640 --> 00:27:57,080 So I think that's a good approach. 333 00:27:57,100 --> 00:28:07,560 On the PCI firmware, on the BIOS itself, and this gives us a degree of repeatability, if you will. 334 00:28:07,780 --> 00:28:13,280 And in terms of network stack, I don't know if you've ever done any kind of programming in real mode. 335 00:28:13,480 --> 00:28:19,920 But having a ‑‑ trying to do a TCP connection is virtually impossible because you don't have multitasking. 336 00:28:21,460 --> 00:28:23,420 So what they do is actually cheating. 337 00:28:23,740 --> 00:28:26,380 They switch to protected mode. 338 00:28:27,900 --> 00:28:30,360 To be able to have multitasking, et cetera. 339 00:28:30,620 --> 00:28:36,060 And then they go back to real mode before transferring execution to the master boot record. 340 00:28:36,520 --> 00:28:38,900 From the master boot record perspective, it's invisible. 341 00:28:41,740 --> 00:28:42,400 All right. 342 00:28:42,400 --> 00:28:45,960 Let me tell you a bit of the configuration files of IPXE. 343 00:28:47,000 --> 00:28:48,540 I think I'm going super fast. 344 00:28:49,320 --> 00:28:49,960 All right. 345 00:28:51,540 --> 00:28:54,480 So we can try to get DHCP. 346 00:28:54,780 --> 00:28:56,260 And if it fails, we can default. 347 00:28:56,380 --> 00:28:58,380 We can default to a static IP. 348 00:29:00,940 --> 00:29:03,000 We can do awesome stuff with web application. 349 00:29:03,340 --> 00:29:06,700 Like we can authenticate against web application. 350 00:29:07,180 --> 00:29:08,420 We can send parameters. 351 00:29:09,460 --> 00:29:15,320 It has actually a few macros, like how to send your IP address and your Mac to a web page on the Internet. 352 00:29:16,380 --> 00:29:18,280 So from there, we can send e‑mails. 353 00:29:18,420 --> 00:29:19,320 We can do router farming. 354 00:29:20,180 --> 00:29:22,480 The image mediation is limited, really. 355 00:29:22,480 --> 00:29:25,440 We can even change the boot loader. 356 00:29:25,920 --> 00:29:31,100 Change the configuration file of IPXE from another server on the Internet. 357 00:29:31,320 --> 00:29:33,000 Which avoids us to hard code anything. 358 00:29:36,860 --> 00:29:41,540 Then when you're happy with all that stuff, you say actually, oh, I changed my mind. 359 00:29:41,660 --> 00:29:44,100 And let me actually boot the proper boot kit. 360 00:29:44,540 --> 00:29:46,100 Which is really made of two parts. 361 00:29:46,340 --> 00:29:46,980 Mem disk. 362 00:29:47,140 --> 00:29:48,120 Which is going to be the kernel. 363 00:29:48,320 --> 00:29:52,180 So you can fetch it, for instance, over FTP from a Chinese website, if you will. 364 00:29:52,260 --> 00:29:52,460 So you can fetch it over FTP from a Chinese website, if you will. 365 00:29:52,480 --> 00:29:54,940 Or just over HTTP . 366 00:29:54,940 --> 00:29:57,860 And same thing for the main boot kit. 367 00:29:58,380 --> 00:30:08,020 I hidden them into PDF files, but it's very much like the kernel, renamed as memdisk.pdf. 368 00:30:08,400 --> 00:30:08,940 But it's very much like the kernel, renamed as memdisk.pdf. 369 00:30:08,940 --> 00:30:13,320 So that, if for some reason there is some kind of network analysis, it's going to be harder to check. 370 00:30:14,640 --> 00:30:15,340 So that, if for some reason there is some kind of network analysis, it's going to be harder to check. 371 00:30:15,340 --> 00:30:15,860 All right. 372 00:30:16,000 --> 00:30:18,180 Let's go to the, thank you for your patience. 373 00:30:18,800 --> 00:30:20,000 Let's go to the demo. 374 00:30:20,320 --> 00:30:22,460 This one is called evil Remote Key. 375 00:30:22,460 --> 00:30:35,840 carnal own age of death. Okay. I could actually flash it on my main 376 00:30:35,840 --> 00:30:40,580 box, but like you would see nothing, which is not very visual for a demo. So instead 377 00:30:40,580 --> 00:30:52,440 I'm going to use KVM, which is an emulator, which is also supported by core boot. I'm 378 00:30:52,440 --> 00:31:02,640 for you to see what's happening. We're going to focus only on HTTP. Okay. 379 00:31:03,280 --> 00:31:09,060 So the whole command is this. So we start KVM. We specify a different bias from the 380 00:31:09,060 --> 00:31:15,280 one of KVM, which is actually my malware, Rakshasa. We tell him to be full screen. We 381 00:31:15,280 --> 00:31:22,340 want network connection. I actually have Ethernet here today. And you boot me a drive which 382 00:31:22,340 --> 00:31:22,420 is KVM. And you boot me a drive which is KVM. And you boot me a drive which is KVM. 383 00:31:22,420 --> 00:31:44,520 It is very much a Windows 7. It better work. It's not working. It is. All right. Okay. 384 00:31:44,880 --> 00:31:52,200 I will need someone innocent to type my admin password. Do you know my admin password? 385 00:31:53,700 --> 00:31:59,100 Don't be shy. Can you come over? Yeah, yeah, you may. Yeah. 386 00:32:07,360 --> 00:32:18,300 So the idea that you know to use Windows. You choose any password you want. 387 00:32:27,940 --> 00:32:33,880 All right. And it's actually booted. Right. So now thank you, man. So, like, let's look 388 00:32:33,880 --> 00:32:43,880 at what's really happened here. So, first off, the application ‑‑ I mean, the 389 00:32:43,880 --> 00:32:52,180 bias done was did a second configuration file from a remote Web site, okay, using HTTP. This is very much a 390 00:32:52,180 --> 00:32:58,620 IPXE configuration file which tells him, all right, you're going to try to send me an e-mail 391 00:32:58,620 --> 00:33:08,380 using a web application from the BIOS and we're going to fail over ‑‑ sorry, is 392 00:33:08,380 --> 00:33:18,220 it too small? Is it better? I don't know how to make it bigger on that stuff. All right. 393 00:33:18,220 --> 00:33:23,780 So the idea is that it's downloading an alternate configuration file and then it's going to 394 00:33:24,240 --> 00:33:29,040 boot on ‑‑ no, sorry, this is already the alternate configuration file. It's going 395 00:33:29,040 --> 00:33:35,400 to boot on a blog, essentially, which is the blog I used last year for my Black Hat talk 396 00:33:35,400 --> 00:33:44,280 because I'm too lazy. All right. We can see that actually these two files have very much 397 00:33:44,280 --> 00:33:48,200 been fetched. So this is a memdisc. 398 00:33:48,200 --> 00:34:01,320 And the other one is the actual payload, which is a recrafted comboot version. All right. 399 00:34:01,320 --> 00:34:04,540 So let me check my mails because you guys are a bit boring. You could have a poll there. 400 00:34:04,840 --> 00:34:05,800 So I'm a bit pissed. 401 00:34:14,560 --> 00:34:15,320 All right. 402 00:34:21,520 --> 00:34:32,580 Okay. So if I go to my mails, I have a message from Rakshasa. You can read this. 403 00:34:34,520 --> 00:34:41,640 Sending me the IP parameter, like the IP, the MAC, the network mask, the gateway, and 404 00:34:41,640 --> 00:34:42,040 the DNS. 405 00:34:46,200 --> 00:34:46,940 Thank you. 406 00:34:47,660 --> 00:34:48,180 Thank you. 407 00:34:54,060 --> 00:35:00,540 So this was actually a Windows 7 64‑bit. Oh, do you get to see this? 408 00:35:11,780 --> 00:35:17,820 Yep. But this is very much comboot, like it's going to work with any Windows, really. 409 00:35:18,100 --> 00:35:18,180 Okay. 410 00:35:19,280 --> 00:35:26,500 Okay. Any questions so far? Okay. So let's go to more interesting stuff. Obviously, for 411 00:35:26,500 --> 00:35:31,320 the Apache logs, we have the traces also of, you know, what the IP address, the next mask, 412 00:35:31,420 --> 00:35:37,340 et cetera. So like we mentioned, we actually receive emails seemingly from the buyers. 413 00:35:37,540 --> 00:35:42,680 This is before booting the operating system. I'd like to tell you about how to properly 414 00:35:42,680 --> 00:35:51,800 build a botnet. A botnet you cannot shut down. You must know that Microsoft is using signed 415 00:35:51,800 --> 00:35:59,560 updates. Why not do this for my botnet? If I want to make a botnet from a bias, I can 416 00:35:59,560 --> 00:36:06,460 very much sign the updates also so that if law enforcement ever sees the CNC, the command 417 00:36:06,460 --> 00:36:11,860 in control, they will not be able to shut it down, right? Because like this is how they 418 00:36:11,860 --> 00:36:12,400 do it, right? 419 00:36:12,680 --> 00:36:19,280 They hijack one server, one CNC, and they send a shutdown command. If you do that, there 420 00:36:19,280 --> 00:36:25,240 is still a problem, like the availability of a CNC. And to do this, what we can do is 421 00:36:25,240 --> 00:36:32,420 rotate the CNC every, say, every five minutes over the entire Internet. It's unlikely that 422 00:36:32,420 --> 00:36:36,320 you're going to shut down the entire Internet to shut down my botnet. So one day it's going 423 00:36:36,320 --> 00:36:39,740 to be Amazon. One day it's going to be Google. One day it's going to be NTNT. Oh, next day 424 00:36:39,740 --> 00:36:42,660 it's me. So I push my updates. 425 00:36:42,680 --> 00:36:46,880 NICOLAS BOULOS- So we are making all these updates. And I think if malware was 426 00:36:46,880 --> 00:36:51,940 actually doing this, which is not really happening today, it would just be impossible to shut 427 00:36:51,940 --> 00:37:00,940 down. Any question? Okay. Let's talk about mitigation, and in particular, cryptography, 428 00:37:01,040 --> 00:37:12,600 because it's usually the one which comes to mind. So first off, we can very much do an evil-made kind of attack, booting a fake prompt. 429 00:37:12,680 --> 00:37:20,720 and TPM is not going to help you there because TPM is not enforced by the hardware. Even 430 00:37:20,720 --> 00:37:26,940 if you sealed your computer, you have full disk encryption and you're using TPM, if I 431 00:37:26,940 --> 00:37:35,340 flash your hardware with Rakshasa and next time I boot, I bring a fake logging prompt, 432 00:37:35,340 --> 00:37:45,280 you cannot see the difference. And TPM is not capable of enforcing the real full disk 433 00:37:45,280 --> 00:37:50,780 encryption logging to boot. So this is a bit of a problem. We can do all this stuff, like 434 00:37:50,780 --> 00:37:57,120 trying to brute force, et cetera. I showed that, like, at DEF CON 2008, if you're interested. 435 00:38:00,040 --> 00:38:05,320 So this is very much of a problem. The other problem is that even if you have a 436 00:38:05,320 --> 00:38:10,660 full disk encryption that is actually used, when you buy your computer, the hard drive 437 00:38:10,660 --> 00:38:15,440 is not encrypted. It's not possible. Well, if it was, like, it would be encrypted with 438 00:38:15,440 --> 00:38:20,240 a password you don't know. So you would have to ‑‑ which is known by third parties. 439 00:38:21,360 --> 00:38:27,320 So to change the password, you would have to unseal the TPM, and bam, if you do that, 440 00:38:27,360 --> 00:38:33,660 you're vulnerable again. So anybody in the supply chain can very much backdoor your stuff 441 00:38:33,660 --> 00:38:35,160 because your hard drive is not ‑‑ 442 00:38:35,160 --> 00:38:38,260 They're encrypted. Therefore, the TPM is actually not sealed 443 00:38:38,800 --> 00:38:44,340 when your computer is delivered to you. You may be asking about antiviruses. If you 444 00:38:44,340 --> 00:38:49,380 ask me, putting an antivirus on a server is pretty much as putting lipstick on your 445 00:38:49,380 --> 00:38:56,260 server. Let me show you why. We said the only component which is actually malicious 446 00:38:57,120 --> 00:39:03,460 is convert. So if you took the legit convert version, at least three or maybe five years 447 00:39:03,460 --> 00:39:03,720 old. 448 00:39:03,720 --> 00:39:13,400 and is detected by two antiviruses on VirusTotal. Not bad. Then I encrypted it with a super 449 00:39:13,400 --> 00:39:20,060 ELITE packer called LZMA, which is actually the most common packer most probably. It's 450 00:39:20,060 --> 00:39:25,920 the one used by Linux by default nowadays. And it's the one used by every BIOS I know. 451 00:39:25,920 --> 00:39:39,040 And the detection rate drops to zero. All right. I won't talk about this. You could 452 00:39:39,040 --> 00:39:44,020 be vulnerable if you actually change your network card. If you network card, you buy 453 00:39:44,020 --> 00:39:50,840 it on eBay and it comes with our own PCI driver. At boot time, every PCI driver has the same 454 00:39:50,840 --> 00:39:55,900 privilege as the BIOS. So when you're developing a PCI driver, it's 455 00:39:56,600 --> 00:40:00,340 initialized, it could actually very well do the same thing, even if your BIOS is same, 456 00:40:00,480 --> 00:40:05,980 and reflash the BIOS back from the Internet. We're going to see that later. 457 00:40:07,740 --> 00:40:15,040 It's actually also possible to backdoor ESXi or at least several versions of VMware using 458 00:40:15,040 --> 00:40:22,240 raw PCI devices. So in terms of remediation, I suggest instead of trusting firmware you 459 00:40:22,240 --> 00:40:25,880 don't know, when you receive a computer, you flash it with firmware. You can confirm it 460 00:40:25,880 --> 00:40:28,140 with control. Typically core boot is a good idea. 461 00:40:31,620 --> 00:40:36,520 If you're a victim of an intrusion, because it's also possible to flash the BIOS if you 462 00:40:36,520 --> 00:40:43,080 get a remote root shell, you should not trust your BIOS anymore. But if you want to flash 463 00:40:43,080 --> 00:40:46,480 every ‑‑ if you want something sound, since you cannot trust your kernel anymore, 464 00:40:46,800 --> 00:40:52,460 you should flash every PCI firmware and the BIOS at the same time using a physical device 465 00:40:52,460 --> 00:40:55,440 like this. And nobody has the time to do it. 466 00:40:55,880 --> 00:40:57,860 So I suggest you just throw your server away. 467 00:41:01,280 --> 00:41:05,980 I told you about flashing remotely. We just saw that we can boot a remote operating system. 468 00:41:06,360 --> 00:41:14,320 So since a flasher for most BIOSes is just a Linux and it's generic, flashing the BIOS 469 00:41:14,320 --> 00:41:20,320 itself remotely is a given. What's not a given is flashing other PCI expansion ROMs 470 00:41:20,320 --> 00:41:25,820 somewhere on your machine because they are very much hardware dependent. So say I want 471 00:41:25,880 --> 00:41:30,960 to flash the network PCI firmware. How do I do this? 472 00:41:32,140 --> 00:41:38,340 Well, we saw that IPXC can actually send the MAC address to the server. So the server can 473 00:41:38,340 --> 00:41:43,160 know the MAC address. From there, it can deduct the WI number. And from the WI number, 474 00:41:43,340 --> 00:41:48,600 it knows the manufacturer. And it can send back the appropriate tool and the exact version 475 00:41:48,600 --> 00:41:53,480 of the flasher which is appropriate for your network card. This is actually not a trick. 476 00:41:53,580 --> 00:41:55,860 It's something supported by IPXC, which is even better. 477 00:41:55,880 --> 00:42:03,460 All right. So backdooring like a state. Everybody knows that. Only China does it. 478 00:42:04,540 --> 00:42:10,460 So we mentioned nonattribution and plausible deniability. Nonattribution is a given because 479 00:42:10,460 --> 00:42:17,680 I mean, it's essentially free software. So you did not write it. You don't have to explain 480 00:42:17,680 --> 00:42:24,200 why you did not. You did not. For plausible deniability, I suggest instead of flashing 481 00:42:24,200 --> 00:42:25,580 ‑‑ instead of ‑‑ 482 00:42:25,880 --> 00:42:26,520 You can do this. 483 00:42:26,700 --> 00:42:33,180 a backdoor straightaway to use a remote vulnerability on the firmware and such stuff does exist. 484 00:42:33,440 --> 00:42:39,780 The same guy will phone the SMM thing actually phone the remote vulnerability on the firmware 485 00:42:39,780 --> 00:42:45,540 of Broadcom network cards. It's just not enabled by default because there is a slight 486 00:42:45,540 --> 00:42:52,120 setting to do. But, like, if you change this setting, this is slightly better. I mean, 487 00:42:52,140 --> 00:42:55,580 you can claim it's a mistake. An honest mistake. 488 00:42:55,740 --> 00:42:55,860 Yeah. 489 00:42:55,880 --> 00:42:57,500 It's not a back door by itself, right? 490 00:42:57,620 --> 00:42:59,600 But it allows you to own the computer remotely, 491 00:42:59,800 --> 00:43:00,860 get a remote root shell, 492 00:43:01,000 --> 00:43:02,960 and from there you can bootstrap the thing, 493 00:43:03,040 --> 00:43:06,560 like flash the BIOS from all the PCI devices, et cetera. 494 00:43:06,960 --> 00:43:10,080 Do you even filter data, et cetera? 495 00:43:10,320 --> 00:43:12,480 And when you don't, you restore the BIOS, 496 00:43:12,480 --> 00:43:14,040 every PCI firmware, and you're done. 497 00:43:14,320 --> 00:43:15,180 Zero trace left. 498 00:43:17,380 --> 00:43:18,280 So more demos. 499 00:43:18,900 --> 00:43:21,680 If you read this book, Millennium, 500 00:43:22,120 --> 00:43:24,760 it started to be bullshit around page 50 501 00:43:24,760 --> 00:43:27,080 when she boots a remote operating system 502 00:43:30,480 --> 00:43:32,360 from the guy she's infected. 503 00:43:33,420 --> 00:43:35,180 Turns out this is actually possible 504 00:43:35,180 --> 00:43:38,040 if you have a link which is fast enough, 505 00:43:38,260 --> 00:43:40,740 typically gigabit Ethernet and a SAN. 506 00:43:41,100 --> 00:43:43,260 So this is, again, supported by IPXC. 507 00:43:45,360 --> 00:43:50,100 Let me boot a demo quickly. 508 00:43:52,340 --> 00:43:53,740 Okay, so I don't have a SAN, 509 00:43:53,800 --> 00:43:54,660 so we'll just do it. 510 00:43:54,760 --> 00:43:56,200 I'm going to do it booting a CD-ROM, 511 00:43:57,360 --> 00:43:59,040 but it's essentially the same thing. 512 00:43:59,440 --> 00:44:00,860 Sorry, let me see the ROM. 513 00:44:09,180 --> 00:44:10,920 Oh, I think this is totally legit. 514 00:44:18,500 --> 00:44:20,260 All right, Windows is booting. 515 00:44:20,300 --> 00:44:21,980 I'm going to do the rest where it's booting. 516 00:44:23,820 --> 00:44:24,640 There is also, 517 00:44:24,760 --> 00:44:26,600 a small problem of BIOS graphics. 518 00:44:26,900 --> 00:44:28,180 Like, when I booted it, 519 00:44:28,640 --> 00:44:30,040 you didn't see any graphics, 520 00:44:30,260 --> 00:44:31,640 but, like, it's a fake problem 521 00:44:31,640 --> 00:44:34,260 because, like, other versions are better than CBIOS, 522 00:44:34,260 --> 00:44:35,760 actually have better menus, 523 00:44:35,920 --> 00:44:38,500 and you can embed a proper graphic, 524 00:44:38,660 --> 00:44:40,220 a boot splash when booting. 525 00:44:40,380 --> 00:44:42,360 So, for instance, you can have stuff like this. 526 00:44:42,680 --> 00:44:44,480 You can have a whole invaders. 527 00:44:44,660 --> 00:44:46,520 I'll show you in the question room if you want. 528 00:44:47,800 --> 00:44:49,180 When it comes to UEFI, 529 00:44:49,320 --> 00:44:53,620 which is often mentioned as something better than the BIOS, 530 00:44:54,760 --> 00:44:57,140 core boot is actually 100% compliant 531 00:44:57,660 --> 00:45:02,340 if you change CBIOS by TNO core, 532 00:45:02,520 --> 00:45:04,900 which is another open-source project. 533 00:45:05,580 --> 00:45:08,100 The only difference is going to be that the boot kit 534 00:45:08,100 --> 00:45:11,540 you're using, core boot, is not going to work. 535 00:45:12,100 --> 00:45:14,120 But if you saw the work of Snare, 536 00:45:14,720 --> 00:45:16,560 this week at Black Hat, 537 00:45:16,760 --> 00:45:18,880 he actually wrote such a boot kit. 538 00:45:19,080 --> 00:45:21,480 So, like, I don't see why people 539 00:45:21,480 --> 00:45:22,960 actually try this technology either. 540 00:45:24,820 --> 00:45:26,740 Best thing, this is not a vulnerability, 541 00:45:27,080 --> 00:45:28,600 so there will be no patch for it. 542 00:45:30,040 --> 00:45:31,620 It's just bad design. 543 00:45:32,000 --> 00:45:34,020 I mean, we cannot really blame IBM 544 00:45:34,020 --> 00:45:35,980 for making the mistake in 81, 545 00:45:36,220 --> 00:45:37,580 but we keep on having, like, 546 00:45:37,600 --> 00:45:38,940 ritual compatibility and stuff. 547 00:45:39,340 --> 00:45:40,540 Just to remind you, 548 00:45:40,640 --> 00:45:43,640 Microsoft in 95 did not anticipate the Internet. 549 00:45:43,980 --> 00:45:45,520 When you bought Windows 95, 550 00:45:45,640 --> 00:45:46,540 the shares were open 551 00:45:46,540 --> 00:45:48,860 because it was supposed to be used in LANs 552 00:45:48,860 --> 00:45:49,520 and stuff like that. 553 00:45:49,880 --> 00:45:53,080 So, like, imagine the kind of anticipation 554 00:45:53,080 --> 00:45:54,740 IBM could have wanted to have. 555 00:45:54,760 --> 00:45:57,720 I mean, 81, when creating every PC. 556 00:45:58,100 --> 00:45:59,460 And since I got the question, 557 00:45:59,680 --> 00:46:01,320 yes, a Mac is a PC nowadays. 558 00:46:03,500 --> 00:46:04,220 Any question? 559 00:46:06,560 --> 00:46:08,020 We're going to see just... 560 00:46:08,020 --> 00:46:09,480 Yeah, I think that's very legit. 561 00:46:19,780 --> 00:46:22,020 All right, we're going to move to the other room 562 00:46:22,020 --> 00:46:23,020 for the questions. 563 00:46:23,320 --> 00:46:24,540 Thank you so much for your attention. 564 00:46:24,760 --> 00:46:25,280 Thank you. 565 00:46:25,280 --> 00:46:26,280 Thank you.