1 00:00:00,000 --> 00:00:01,120 Thank you. 2 00:00:01,480 --> 00:00:02,740 Can you hear me? 3 00:00:03,300 --> 00:00:04,420 Good. 4 00:00:04,620 --> 00:00:07,660 Who here is first time to DEF CON? 5 00:00:08,340 --> 00:00:09,320 Woohoo. 6 00:00:09,580 --> 00:00:12,720 How many of you are aspiring hackers? 7 00:00:14,700 --> 00:00:16,540 Aspiring hardware hackers? 8 00:00:17,120 --> 00:00:19,880 How many of you are hardware hacking experts? 9 00:00:21,140 --> 00:00:22,100 Or hacking experts? 10 00:00:22,100 --> 00:00:25,980 So like, all you aspiring hackers, see, experts, raise your hand. 11 00:00:26,320 --> 00:00:28,940 All you aspiring people, go talk to those experts. 12 00:00:29,320 --> 00:00:31,240 Make some connections, okay? 13 00:00:31,920 --> 00:00:35,180 So yeah, your homework, say hello to an expert after this talk. 14 00:00:35,600 --> 00:00:38,380 This is direct memory access everywhere. 15 00:00:38,500 --> 00:00:44,420 Kind of try to tie into the theme of access everywhere with the pun of direct memory access. 16 00:00:44,500 --> 00:00:45,220 Haha. 17 00:00:45,780 --> 00:00:47,340 I'm Joe Fitzpatrick. 18 00:00:47,340 --> 00:00:52,480 I have been spending probably more than ten years of time doing fun stuff with hardware. 19 00:00:52,780 --> 00:00:59,940 I did silicon debug and some security research for a rapidly shrinking CPU company a while back. 20 00:01:00,420 --> 00:01:03,360 And now I do hardware security training. 21 00:01:04,340 --> 00:01:11,980 And I do actually own a pair of shoes with white LEDs in them because that's the kind of work attire that you need in this industry. 22 00:01:12,020 --> 00:01:12,920 And Grace? 23 00:01:15,480 --> 00:01:16,600 Hello. 24 00:01:16,600 --> 00:01:17,800 Hello. 25 00:01:18,340 --> 00:01:20,180 I'm Grace Parrish. 26 00:01:20,180 --> 00:01:30,680 I am a current OSU student, Oregon State University, working on cyber security degree. 27 00:01:30,800 --> 00:01:34,960 And I am also currently a SOC analyst. 28 00:01:35,100 --> 00:01:48,760 In the last nine years before I went back to school, I was a board level repair technician and also taught industrial control systems. 29 00:01:48,760 --> 00:01:52,020 I should be graduating in December. 30 00:01:52,040 --> 00:01:56,480 And I look forward to a career in offensive security. 31 00:02:02,940 --> 00:02:05,480 So this is PCIE. 32 00:02:05,540 --> 00:02:12,180 I'm sure many of you who have opened your computers at some point or other probably recognize it. 33 00:02:12,180 --> 00:02:22,480 And for those of you who don't, it is a add-on card and interface to be able to add capabilities to your computer. 34 00:02:22,480 --> 00:02:32,460 Some examples include networking, RAID controllers, and probably the one most people are familiar with, GPUs. 35 00:02:35,620 --> 00:02:40,920 And you may be wondering, well, why are we talking about PCIE here? 36 00:02:40,920 --> 00:02:48,640 Well, so the whole revolutionary thing about PCIE is that it uses DMA. 37 00:02:48,700 --> 00:03:06,160 Back before DMA, direct memory access, our CPU would take data and move it from a system memory to a peripheral or possibly from a peripheral to system memory. 38 00:03:06,460 --> 00:03:09,580 And this took up a lot of resources. 39 00:03:09,940 --> 00:03:15,500 And because while the CPU was doing that, it couldn't do any other processing. 40 00:03:15,500 --> 00:03:28,040 And so we decided maybe instead we should have the CPU ask for memory to be moved or for data to be moved from the peripheral to system memory and vice versa. 41 00:03:28,300 --> 00:03:41,700 And this sped things up significantly because not only can we have a controller that's probably fast to do the moving, the CPU can continue to do whatever other processing it needs to do in the meantime. 42 00:03:49,780 --> 00:03:51,400 And so PCIE is a great way to do that . 43 00:03:51,400 --> 00:03:54,920 You may be wondering, well, why is there a talk about this? 44 00:03:54,920 --> 00:04:10,280 Well, that's fine for a CPU to be able to or for a device to be able to move data around arbitrarily to and from memory if you trust the device. 45 00:04:10,280 --> 00:04:12,140 But what if the device isn't trustable? 46 00:04:12,140 --> 00:04:13,440 What if it's malicious ? 47 00:04:13,620 --> 00:04:20,420 Well, now the device has arbitrary read and write to the entirety of system memory. 48 00:04:20,580 --> 00:04:32,400 Now the first kind of exploration into this was the Tribble made by Joe Grand back in 2003. 49 00:04:32,500 --> 00:04:40,080 And this is actually the predecessor to PCIE, just PCI. 50 00:04:40,080 --> 00:04:42,300 This one's not extended. 51 00:04:42,800 --> 00:04:52,840 And you may notice we have a card, again it's PCI, and then from that card we have a cable going off the screen. 52 00:04:53,080 --> 00:05:04,920 Well, what that is, is actually it's going to another computer and that computer can use the cable and the card to arbitrarily read and write to memory on the victim machine. 53 00:05:05,180 --> 00:05:11,860 Now, this isn't particularly, you know, easy to go unnoticed. 54 00:05:11,860 --> 00:05:13,480 It's kind of obvious. 55 00:05:13,480 --> 00:05:17,320 Which brings us to Firewire. 56 00:05:17,760 --> 00:05:25,800 Firewire is a cable that is used to move data from one device to another. 57 00:05:26,160 --> 00:05:28,040 And it does it pretty fast. 58 00:05:28,040 --> 00:05:31,740 I'm sure you all could probably guess why. 59 00:05:32,060 --> 00:05:33,360 DMA. 60 00:05:33,780 --> 00:05:42,360 And so this cable was used primarily for cameras and used a lot in Macs. 61 00:05:42,560 --> 00:05:43,480 But now it's used for cameras . 62 00:05:43,480 --> 00:05:47,020 And now suddenly we have DMA outside of the case. 63 00:05:47,540 --> 00:06:01,980 So instead of having to like tear open a case and put it in a card and a cable going out, we can instead just walk up with a computer and a cable, plug it in and perform a DMA attack all with parts completely off the shelf . 64 00:06:06,310 --> 00:06:07,310 Cool. 65 00:06:08,770 --> 00:06:11,030 I got to do this slide because I'm the pro. 66 00:06:11,870 --> 00:06:15,330 So this is a tale of epic procrastination. 67 00:06:15,330 --> 00:06:18,250 Because this spans over a decade at this point. 68 00:06:19,070 --> 00:06:21,470 Way back in 2014 I presented here at DEF CON. 69 00:06:21,470 --> 00:06:27,470 It was my first time at DEF CON presenting about slot screamer which was a PC express device that did DMA attacks. 70 00:06:27,470 --> 00:06:28,590 Sounds familiar, huh? 71 00:06:29,070 --> 00:06:36,190 And a couple years later Ulf Frisk did some amazing work and I basically got a card that was mostly off the shelf. 72 00:06:36,190 --> 00:06:38,670 Changed a few registers and did a cool demo. 73 00:06:38,890 --> 00:06:49,530 Ulf then took that and turned it into this incredible suite of tools that will let you go and own any operating system using the same hardware but a bit more configuration and a bit more software. 74 00:06:49,530 --> 00:06:52,710 So it was aware of like operating system structures in memory. 75 00:06:52,710 --> 00:06:55,450 It could go and modify them, inject processes, get files. 76 00:06:55,450 --> 00:06:56,530 It was pretty amazing. 77 00:06:56,530 --> 00:06:58,930 Far more than I had the patience to ever do. 78 00:06:59,450 --> 00:07:02,050 Yeah, attention span, procrastination. 79 00:07:02,110 --> 00:07:05,470 Anyway, then as a follow on there was an FPGA version. 80 00:07:05,510 --> 00:07:07,890 So using a starting with a Xilinx reference board. 81 00:07:07,890 --> 00:07:13,590 You could basically use an FPGA to overcome some of the limitations that Slot Screamer had such as 32 bit addressing. 82 00:07:14,410 --> 00:07:17,270 And actually past that there were a couple of other projects. 83 00:07:17,410 --> 00:07:29,810 Thunderclap from University of Cambridge put together a tiny little like 3 or 4 thousand dollar board that they used to go and poke at some Thunderbolt and IOMMU issues. 84 00:07:29,850 --> 00:07:31,270 Thunderspy in 2020. 85 00:07:31,450 --> 00:07:40,230 So yeah, there's been a steady progression of stuff like this and I've been keeping my eyes on it and perhaps, you know, meaning to do a lot of work and never actually getting around to it. 86 00:07:40,230 --> 00:07:43,130 But luckily other people were getting some of it done too, which is even better. 87 00:07:44,530 --> 00:07:47,170 As we're going to go through though, we're going to talk a little bit about threat modeling. 88 00:07:47,250 --> 00:07:48,570 Who likes threat modeling? 89 00:07:49,690 --> 00:07:52,730 I used to, I used to joke about like armchair hacking. 90 00:07:52,850 --> 00:07:56,390 It's where you just like sit and think about things and like throw darts at the wall. 91 00:07:56,390 --> 00:07:59,530 And then I realized if you want to build hours, you just call it threat modeling. 92 00:08:01,070 --> 00:08:05,650 So four question threat model that Adam Shostak's been using is pretty cool. 93 00:08:05,970 --> 00:08:12,410 It's way less structured than a lot of the other things but it actually kind of does a good job of getting straight to the important stuff. 94 00:08:12,990 --> 00:08:14,950 So basically what are we working on? 95 00:08:15,070 --> 00:08:17,550 We're going to go through a couple different aspects of PCI express. 96 00:08:17,870 --> 00:08:19,010 What can go wrong? 97 00:08:19,150 --> 00:08:20,750 We've seen some examples of that already. 98 00:08:20,750 --> 00:08:24,190 We can use that to inform our answers or we can kind of speculate. 99 00:08:24,530 --> 00:08:25,970 What are we going to do about it? 100 00:08:26,090 --> 00:08:27,010 Do we fix it? 101 00:08:27,010 --> 00:08:28,550 Do we just tell people not to do it? 102 00:08:28,550 --> 00:08:29,890 Like what's the solution? 103 00:08:30,110 --> 00:08:38,890 And then did we do a good job is kind of a good follow up because you know if we're not doing a good job why are we wasting our time doing this armchair hacking when we could be like taking a nap or going on vacation. 104 00:08:40,170 --> 00:08:42,270 So for PCI express what's the threat model? 105 00:08:42,270 --> 00:08:42,850 What are we working on? 106 00:08:42,850 --> 00:08:44,210 We're working on high speed interconnects. 107 00:08:44,210 --> 00:08:46,750 We need a way to connect devices in a system very quickly. 108 00:08:47,110 --> 00:08:48,230 What can go wrong? 109 00:08:48,230 --> 00:08:54,210 Some malicious devices, errant devices, devices that get programmed with malicious firmware or something like that. 110 00:08:54,630 --> 00:08:56,070 What are we going to do about it? 111 00:08:56,130 --> 00:08:58,670 Basically the decision was just keep it inside the case. 112 00:08:58,870 --> 00:09:01,730 Oh well the trust barrier is the case of the computer. 113 00:09:01,730 --> 00:09:07,430 We're going to have an intrusion alarm that like lights a light up or something or tells the BIOS something happened if you open the case. 114 00:09:07,450 --> 00:09:09,650 Which maybe was fine 20 years ago. 115 00:09:09,690 --> 00:09:11,090 So did we do a good job? 116 00:09:11,490 --> 00:09:12,070 Maybe. 117 00:09:12,070 --> 00:09:15,350 Based on the threats at the time if we kept it inside the case we probably did an okay job. 118 00:09:16,950 --> 00:09:19,150 So yeah, grace. 119 00:09:21,770 --> 00:09:25,990 So now you may be wondering well what are the steps of attacking PCI D . 120 00:09:25,990 --> 00:09:30,150 So first you're going to connect your hardware. 121 00:09:30,390 --> 00:09:36,150 Then the computer is going to enumerate that hardware. 122 00:09:36,150 --> 00:09:42,570 Finally then the device is going to enable bus master. 123 00:09:42,570 --> 00:09:45,670 And then read and write memory. 124 00:09:45,670 --> 00:09:50,130 And then finally you get to present a talk at DEF CON. 125 00:09:50,930 --> 00:09:53,690 So connecting hardware. 126 00:09:53,690 --> 00:09:57,950 So here are some examples of various hardware. 127 00:09:58,030 --> 00:10:03,390 You may notice that PCI E comes in various shapes and sizes. 128 00:10:04,590 --> 00:10:20,410 There's 1X, 4X, 8X, 16X and even some interfaces that you may not recognize or you may not realize is PCI E such as M.2. 129 00:10:21,210 --> 00:10:28,690 You may also realize or notice that there are USB 3.0 ports on many of these cards. 130 00:10:29,590 --> 00:10:32,670 So fun fact, those are not actually USB. 131 00:10:33,010 --> 00:10:42,570 One of the things about making implants for machines is sometimes you don't have the space that you want. 132 00:10:42,570 --> 00:10:44,810 Or the space is elsewhere in the machine. 133 00:10:44,810 --> 00:10:55,370 So what that actually is, is it is a port that connects to a cable that will then connect to our actual implant. 134 00:10:55,370 --> 00:10:57,450 So it may look like USB. 135 00:10:57,450 --> 00:11:00,630 That's because it's the port reused. 136 00:11:00,630 --> 00:11:06,230 But it is actually PCI E over a USB cable. 137 00:11:08,360 --> 00:11:13,760 So after we've connected some hardware, now we have to get into enumeration. 138 00:11:13,760 --> 00:11:19,040 So the root complex enumerates buses. 139 00:11:19,040 --> 00:11:24,960 And I'm sorry, but the lines connecting the buses aren't super visible on the dark background. 140 00:11:24,960 --> 00:11:29,760 But I will try to illustrate where I am talking about. 141 00:11:29,760 --> 00:11:38,380 So the first bus or the 0th bus is from the root complex on the left to the switch. 142 00:11:38,680 --> 00:11:41,240 And that's going to be bus 0. 143 00:11:42,100 --> 00:11:49,720 Then the switch also has a bus going from the switch back to the root complex. 144 00:11:49,720 --> 00:11:51,040 That's 1. 145 00:11:51,600 --> 00:11:58,400 Then from the switch to the left PCI E end point, that's 2. 146 00:11:58,400 --> 00:12:02,040 From the switch to the diagonal PCI E component, that's 3. 147 00:12:02,040 --> 00:12:06,400 From the switch to the legacy end point, that's 4. 148 00:12:07,160 --> 00:12:11,320 And so far we've been going depth first search. 149 00:12:11,320 --> 00:12:14,100 And that's how PCI E is enumerated. 150 00:12:14,100 --> 00:12:22,680 So next we're going to go from the root complex at the center to the PCI E end point. 151 00:12:22,680 --> 00:12:27,600 And that's going to be 4. 152 00:12:29,260 --> 00:12:30,380 5. 153 00:12:32,240 --> 00:12:39,340 And then from the root complex on the right to the PCI E bridge, that's going to be 6. 154 00:12:39,340 --> 00:12:51,200 And then it's really hard to see, PCI bridge, and then it's really hard to see, there is actually a PCI E bus down below the bridge. 155 00:12:51,200 --> 00:12:52,840 And that would be 7. 156 00:12:52,840 --> 00:13:01,620 And the root complex connects all of these end points to the memory so that the devices can write directly to the memory. 157 00:13:03,400 --> 00:13:12,940 Here is an example of LSPCI output showing all of the various devices enumerated. 158 00:13:17,440 --> 00:13:20,700 Do you want to help me with like a little ad hoc hack right here? 159 00:13:21,040 --> 00:13:21,920 Yeah? 160 00:13:22,000 --> 00:13:25,800 So I'm listening to Micah Flee's talk across the way because I can hear it. 161 00:13:25,800 --> 00:13:29,780 And I bet if we all yelled like, great talk Micah, he would hear us. 162 00:13:29,780 --> 00:13:31,140 So you want to help me with that? 163 00:13:31,140 --> 00:13:33,780 So on three, great talk Micah. 164 00:13:33,780 --> 00:13:34,380 Ready? 165 00:13:34,460 --> 00:13:36,380 One, two, three. 166 00:13:36,460 --> 00:13:38,540 Great talk Micah! 167 00:13:39,720 --> 00:13:41,340 I don't know if he heard that. 168 00:13:41,400 --> 00:13:45,780 But back on topic, you came for PCI Express, didn't you? 169 00:13:45,780 --> 00:13:47,960 This is why I procrastinate a lot. 170 00:13:47,960 --> 00:13:48,940 I get distracted. 171 00:13:48,940 --> 00:13:50,460 So we want to read and write memory. 172 00:13:50,460 --> 00:13:53,180 We get to the point where we've got transaction level packets. 173 00:13:53,240 --> 00:14:00,500 So TLPs, these are the things that we get to the point, hooked all the wires up, we enumerated, we know who's who, and we just start sending these packets back and forth. 174 00:14:00,540 --> 00:14:01,940 The first group of them are about memory. 175 00:14:01,940 --> 00:14:06,740 We want to read memory and we want to write memory, which does basically what you expect, reading and writing memory. 176 00:14:07,740 --> 00:14:12,500 Configuration read and message requests are our special type of PCI Express transactions. 177 00:14:12,540 --> 00:14:13,720 We're not as interested in those. 178 00:14:13,720 --> 00:14:17,380 They're not used nearly as much as the memory read and write, especially when we're doing DMA attacks. 179 00:14:17,740 --> 00:14:19,020 And last we've got completions. 180 00:14:19,020 --> 00:14:20,160 These are the responses. 181 00:14:20,160 --> 00:14:23,120 So when you do a read, your response is a completion with data. 182 00:14:24,800 --> 00:14:25,860 So that's all complicated. 183 00:14:25,860 --> 00:14:27,780 You don't want to sit there writing TLPs one at a time. 184 00:14:27,780 --> 00:14:30,920 That's what's great about PCI Leach is it kind of does all that work for you. 185 00:14:30,920 --> 00:14:39,040 You want to read a certain block of memory, it does the TLPs, sends them to the hardware, whether it's a slot screamer or an FPGA, which goes and grabs memory, gives it back to you, and it does stuff with it. 186 00:14:39,040 --> 00:14:42,460 It parses tables, does whatever it needs to find processes and memory. 187 00:14:42,520 --> 00:14:43,380 It's pretty cool. 188 00:14:45,480 --> 00:14:48,460 So I'm going to skip over this example based on time. 189 00:14:48,460 --> 00:14:53,580 First example I had was dumping memory where you basically plug this card in and dump all of memory. 190 00:14:53,580 --> 00:14:56,860 So you grab 4 gigabytes of memory and whoop-de-doo, you've got a memory image. 191 00:14:56,860 --> 00:14:58,400 You can go and look for cool stuff. 192 00:14:58,740 --> 00:14:59,860 I'm going to show this next one though. 193 00:14:59,860 --> 00:15:01,120 This is the lock screen bypass. 194 00:15:01,360 --> 00:15:03,060 So this is using an older piece of hardware. 195 00:15:03,060 --> 00:15:04,140 This is using slot screamer. 196 00:15:04,140 --> 00:15:09,940 You plug it in the system and this is a Wi-Fi router that happens to have PCI Express. 197 00:15:09,940 --> 00:15:11,480 It's a mini PCIe slot. 198 00:15:11,480 --> 00:15:14,100 We hook it up over USB to this computer. 199 00:15:14,980 --> 00:15:16,580 We've got a console as well. 200 00:15:16,820 --> 00:15:21,700 So on the console we're going to try and log into this thing and actually we're already logged in, but we want to look at a file. 201 00:15:21,860 --> 00:15:24,020 Let's say we want to check the shadow file. 202 00:15:26,100 --> 00:15:27,180 Come on. 203 00:15:27,360 --> 00:15:29,340 So shadow file is owned by root. 204 00:15:29,340 --> 00:15:31,060 I'm not supposed to be able to read it. 205 00:15:31,260 --> 00:15:34,460 And if I go and cat it, I get my permission denied. 206 00:15:34,640 --> 00:15:38,200 So I'll go over and run my little script, which is going to go in the other window. 207 00:15:38,740 --> 00:15:45,220 This script is going to talk to that PCI Express device and tell it, hey, go find this address in memory, patch it and see what happens. 208 00:15:45,220 --> 00:15:46,880 So we found our device. 209 00:15:46,880 --> 00:15:48,600 It's this net chip technology board. 210 00:15:48,600 --> 00:15:51,480 We patch it, patch the generic permission function in Linux. 211 00:15:51,560 --> 00:15:53,600 That's what checks the permission on file accesses. 212 00:15:53,700 --> 00:15:56,600 That little thing over there, read and wrote to the memory for the CPU. 213 00:15:56,960 --> 00:16:00,760 And if we go back and we try and cat Etsy shadow, it should work. 214 00:16:03,140 --> 00:16:04,680 And it works. 215 00:16:04,680 --> 00:16:05,380 There we go. 216 00:16:05,400 --> 00:16:06,120 Yay. 217 00:16:06,620 --> 00:16:07,280 Okay. 218 00:16:11,010 --> 00:16:14,210 So we can also unpatch it and, you know, make it go back to normal. 219 00:16:14,210 --> 00:16:16,410 But we're going to call it done. 220 00:16:17,430 --> 00:16:18,570 Is this you or me? 221 00:16:18,570 --> 00:16:19,350 Okay. 222 00:16:19,350 --> 00:16:22,390 So key take away, PCI Express is permissive by design. 223 00:16:22,390 --> 00:16:26,230 And that demo isn't anything different than what we did 10 years ago. 224 00:16:26,230 --> 00:16:28,430 So let's talk about what's changed since then. 225 00:16:28,970 --> 00:16:34,210 So there's been a lot more approaches and ideas behind what to do. 226 00:16:34,210 --> 00:16:37,230 So here's my DMA attacks, DMA attack taxonomy. 227 00:16:37,230 --> 00:16:38,470 I just made this up. 228 00:16:38,870 --> 00:16:42,490 There's tethered attacks, there's drive by attacks and there are embedded attacks. 229 00:16:42,490 --> 00:16:44,990 So a tethered attack looks kind of like this. 230 00:16:45,230 --> 00:16:47,990 We've got the system on the left, that's our target system. 231 00:16:48,070 --> 00:16:51,350 We see there's a cable running over to the thing on the right. 232 00:16:51,410 --> 00:16:52,530 And that is the attack device. 233 00:16:52,530 --> 00:16:57,990 That's actually a Xilinx FPGA board. 234 00:16:58,790 --> 00:17:04,770 And attached to it on the far right is a little blue board that's a FTDI high speed IO board. 235 00:17:04,770 --> 00:17:13,370 And you can barely see there's a little itty bitty, there's a cursor there, a little bitty thing over there, that little USB cable, that connects to the computer that actually does all the real work. 236 00:17:13,370 --> 00:17:16,910 So you're not going to sneak up to someone's laptop and do this to it. 237 00:17:17,170 --> 00:17:21,910 This is, it's slotted into a machine , you've got a lot of hardware, it's kind of a pain in the butt. 238 00:17:22,210 --> 00:17:23,730 So that's a tethered attack . 239 00:17:24,530 --> 00:17:29,730 Now a drive by attack would be something like you just walk up to the system, plug something in and do your whole thing. 240 00:17:29,890 --> 00:17:33,890 And so what we've got here is we've got an express card reader , thunderbolt to express card. 241 00:17:33,890 --> 00:17:36,430 So you plug this into a thunderbolt port, you've got an express card. 242 00:17:36,430 --> 00:17:43,930 In the express card reader you have an express card to mini PCI adapter and in the mini PCI adapter slot you have one of the old slot screamer boards. 243 00:17:44,410 --> 00:17:45,790 And this can do the same thing, right? 244 00:17:45,790 --> 00:17:52,130 So if you don't have any thunderbolt protections turned on, which we'll talk about in a second, then you could just like walk up to a system, plug it in and do some DMA. 245 00:17:53,270 --> 00:17:55,790 And last we've got embedded type attacks. 246 00:17:55,790 --> 00:18:00,110 And this is where we, you know, actually like stick the thing inside the system, close it up and leave it there for a while. 247 00:18:00,130 --> 00:18:04,950 So this is Pico DMA, which is a project of a few, from a few years ago, I believe 2019. 248 00:18:06,150 --> 00:18:09,370 And what they used is they used that board on top, which is called Pico EVB. 249 00:18:09,370 --> 00:18:12,110 It was a little Xilinx development board. 250 00:18:12,510 --> 00:18:19,910 And they paired it up with these Pycom modules, which let them do either wireless, you know, Bluetooth or 4G connectivity to this device. 251 00:18:19,910 --> 00:18:24,750 And they could package it all inside the case of a laptop and, you know, no one would be the wiser. 252 00:18:25,290 --> 00:18:29,670 You'd be surprised, you know, how many of you have opened up your laptop and looked inside? 253 00:18:29,670 --> 00:18:32,470 How many of you know what every one of those chips does in there? 254 00:18:33,150 --> 00:18:33,690 Not many. 255 00:18:33,690 --> 00:18:34,430 I don't. 256 00:18:34,430 --> 00:18:38,850 So like, it's pretty, pretty, pretty interesting what you can cram in those places. 257 00:18:38,950 --> 00:18:42,890 Luckily, things are getting smaller, so it's harder to, like, hide stuff like this, but whatever. 258 00:18:42,970 --> 00:18:44,830 So this is an embedded kind of attack. 259 00:18:45,090 --> 00:18:46,830 So, you know, here's my little chart. 260 00:18:46,830 --> 00:18:51,050 If it's quick access, it's a hot plug, it's short term, you're right, that's a drive-by attack. 261 00:18:51,110 --> 00:18:58,890 If we're sticking it in there, we're leaving it there for a long time, we're reboot, persisting over reboots, you know, that's an embedded, everything else is kind of like in between those tether attacks. 262 00:18:59,110 --> 00:19:00,290 They're a little more complicated. 263 00:19:01,530 --> 00:19:03,730 So let's, let's kind of change gears a little bit. 264 00:19:03,730 --> 00:19:06,090 Let's talk about, like, the multi-tenant threat model. 265 00:19:06,170 --> 00:19:08,290 So this is like the cloud provider situation. 266 00:19:08,670 --> 00:19:12,790 So we've got a lot of cloud providers that want to give, uh, access to computers. 267 00:19:12,790 --> 00:19:15,530 Some of them want to, like , give you bare metal, some of them want to give you VMs. 268 00:19:15,530 --> 00:19:20,990 Some of those VMs, they want to have FPGAs or GPUs attached to them, which are PCI Express attached devices. 269 00:19:21,010 --> 00:19:23,010 So, like, there's some, there's some things to worry about. 270 00:19:23,010 --> 00:19:24,050 So what, what are we working on? 271 00:19:24,050 --> 00:19:25,990 We're working on making money by sharing hardware. 272 00:19:26,330 --> 00:19:26,870 Okay? 273 00:19:26,870 --> 00:19:29,510 It's pretty much the, the, the threat, like, their objective, right? 274 00:19:29,510 --> 00:19:30,530 What can go wrong? 275 00:19:30,670 --> 00:19:32,090 Hardware assisted tenant hopping. 276 00:19:32,090 --> 00:19:40,670 So if you go and get a, a VM on a system with a GPU and you can do something with that GPU to access another tenant on the same system, that would be bad. 277 00:19:40,810 --> 00:19:41,890 So what are we going to do about it? 278 00:19:41,890 --> 00:19:44,850 We're going to use an IOMMU to go and protect devices from each other. 279 00:19:44,850 --> 00:19:46,670 An IOMMU, memory management unit. 280 00:19:46,750 --> 00:19:47,390 Okay? 281 00:19:47,390 --> 00:19:48,410 Did we go to a job? 282 00:19:48,410 --> 00:19:50,130 Um, it kind of works. 283 00:19:50,130 --> 00:19:52,590 So, Grace, you want to tell us about that? 284 00:19:52,870 --> 00:19:53,390 Sure. 285 00:19:55,590 --> 00:20:06,530 So, um, in order to understand IOMMU, you first have to understand kind of what the problem IOMMU is trying to solve. 286 00:20:06,530 --> 00:20:18,670 So, um, as Joe just said, we're trying to prevent, uh, crossing, uh, boundaries, um, using hardware. 287 00:20:18,670 --> 00:20:30,550 And so, uh, how we originally did this is we used a, um, our virtual machine, uh, emulated a device. 288 00:20:30,590 --> 00:20:45,270 And so instead of our virtual machine just being able to talk directly to that device, um, it had a driver instead for a virtual device, uh, provided by the virtual machine. 289 00:20:46,410 --> 00:20:59,270 Then the virtual machine has to take time to process, or the, the hypervisor has to take time to process that device, um, emulating it. 290 00:20:59,270 --> 00:21:03,390 And then it itself has to have a driver for the actual hardware. 291 00:21:04,110 --> 00:21:06,810 That's a lot of processing. 292 00:21:06,930 --> 00:21:24,830 Um, so instead, uh, what IOMMU allows us to do is our hypervisor actually uses the IOMMU to remap hardware, um, so that the hardware just appears directly in the virtual machine's memory. 293 00:21:25,070 --> 00:21:27,670 Um, and this makes things a lot faster. 294 00:21:27,670 --> 00:21:34,870 The virtual machine can just use the normal, uh, device driver and it can just talk directly to the hardware. 295 00:21:37,210 --> 00:21:59,970 Um, and one of the things that's kind of a byproduct of this is, um, because the IOMMU has to map devices to various address spaces, um, that device, those devices can't just arbitrarily read and write to memory outside of the address that it was written to. 296 00:22:06,030 --> 00:22:08,730 Someone keeps moving this microphone up too high. 297 00:22:08,890 --> 00:22:11,970 Um, so take away from that, like, the mitigations exist. 298 00:22:11,970 --> 00:22:20,730 There is features built into CPUs for nearly 20 years that can let us go and protect hardware devices from our system, our system from hardware devices and hardware devices from each other. 299 00:22:21,550 --> 00:22:25,710 Um, so, of course, you know, once we have something figured out, we always kind of make it harder. 300 00:22:25,710 --> 00:22:27,210 So let's talk about Thunderbolt for a minute. 301 00:22:27,370 --> 00:22:29,370 Um, so Thunderbolt threat model, what are we working on? 302 00:22:29,370 --> 00:22:31,690 We want high speed peripherals, okay? 303 00:22:31,690 --> 00:22:39,850 We want them outside the case, you want to plug them in, you use them and then leave them at home or take them with us and bring them to another computer, like a high speed drive or, uh, data capture devices. 304 00:22:39,970 --> 00:22:41,150 Um, what can go wrong? 305 00:22:41,150 --> 00:22:43,410 Malicious Thunderbolt devices, okay? 306 00:22:43,410 --> 00:22:46,790 That's kind of like the answer to all of the what can go wrong in this talk. 307 00:22:46,970 --> 00:22:48,230 Um, what are we going to do about it? 308 00:22:48,230 --> 00:22:52,770 Well, at this point, we do actually a pretty good job of, uh, authenticating and isolating devices. 309 00:22:52,970 --> 00:22:54,950 Um, and did we do a job? 310 00:22:54,950 --> 00:22:57,950 It took time, but, like, we eventually got there. 311 00:22:58,170 --> 00:22:59,550 So there are mitigations, right? 312 00:22:59,550 --> 00:23:02,930 Thunderbolt was released in 2011, right? 313 00:23:02,930 --> 00:23:04,330 That's a long time ago. 314 00:23:04,430 --> 00:23:06,650 Um, how many of you were born in 2011? 315 00:23:06,670 --> 00:23:21,010 Okay, most, uh, anyway, um, and before the IOMU's existed, even before then, um, Mac OS 10.8.2 was pretty quick to, uh, have, uh, basically built in support for the IOMU to protect Thunderbolt devices. 316 00:23:21,010 --> 00:23:26,550 Of course, like, Macs were the only computers that had Thunderbolt devices for a while, so maybe that's why. 317 00:23:26,550 --> 00:23:35,450 Um, but eventually Windows 10 8, build 1802 got support for using IOMU and their kernel DMA protection, uh, in 2018, uh, a scant seven years later. 318 00:23:35,570 --> 00:23:37,910 Um, and even Linux got in on the action. 319 00:23:37,910 --> 00:23:44,830 So in Linux kernel five in 2019, uh, eight years after Thunderbolt was released, um, they also had some of these protections built in. 320 00:23:44,910 --> 00:23:46,810 Now, they're not perfect. 321 00:23:46,830 --> 00:23:53,150 I'm sure there are issues in them, but the fact is, like, it was eight years before they existed at all. 322 00:23:53,390 --> 00:23:58,030 Um, so my takeaway from that is, like, Thunderbolt got fixed eventually, right? 323 00:23:58,030 --> 00:24:08,950 I actually, when I, uh, yeah, I've been working on this for a long time, so like, I was like, wait, okay, so by now I'm sure that all these protections have been built into the operating systems and I get, I check, I'm like, oh, wait, no. 324 00:24:09,150 --> 00:24:11,210 Uh, anyway, so eventually got fixed. 325 00:24:11,210 --> 00:24:15,110 So Thunderbolt isn't the easy way to just plug in and do a drive by attack anymore. 326 00:24:15,130 --> 00:24:16,010 Grace? 327 00:24:18,470 --> 00:24:26,790 So, um, you may be thinking now that, uh, Thunderbolt got fixed, um, how are we going to do drive by DMA attacks? 328 00:24:27,050 --> 00:24:30,410 Well, um, DMA finds a way. 329 00:24:33,320 --> 00:24:37,380 Who here by show of hands recognizes this port? 330 00:24:37,840 --> 00:24:41,940 If you are thinking that is display ports, you are wrong. 331 00:24:41,940 --> 00:24:44,100 That is in fact, Oculink. 332 00:24:44,100 --> 00:24:47,220 Um, so what is Oculink? 333 00:24:47,400 --> 00:24:58,520 Oculink is a, um, interface that we came up with because we wanted to be able to attach our GPUs to our laptops. 334 00:24:58,640 --> 00:25:04,340 Um, now you may be thinking, wait, we just finished, we just fixed Thunderbolt. 335 00:25:04,340 --> 00:25:06,260 Why aren't we using Thunderbolt? 336 00:25:06,280 --> 00:25:20,720 Um, well, Thunderbolt, um, while it is more secure, it's also, um, have, um, Thunderbolt has, uh, quite a bit of overhead. 337 00:25:20,720 --> 00:25:25,440 Um, and also it's significantly more expensive. 338 00:25:25,440 --> 00:25:32,800 Um, so what we decided to do instead was, uh, once again, we brought PCIe outside of the case. 339 00:25:33,000 --> 00:25:38,280 So Oculink is basically just PCIe over a cable. 340 00:25:38,280 --> 00:25:44,740 Um, amusingly a cable, uh, from server, uh, storage. 341 00:25:45,100 --> 00:25:56,580 So I don't think that's really meant to be plugged and unplugged as many times as they're thinking it will be for connecting a GPU to a mobile device. 342 00:25:56,580 --> 00:25:58,260 But I digress. 343 00:25:59,360 --> 00:26:02,820 Um, and this is actually really kind of cool. 344 00:26:02,820 --> 00:26:10,480 Uh, we've taken this thing that's not supposed to be used this way and we've decided to use it. 345 00:26:10,480 --> 00:26:14,000 Um, and isn't that what hacking is? 346 00:26:17,460 --> 00:26:19,740 So some more armchair hacking. 347 00:26:19,840 --> 00:26:21,060 So what are we working on? 348 00:26:21,060 --> 00:26:23,480 We want, um, high speed peripherals again, just like Thunderbolt. 349 00:26:23,480 --> 00:26:24,360 Same thing. 350 00:26:24,360 --> 00:26:25,180 What can go wrong? 351 00:26:25,180 --> 00:26:25,700 Same thing. 352 00:26:25,700 --> 00:26:27,180 We can have malicious devices. 353 00:26:27,920 --> 00:26:29,600 Anybody want to guess what we're going to do about it? 354 00:26:30,360 --> 00:26:31,500 Probably, yeah, nothing. 355 00:26:31,600 --> 00:26:33,840 Only, only use it in secured locations. 356 00:26:33,900 --> 00:26:34,780 Like, yeah. 357 00:26:34,960 --> 00:26:36,640 Who here uses any GPU? 358 00:26:38,540 --> 00:26:41,660 So when you, like, you, you leave your Oculink GPU at home, right? 359 00:26:41,660 --> 00:26:46,040 And then you take your laptop with you, which has the Oculink port on it wherever you go. 360 00:26:46,040 --> 00:26:47,740 Like, but you never leave it out of your sight, right? 361 00:26:47,740 --> 00:26:50,100 So anyway, did we do a good job? 362 00:26:50,100 --> 00:26:51,080 Uh, not really. 363 00:26:51,080 --> 00:26:53,080 So now we got, um, Oculink, right? 364 00:26:53,080 --> 00:26:54,220 Let's, let's go and use it. 365 00:26:54,220 --> 00:26:55,000 Let's, let's do it. 366 00:26:55,000 --> 00:26:58,860 Let's figure out a new drive by attack for a cool demo for, for the talk. 367 00:26:58,920 --> 00:27:07,120 Um, and I, you know, I like to do like junk hacking and I kind of feel like crypto's junk hacking because it's all crap. 368 00:27:07,200 --> 00:27:11,360 Um, and so, uh, MetaMask is, uh, so I, I got some help. 369 00:27:11,360 --> 00:27:12,680 So is Dean here? 370 00:27:12,680 --> 00:27:13,540 Thanks Dean. 371 00:27:13,540 --> 00:27:14,800 Dean helped me out with this demo. 372 00:27:14,920 --> 00:27:19,220 Um, like, so we've got this device. 373 00:27:19,580 --> 00:27:20,380 Um, what can we do? 374 00:27:20,380 --> 00:27:25,160 Can we like go and mess with MetaMask somehow if we have the ability to read and write all of memory? 375 00:27:25,300 --> 00:27:27,500 And of course the answer is yes. 376 00:27:28,040 --> 00:27:28,760 Is it playing? 377 00:27:28,760 --> 00:27:29,120 Here we go. 378 00:27:29,120 --> 00:27:33,040 So we got MetaMask running and you can see here we want to go and send some money. 379 00:27:33,960 --> 00:27:40,360 Um, and so some just random name that we choose, send, send some random person a dollar of USDC. 380 00:27:41,100 --> 00:27:43,260 Um, and so this is all on a computer. 381 00:27:43,260 --> 00:27:49,920 This is a browser extension inside of a browser, inside of a sandbox and all that crap inside of this machine. 382 00:27:50,280 --> 00:27:53,180 Um, and we're about to go send it, but let's go like run this thing. 383 00:27:53,180 --> 00:27:55,000 You see who it's going to, right? 384 00:27:55,000 --> 00:27:56,080 Well, that's just stored in memory. 385 00:27:56,460 --> 00:27:59,040 And so like, let's just send it to this other address instead. 386 00:27:59,160 --> 00:28:03,220 I mean, we just put a bunch of sixes in there to like make it a little easier to make sure we got it working wrong. 387 00:28:03,360 --> 00:28:05,120 But anyway, so let's cancel that. 388 00:28:05,120 --> 00:28:10,240 We still have this, this process running in the background continuously going and doing a DMA scan for the right string. 389 00:28:10,640 --> 00:28:17,320 But if we go and we get another transaction, we want to send some magic money, some Chuck E. 390 00:28:17,320 --> 00:28:19,380 Cheese coins over to some dude. 391 00:28:20,540 --> 00:28:25,740 Um, and yeah, who cares how many gallons of fuel we took, but whatever. 392 00:28:26,120 --> 00:28:30,940 So let's boil, boil a pot full of frogs and continue and it's running. 393 00:28:30,940 --> 00:28:35,500 And so you'll see, it'll take a moment, but as soon as we find it in memory, bam, it's overwritten. 394 00:28:35,500 --> 00:28:37,260 But oh, wow, what was that? 395 00:28:37,260 --> 00:28:39,320 That's okay, we keep looking, we keep looking. 396 00:28:39,540 --> 00:28:46,200 Memory is a pretty crazy how fragmented it is and how like when you, when you free and renew stuff, like it shows up all over the place. 397 00:28:46,200 --> 00:28:50,380 So it's not easy to go and find out exactly where this is without scanning through all of memory. 398 00:28:50,500 --> 00:29:05,400 Anyway, we never clicked continue, we never clicked confirm, but like we were able to pretty much, you know, change that address in the time between setting up the transaction and going to go confirm and send that, that $1 to some stranger whose address ends in 6s. 399 00:29:05,520 --> 00:29:08,080 So, I thought that was kind of cool. 400 00:29:08,100 --> 00:29:12,720 So Dean actually threw together this, this, this framework to help me put together this demo, um, passive. 401 00:29:12,740 --> 00:29:16,760 So, um, you've seen the movie Inception, right? 402 00:29:16,760 --> 00:29:26,440 There's a tool, there's a, there's a tool called Inception for DMA access and firewire access and so, uh, Dean thought that passive peripheral attack simulation introspection vehicle would be a good way to do this. 403 00:29:26,440 --> 00:29:33,460 So, um, disclosure, that was not on hardware, that was in a VM, um, because it's a lot easier. 404 00:29:33,500 --> 00:29:40,740 Um, and, but the reality is, you know, whether you have a VM or whether you have a hardware attached device, we're still doing memory access and we'll talk a little bit more about that in just a moment. 405 00:29:40,800 --> 00:29:44,520 Um, but first, let's like diverge into some game cheating stuff. 406 00:29:47,570 --> 00:29:53,270 Okay, so, first off, show of hands, who here cheats at games? 407 00:29:55,630 --> 00:29:56,410 Why? 408 00:29:59,940 --> 00:30:06,640 Um, and, and for that matter, uh, how do you, how do you have a time to play video games? 409 00:30:08,720 --> 00:30:12,380 See, that's what I was thinking, because, probably because you cheat. 410 00:30:12,780 --> 00:30:17,020 Uh, yeah, but, uh, who, who, who pays other people to develop cheats for them? 411 00:30:17,860 --> 00:30:26,160 Uh, yeah, that's like, if you're gonna do, if you're gonna cheat, like if you develop yourself, I think it's cool, but like, I don't know, I think paying for cheats is kinda cheap, but, actually it's really expensive, never mind. 412 00:30:26,200 --> 00:30:26,980 Grace, go ahead. 413 00:30:27,840 --> 00:30:31,720 But yeah, so, um, I don't really understand why people cheat. 414 00:30:31,720 --> 00:30:43,480 Uh, developing cheats, that I can understand, that sounds like a pretty cool puzzle, but actually using that cheat to, um, not play a game, kinda defeats the purpose in my opinion. 415 00:30:43,480 --> 00:30:45,500 But, I digress. 416 00:30:45,640 --> 00:30:51,120 Um, so, here is a website that sells game cheats. 417 00:30:51,120 --> 00:30:57,060 So, if you notice, on the left, we have, uh, just a cheat. 418 00:30:57,060 --> 00:31:03,520 And I know it's tiny text, but this is, uh, this is for one month. 419 00:31:03,520 --> 00:31:10,640 And even tinier text, it does not include the hardware you actually need to run the cheat, nor the firmware. 420 00:31:11,340 --> 00:31:18,080 In the center, we have the basic package for a measly $720. 421 00:31:18,220 --> 00:31:24,640 And what this includes is the cheat for, again, for only one month. 422 00:31:24,640 --> 00:31:29,620 Uh, DMA card, um, and firmware for that card. 423 00:31:29,620 --> 00:31:37,500 And then, finally, on the right, we have something more for yet another ridiculous amount of money. 424 00:31:37,500 --> 00:31:40,060 Um, again, only for one month. 425 00:31:40,060 --> 00:31:51,160 Um, and the thing about this is, is it's actually all built off of the stuff that people have developed and open sourced that we have talked about. 426 00:31:51,160 --> 00:31:55,440 Things like, uh, slot screamer, PCI leach. 427 00:31:55,540 --> 00:32:02,880 They are basically repackaging this and selling it to you when you have it, basically, for free. 428 00:32:08,610 --> 00:32:12,090 So, yeah, it's always interesting to see what people will sell on the internet. 429 00:32:12,110 --> 00:32:17,530 Um, and, you know, like the whole monthly service fee, it seems silly, but, like, it's a, it's a, it's an arms race. 430 00:32:17,530 --> 00:32:26,850 So, between the game developers and the cheaters, like, so, it actually is, you need to come up with new ways of deceiving the game to thinking that, like, you don't have a malicious device in. 431 00:32:26,850 --> 00:32:36,930 So, for example, it's like this PCI, PCI DMA, NVME, uh, thingy, is gonna basically, like, look like an NVME so that your anti-cheat doesn't say, oh, you've got a cheat device in there. 432 00:32:36,930 --> 00:32:40,410 It says, oh, you just got an NVME, a hard drive, and that's what you're running from. 433 00:32:40,550 --> 00:32:45,530 Um, so, it's, it's pretty crafty, the levels of, uh, of, uh, stuff going into this . 434 00:32:45,530 --> 00:32:48,110 Um, a lot of them are based on, uh, PCI leach. 435 00:32:48,110 --> 00:32:50,350 Um, some of them ship with PCI leach generic firmware. 436 00:32:50,350 --> 00:32:57,090 Some of them customize it a bit, um, which is good, but, like, the number of people who actually go back and support PCI leach. 437 00:32:57,090 --> 00:33:03,470 So, you'll see over there that, like, a few of these, uh, Screamers, uh, Squirrel, the ZDMA and LeetDMA, they're all project sponsors of PCI leach. 438 00:33:03,470 --> 00:33:07,370 So, if you do wanna go and mess around with PCI leach, um, that's the way you should go. 439 00:33:08,250 --> 00:33:13,630 Um, one of the key takeaways, though, is that changing the form factor is changing the threat model, right? 440 00:33:13,630 --> 00:33:26,610 So, you know, changing to, um, this game situation, like, you're, we, we have the owner of the PC being the person, so even, even if we had stuff inside the case, it's not really the same, because, you know, you're the owner of the machine, you can get inside the case. 441 00:33:26,790 --> 00:33:33,650 Um, another difference of, of changing the form factor is, uh, maybe going to a different , uh, type of device. 442 00:33:33,650 --> 00:33:34,610 And so, Grace? 443 00:33:35,590 --> 00:33:36,390 Okay. 444 00:33:38,270 --> 00:33:41,830 Um, so, how many of you have seen these before ? 445 00:33:41,990 --> 00:33:46,950 So, we have, uh, CF Express on the left and ST Express on the right. 446 00:33:47,150 --> 00:33:52,730 Um, these are both relatively new, um, devices, uh, storage devices. 447 00:33:52,830 --> 00:34:02,930 And, um, you may recognize them from some, uh, devices that you own, uh, especially if, no. 448 00:34:02,930 --> 00:34:03,850 Yeah. 449 00:34:03,890 --> 00:34:09,810 Um, who, who has, who has used a CF Express device? 450 00:34:10,070 --> 00:34:10,870 Okay. 451 00:34:10,870 --> 00:34:14,170 Who, who has used an ST Express device? 452 00:34:14,270 --> 00:34:15,330 Okay. 453 00:34:15,450 --> 00:34:17,730 So, I don't know if you know what they are, though. 454 00:34:18,950 --> 00:34:26,990 Um, and so, basically, um, uh, you probably have seen these. 455 00:34:26,990 --> 00:34:35,590 The, the interesting thing about these, though, is, um, once again, they are PCIe, um, and support DMA. 456 00:34:35,750 --> 00:34:54,330 Uh, so, on the right, on the ST Express, you may notice, uh, we have a few extra contacts, and what those are is actually, uh, PCIe lanes, uh, just like you would find on, like, a network card or M.2 device. 457 00:34:56,970 --> 00:34:57,750 Yeah. 458 00:34:58,010 --> 00:35:03,950 And so, uh, what threat model are they working with? 459 00:35:03,950 --> 00:35:11,490 Um, so, we know, uh, they are working with high speed small storage. 460 00:35:11,910 --> 00:35:14,530 Um, what could possibly go wrong? 461 00:35:14,530 --> 00:35:18,590 Well, I think you may have caught on to a theme at this point. 462 00:35:18,590 --> 00:35:20,670 It's malicious devices. 463 00:35:20,750 --> 00:35:23,350 And what are we going to do about it? 464 00:35:23,350 --> 00:35:27,790 We, of course, being the manufacturers of devices that use these. 465 00:35:28,470 --> 00:35:30,250 We don't actually know. 466 00:35:30,250 --> 00:35:36,790 We're kind of, they kind of don't invite us to other threat modeling, uh, meetings. 467 00:35:36,890 --> 00:35:42,150 Um, so, did they do a good job of, of preventing attacks? 468 00:35:42,250 --> 00:35:44,490 We also don't know yet. 469 00:35:44,550 --> 00:35:57,450 Um, and so, one of the things is, uh, so, how many of you have, like, tried attacking any of these devices? 470 00:35:58,350 --> 00:35:59,510 Few. 471 00:35:59,510 --> 00:36:03,250 Um, so, you may be wondering why is an Xbox up there? 472 00:36:03,250 --> 00:36:14,470 Well, actually, that aforementioned, uh, CF Express card is the exact same card that they're using for the memory expansion cards. 473 00:36:14,650 --> 00:36:19,910 Um, it's just packaged in a nice piece of plastic. 474 00:36:19,950 --> 00:36:27,530 Um, also, we have the Nikon, uh, which also uses that, uh, CF Express, uh, card. 475 00:36:28,010 --> 00:36:31,910 And then finally, this one is really new. 476 00:36:31,910 --> 00:36:36,010 Uh, this is the Switch 2, uh, just came out a little bit ago. 477 00:36:36,010 --> 00:36:38,750 And it uses SD Express. 478 00:36:40,850 --> 00:36:48,530 Uh, and so, an example of SD Express. 479 00:36:49,210 --> 00:36:49,930 Sure. 480 00:36:50,490 --> 00:36:54,870 So, so, this is still, uh, you know, in research. 481 00:36:54,870 --> 00:36:56,670 Um, so, CF Express, right? 482 00:36:56,670 --> 00:36:57,730 It's a device. 483 00:36:57,730 --> 00:36:58,650 It has NVMe. 484 00:36:58,650 --> 00:37:00,130 It has, um, what's it called? 485 00:37:00,130 --> 00:37:00,990 PCI Express. 486 00:37:00,990 --> 00:37:05,810 And so, what we can basically do is, uh, instead of plugging our, you know, excuse us. 487 00:37:05,810 --> 00:37:12,550 So, this is a card reader for, uh, XQD, which is pinout compatible and also PCI Express compatible with, uh, SD Express. 488 00:37:12,550 --> 00:37:14,530 So, the reader is pretty much not, not much to it. 489 00:37:14,530 --> 00:37:18,770 Uh, it basically is a, wires it up to, uh, PCI Express. 490 00:37:18,770 --> 00:37:21,750 Um, but if we wanted to, we could go and do something stupid like this. 491 00:37:21,750 --> 00:37:30,770 And we can hook up our, uh, camera with a adapter, which goes and takes the SD Express outside to an M.2 slot, where if we pop, put in our malicious device. 492 00:37:30,950 --> 00:37:33,970 And you can see on the screen, it says, uh, card not currently supported. 493 00:37:34,230 --> 00:37:37,230 Um, so, it does, uh, it does check the device. 494 00:37:37,230 --> 00:37:38,110 It does enumerate. 495 00:37:38,110 --> 00:37:41,370 It does check to see if it's, uh, the right type of NVMe device. 496 00:37:41,430 --> 00:37:49,750 Um, and then there's probably some magic that I need to be getting figured out to go and actually let it stay enumerated and not get the, throw the error up and disconnect. 497 00:37:49,750 --> 00:37:57,630 Um, once we've got that, like, we'll have to see what this little SOC on here actually does in terms of, you know, I'm not sure that camera has an IOMU. 498 00:37:57,630 --> 00:38:00,870 This is a seven-year-old camera, but, you know, you can be surprised. 499 00:38:01,250 --> 00:38:04,550 Um, so it'll be interesting to see what, what we can get off of the device that way. 500 00:38:05,870 --> 00:38:11,530 Um, so we've got to switch to, switch to is like the first device that actually uses SD Express, which is pretty cool. 501 00:38:11,530 --> 00:38:15,230 Um, I actually grabbed some SD Express cards a while ago and some readers. 502 00:38:15,270 --> 00:38:19,750 Um, I was not really surprised to see that most, uh, these are two different SD Express readers. 503 00:38:19,750 --> 00:38:23,790 One's, uh, Sabrent and one is, uh, uh, SanDisk. 504 00:38:23,890 --> 00:38:25,790 Um, they're using the exact same chips. 505 00:38:25,790 --> 00:38:31,690 The one on the left is the green board has two of these little, uh, SD Express, uh, controller chips from Realtek. 506 00:38:31,690 --> 00:38:34,250 The one on the right has the same exact chip, but only one. 507 00:38:34,330 --> 00:38:43,150 Um, and these chips actually hook up to this other chip, which is, you know, billed as a multi -purpose one, but, uh, basically it's a, it's an NVIB and a USB adapter, right? 508 00:38:43,150 --> 00:38:45,970 So we take SD Express and turn it into NVME. 509 00:38:45,970 --> 00:38:52,410 We take the NVME and turn it into USB and we plug it into our system and we store it, mount it as a mass storage device. 510 00:38:53,070 --> 00:38:56,290 So, um, you know, Switch, brand new. 511 00:38:56,290 --> 00:38:58,950 I literally just got one last week. 512 00:38:59,430 --> 00:39:01,510 Who wants to see a Switch 2 jailbreak? 513 00:39:02,450 --> 00:39:03,250 Yeah? 514 00:39:03,270 --> 00:39:04,370 You want to see one? 515 00:39:04,610 --> 00:39:07,390 We only, we only have seven minutes left though. 516 00:39:07,550 --> 00:39:09,330 So do you want to see it? 517 00:39:09,670 --> 00:39:11,070 Yeah, so do I. 518 00:39:11,070 --> 00:39:13,810 So, um, sorry. 519 00:39:13,970 --> 00:39:17,150 Um, so the takeaway here is, uh, PCI Express is pervasive. 520 00:39:17,150 --> 00:39:19,610 I literally got the Switch the day I left to come to Las Vegas. 521 00:39:19,630 --> 00:39:23,230 So, like, haven't had a chance to poke around too much, but maybe some of you will. 522 00:39:23,230 --> 00:39:27,110 Um, there are some, um, boards you can get. 523 00:39:27,110 --> 00:39:31,550 A couple folks have already made the adapter boards to break out the Switch into the NVME pieces. 524 00:39:31,550 --> 00:39:32,810 You can get some adapters. 525 00:39:32,950 --> 00:39:37,570 Um, so hopefully in time we'll get all the rigging hooked up and maybe we can poke at it some more. 526 00:39:38,050 --> 00:39:39,930 So we're going to kind of scramble through. 527 00:39:39,930 --> 00:39:42,930 Uh, let's resume this continuing tale of epic procrastination. 528 00:39:43,090 --> 00:39:45,990 Um, I procrastinate and put it off all the way to the end of the presentation. 529 00:39:46,250 --> 00:39:49,210 Um, so 2021, we finally got together a schematic for Erebus. 530 00:39:49,210 --> 00:39:56,050 Uh, we got PCBs put together in 2022 and had a panic because suddenly you couldn't buy the chips that we needed to put the thing together. 531 00:39:56,050 --> 00:40:00,350 So we actually had to do a redesign of some of the PCB to replace components that were discontinued. 532 00:40:00,550 --> 00:40:05,590 Uh, we, uh, uh, uh, you know, uh, bought, you know, we're, we're, we're, we're chip preppers. 533 00:40:05,590 --> 00:40:09,430 So we, we bought a lot of compatible chips to hopefully last us for a long time. 534 00:40:09,450 --> 00:40:11,590 So we wouldn't be blocked by not having chips. 535 00:40:11,610 --> 00:40:14,790 Uh, it would have been fine though because we were blocked by our own procrastination. 536 00:40:14,950 --> 00:40:17,610 We finally got the test jig together in 2023. 537 00:40:17,610 --> 00:40:19,770 And once we had the test jig together, we assembled the boards. 538 00:40:19,850 --> 00:40:22,110 Um, and now it's time to profit, right? 539 00:40:22,710 --> 00:40:23,890 Um, we're getting there. 540 00:40:23,910 --> 00:40:25,750 Um, so this is Erebus. 541 00:40:25,750 --> 00:40:31,670 Um, how many of you came here thinking you're gonna, I'd show off like a completely working functioning Erebus board. 542 00:40:31,670 --> 00:40:33,290 Yeah, I apologize. 543 00:40:33,830 --> 00:40:35,650 I'm a, I'm a procrastinator. 544 00:40:35,770 --> 00:40:42,010 Um, but what I do want to go is talk about why Erebus exists and what we put into like make designing it and what for. 545 00:40:42,330 --> 00:40:45,070 Um, so it does power on, it does work. 546 00:40:45,070 --> 00:40:46,930 We don't have PCI express fully working yet. 547 00:40:46,930 --> 00:40:49,470 We have some reset issues that we need to deal with. 548 00:40:49,750 --> 00:40:51,490 Um, how do I get to escape? 549 00:40:51,710 --> 00:40:56,330 Um, the objective here is we've got a, a lot of ECP5 FPGA. 550 00:40:56,370 --> 00:40:58,230 Um, we've got DRAM built into it. 551 00:40:58,230 --> 00:40:59,790 I'm not showing this picture on the backside. 552 00:40:59,790 --> 00:41:01,230 We've got a spot to put an SD card. 553 00:41:01,230 --> 00:41:06,270 So this thing fits where your wifi module might go and you can pop it in a system and leave it there. 554 00:41:06,270 --> 00:41:11,530 If you got a two terabyte SD card in there, you can do a lot of memory dumps on a system before you go and retrieve it. 555 00:41:11,530 --> 00:41:17,190 So this is like the embedded, like, uh, DMA attack device, uh, dream once it works. 556 00:41:17,370 --> 00:41:21,250 Um, you can see we've got some test code running flashing lights. 557 00:41:21,270 --> 00:41:26,710 Um, one of the things we wanted to address is that like a lot of devices, this is from PCI leach's repository. 558 00:41:26,710 --> 00:41:31,430 A lot of these devices are using Xilinx's proprietary IP cores for PCI express. 559 00:41:31,650 --> 00:41:33,830 Um, one of the issues with that is licensing. 560 00:41:33,830 --> 00:41:37,070 They're actually not probably licensed properly and that shouldn't be sold the way they are. 561 00:41:37,070 --> 00:41:41,450 Um, but more importantly, like it limits what you can do in terms of messing with the TLP level stuff. 562 00:41:41,450 --> 00:41:46,350 A couple of the, the, the, the PCI leach devices do let you get that level of control, but not all of them. 563 00:41:46,350 --> 00:41:52,950 So we wanted a fully open tool chain, fully open implementation that we could use PCI express to do all the stuff we wanted to do. 564 00:41:53,450 --> 00:41:57,990 Um, you can see in the upper left, we, we're, we're planning on putting this on crowd supply. 565 00:41:58,110 --> 00:42:04,390 Um, I'm working with, uh, Peter Eszentemski who has done, uh, the icebreaker, um, at Glasgow and a few other hardware tools. 566 00:42:04,390 --> 00:42:11,610 So we're trying to make this actually a tool that is available and lasts and doesn't, you know, contain pirated IP and all this stuff. 567 00:42:11,610 --> 00:42:13,150 Um, but we'll see how that goes. 568 00:42:13,690 --> 00:42:14,830 Um, why Erebus? 569 00:42:14,830 --> 00:42:16,650 My objective is platform security. 570 00:42:16,790 --> 00:42:22,670 Um, I don't care about game cheaters in, except for maybe as customers to buy a bunch of these boards, right? 571 00:42:22,670 --> 00:42:26,070 To fund the development, to actually get IOMUs used properly. 572 00:42:26,110 --> 00:42:27,690 Cause right now they're not. 573 00:42:27,990 --> 00:42:31,050 Um, so you want to, you want me to like breeze through? 574 00:42:31,050 --> 00:42:31,370 Go ahead. 575 00:42:31,370 --> 00:42:31,730 Okay. 576 00:42:31,730 --> 00:42:34,230 So yeah, you see there's a bunch of PCI express devices here. 577 00:42:34,230 --> 00:42:43,130 It's a lot more diverse group of devices than we had on the first slide because there's a whole lot of stuff that is PCI express these days that, that like, it's basically the standard interface anymore. 578 00:42:43,130 --> 00:42:47,030 It's kind of like if USB isn't cutting it for you, it's going to be PCIe. 579 00:42:47,550 --> 00:42:48,450 Takeaways, right? 580 00:42:48,450 --> 00:42:49,790 It's permissive by design. 581 00:42:49,790 --> 00:42:50,690 Mitigations exist. 582 00:42:50,690 --> 00:42:51,670 We can use them. 583 00:42:51,670 --> 00:42:55,250 It took time, but finally Thunderbolt is getting some of that stuff fixed. 584 00:42:55,430 --> 00:42:58,350 Um, these form factor changes do affect your threat model. 585 00:42:58,350 --> 00:43:01,090 Um, but again, PCV, PCIe is pervasive. 586 00:43:01,090 --> 00:43:03,770 Um, progress has been made, but there's still plenty more to do. 587 00:43:03,770 --> 00:43:10,030 The fact that I've been procrastinating on this for 10 years means that all of you can probably make more progress on this than I can. 588 00:43:10,030 --> 00:43:15,470 So if you're interested in like poking at this stuff, the tools are available and like the, the information's available. 589 00:43:15,470 --> 00:43:21,230 Like let's try and work together to make this happen because I'm not doing a good job of getting it moving. 590 00:43:21,670 --> 00:43:26,210 Um, there is the forecasting question threat model we talked about a bit and another, another shameless plug. 591 00:43:26,210 --> 00:43:32,250 Um, I've been working with Adam Shostak and Eric Abinchik to kind of come up with a, a more formulated model for applying threat modeling to hardware. 592 00:43:32,250 --> 00:43:35,990 Uh, we'll hopefully present that at sector, but enough shameless plugs. 593 00:43:36,630 --> 00:43:37,930 There's Arabis. 594 00:43:37,930 --> 00:43:39,530 Um, what did I forget to say? 595 00:43:40,190 --> 00:43:40,670 Stickers. 596 00:43:40,930 --> 00:43:41,870 I've got stickers. 597 00:43:41,870 --> 00:43:42,130 Oh yeah. 598 00:43:42,130 --> 00:43:42,790 Thanks. 599 00:43:43,110 --> 00:43:47,010 Um, there's a lot of people who helped with the support and the tooling of getting this up and running. 600 00:43:47,090 --> 00:43:49,970 I've been working on Arabis with me trying to get it to work. 601 00:43:49,970 --> 00:43:56,430 Um, there's a lot of prior art inspiration that led me into this in the first place and led us to kind of like choose the things that we did. 602 00:43:56,470 --> 00:43:58,550 Um, so thanks to all these folks and more. 603 00:43:58,750 --> 00:44:02,130 Um, there's some links on there and that is the last slide of our presentation. 604 00:44:02,130 --> 00:44:02,970 I'll go back to the links. 605 00:44:02,970 --> 00:44:03,710 Thank you. 606 00:44:05,670 --> 00:44:07,150 And thank you, Grace. 607 00:44:10,240 --> 00:44:11,040 Questions? 608 00:44:13,620 --> 00:44:15,940 Did you like that switch 2 thing? 609 00:44:17,900 --> 00:44:18,660 That was cool. 610 00:44:18,840 --> 00:44:21,480 Hardware to break out PCI for what platform? 611 00:44:21,560 --> 00:44:22,660 For the switch? 612 00:44:23,080 --> 00:44:29,300 Um, I will put those links on the, um, the direct memory access everywhere, uh, repository once I put something on there. 613 00:44:29,560 --> 00:44:31,060 Hold on, there's a question at the mic. 614 00:44:31,060 --> 00:44:32,300 Uh, that was great. 615 00:44:32,300 --> 00:44:35,200 You said you wanted to motivate platform security. 616 00:44:35,200 --> 00:44:38,060 What would you like to see out of the platforms? 617 00:44:38,340 --> 00:44:41,060 I would like to see IOMMUs properly configured. 618 00:44:41,060 --> 00:44:44,200 I would like to see users actually having control about how they're configured. 619 00:44:44,220 --> 00:44:50,760 I would like to see BIOSes that properly, uh, allocate domains to different devices as opposed to just throwing everything into a single domain. 620 00:44:50,880 --> 00:44:59,560 Um, it's a, it's a lot to wish for, but you know, when we have the real threat of stuff like this happening, um, that's what drives manufacturers to fix this stuff. 621 00:44:59,560 --> 00:45:00,180 Thanks. 622 00:45:01,420 --> 00:45:02,320 Okay. 623 00:45:02,320 --> 00:45:03,720 More questions out there. 624 00:45:03,720 --> 00:45:04,200 Thank you.