1 00:00:00,000 --> 00:00:05,020 Okay. I'm going to get started here in a second. Surprise. I know most of you don't know 2 00:00:05,020 --> 00:00:09,700 there's going to be a talk going on. So if anybody in the room is interested in analog 3 00:00:09,700 --> 00:00:14,720 malicious hardware, then there are plenty of seats up here. Come up here and make friends. 4 00:00:15,420 --> 00:00:22,960 Come learn something new potentially. Yeah. Malicious hardware. So and analog. So I should 5 00:00:22,960 --> 00:00:29,340 be taking a lot of people's low level buttons. So come on. Let's have a talk. It's better 6 00:00:29,340 --> 00:00:37,580 than waiting in line. Okay. So today I'm going to be talking about some actual research that 7 00:00:37,580 --> 00:00:43,860 we've done at the University of Michigan. My name is Matthew Hicks. And this research was on a 8 00:00:43,860 --> 00:00:50,640 team with Kaiyun Yang, Ching Dong, Todd Austin, and Dennis Sylvester. And we're going to tell you 9 00:00:50,640 --> 00:00:57,860 how to actually take the power of analog circuits and analog behavior and use them as a very 10 00:00:57,860 --> 00:00:59,320 stealthy and small attack. 11 00:00:59,340 --> 00:01:05,880 In digital hardware. So before we get started, some background, right? So foundations are 12 00:01:05,880 --> 00:01:09,560 important, right? You can see from the building here, whatever you build on a weak foundation, 13 00:01:10,020 --> 00:01:16,380 even if it's the strongest building in the world, is also weak. Every computing system, even 14 00:01:16,380 --> 00:01:23,120 our badges that we touch at the foundation of that computing system is hardware, right? So 15 00:01:23,120 --> 00:01:29,240 even if you say I do cloud, security, cyber, whatever, you have to trust and rely on hardware. 16 00:01:29,340 --> 00:01:36,520 And almost everybody here, people that aren't listening, exactly, they implicitly trust hardware. 17 00:01:36,620 --> 00:01:42,280 But surprise, hardware itself has bugs. And in past work I showed you how those bugs could 18 00:01:42,280 --> 00:01:48,060 represent security vulnerabilities themselves. And if you have somebody you don't trust that adds 19 00:01:48,060 --> 00:01:56,280 bugs to hardware, those bugs are very powerful because they infect the entire hardware stack. So 20 00:01:56,280 --> 00:01:59,320 even if you have the perfect crypto on top of this, you know, you can't do that. So you have to trust 21 00:01:59,340 --> 00:02:03,500 OpenSSL is made robust against everything. If you have a vulnerability in your hardware 22 00:02:03,500 --> 00:02:10,500 it represents a vulnerability in your software or network. And the added benefit or drawback of 23 00:02:10,500 --> 00:02:17,500 hardware is it's not very easy to patch. So you generally need to get FedEx on the phone and go 24 00:02:17,500 --> 00:02:21,440 to the hardware hacking village and take out the soldering iron because that's how you 25 00:02:21,440 --> 00:02:26,660 generally patch hardware. It's not as easy as software. And so I sense that I know most 26 00:02:26,660 --> 00:02:31,740 people probably outside of here are security centric. You've all done a great job in building 27 00:02:31,740 --> 00:02:36,840 fences. And I know we're going to explore how robust those fences are with the hackers in the 28 00:02:36,840 --> 00:02:42,120 crowd. But generally, you know, software security community has done a great job building 29 00:02:42,120 --> 00:02:47,720 defenses. But attackers still are motivated. Maybe it gets out script kiddies, but a large 30 00:02:47,720 --> 00:02:52,520 set of attackers are still motivated to attack you. They're just not going to give up, right? 31 00:02:52,560 --> 00:02:56,640 They need to make money themselves. So what do they do? They try to go to the hardware 32 00:02:56,640 --> 00:03:01,420 and go below your defenses. If your defenses are perfect, the only way to combat that is to try to 33 00:03:01,420 --> 00:03:06,760 rule out, to violate some of your assumptions. And software people make a lot of assumptions 34 00:03:07,900 --> 00:03:13,080 based upon nothing about the hardware. So we've already seen this in reality. If you can kind of 35 00:03:13,620 --> 00:03:17,580 squint your eyes, you can see it says root kits. You then see go down lower to malicious 36 00:03:18,700 --> 00:03:24,500 hypervisors, boot kits. And in the last few years, we've seen this spread of malicious hardware. 37 00:03:25,580 --> 00:03:26,620 So kind of in the atmosphere, we've seen this spread of malicious hardware. So kind of in the 38 00:03:26,640 --> 00:03:31,820 academic space, we've seen two types of attacks. So and they're all based upon how am I going to 39 00:03:31,820 --> 00:03:36,600 prevent my attack from being noticed? Well, one of them says, hey, listen, I know you're going to 40 00:03:36,600 --> 00:03:41,420 run some sort of functional verification, some testing. And I don't want my attack to actually 41 00:03:41,420 --> 00:03:46,680 influence behavior. So I need to hide it. How do you hide your attack? Well, you use this thing 42 00:03:46,680 --> 00:03:52,220 called a trigger, which is basically just a very complex state machine to basically put your, nest 43 00:03:52,220 --> 00:03:56,620 your attack in the dark recesses of the state space of the processor. So you can do a lot of 44 00:03:56,620 --> 00:03:59,760 things with this. So you have like imagine a bunch of if statements in software or something like 45 00:03:59,760 --> 00:04:05,840 that that makes the condition to trigger the attack very, very unlikely to be accidentally or even 46 00:04:05,840 --> 00:04:14,160 intentionally bumped into. So on the other hand, we see saying, well, yeah, there's some drawbacks 47 00:04:14,160 --> 00:04:17,980 to having this big complex trigger because it takes lots of hardware to implement it. That's a 48 00:04:17,980 --> 00:04:23,320 large perturbation of hardware. Well, what if my attack was always on? That would be really small 49 00:04:23,320 --> 00:04:26,600 and it would be stealthy against a certain set of defenses. So you have to have a lot of 50 00:04:26,620 --> 00:04:31,100 defenses. So before, you know, our work, which is called A2, you've seen this kind of yin and yang of 51 00:04:31,100 --> 00:04:37,380 hardware attacks where you're either stealthy and small but always on or you're stealthy against 52 00:04:37,380 --> 00:04:43,480 testing but you have this large trigger to kind of hide you. So researchers notice this and they 53 00:04:43,480 --> 00:04:47,020 say, hey, we're going to divide the space, too, and we're going to try to conquer each thing 54 00:04:47,020 --> 00:04:52,740 separately. So the defenses you see here are to visual inspection and side channeling. So you see 55 00:04:52,740 --> 00:04:56,600 a lot of this stuff now. Maybe not visual inspection here because you've really got a lot of 56 00:04:56,620 --> 00:05:01,520 stuff. We can't, you know, pump photons or ions into chips here. We don't have that kind of 57 00:05:01,520 --> 00:05:05,240 circuitry. But you definitely have side channel analysis. And there's some talks that I'll be 58 00:05:05,240 --> 00:05:09,040 attending talking about side channel analysis. Well, what do those types of defenses work well 59 00:05:09,040 --> 00:05:14,760 against? If you have a large perturbation in hardware, then it's going to have a large dynamic 60 00:05:14,760 --> 00:05:19,100 signature, like it's going to change power when it switches. Or you can even what's called 61 00:05:19,100 --> 00:05:24,800 de-layer the chip or fit the chip and actually see the malicious hardware. And you can only do 62 00:05:24,800 --> 00:05:26,600 that if you have this large perturbation in the hardware. So you're going to have a large 63 00:05:26,620 --> 00:05:32,400 machine, this large state machine, that's trying to hide from the other defense, which is dynamic 64 00:05:32,400 --> 00:05:38,120 and static analysis or verification. So dynamic and static analysis, what they do is they say, if 65 00:05:38,120 --> 00:05:43,020 you are always on or if it's easy to trigger your attack, I want to find the test case in a 66 00:05:43,020 --> 00:05:48,340 practical amount of time that triggers that malicious behavior so I can identify it and say, 67 00:05:48,480 --> 00:05:54,840 for whatever reason, I don't trust this chip. And so you've kind of seen this dichotomy of just 68 00:05:54,840 --> 00:05:56,360 divide and conquer of the space. 69 00:05:56,620 --> 00:06:01,680 And really what we started asking when we started this project is, is this real? Is this 70 00:06:01,680 --> 00:06:07,280 assumption real? That you can really just divide the space and there is no in-between? Or is 71 00:06:07,280 --> 00:06:12,440 there a space in the middle where you can implement an attack that is both stealthy from visual 72 00:06:12,440 --> 00:06:18,560 inspection and side channel analysis and doesn't require a lot of gates and hardware? So it's, 73 00:06:18,560 --> 00:06:23,100 you know, I mean, sorry, because it doesn't require lots of gates and hardware and it actually 74 00:06:23,100 --> 00:06:26,600 encodes a very complex state machine so you won't accidentally have to go through a lot of 75 00:06:26,620 --> 00:06:30,240 stuff to actually bump into it or a defender won't be able to find it. And so kind of a 76 00:06:30,240 --> 00:06:35,960 pictograph of this challenge is here you can see a state machine. This just represents an 77 00:06:35,960 --> 00:06:41,940 abstraction of hardware, complexity, the gates it would take to make a complex state machine. 78 00:06:42,280 --> 00:06:47,080 And over here, this is the ideal. This is a cell, which is kind of the primitive. When you build 79 00:06:47,080 --> 00:06:51,440 actually what's called ASICs, you do full custom VLSI, you're kind of playing around with 80 00:06:51,440 --> 00:06:56,480 transistors and the basic building block that you deal with is something called a cell. So if we can 81 00:06:56,620 --> 00:07:02,980 have all this expressibility, this functionality, which hides from static and dynamic analysis and 82 00:07:02,980 --> 00:07:08,320 express it down into something that's just as small as the most functional unit, the basic unit, 83 00:07:08,420 --> 00:07:12,760 basic primitive with which you build digital hardware, then we have created that something 84 00:07:12,760 --> 00:07:20,880 that's in that gray space that hides from visual inspection and side channel analysis and hides 85 00:07:20,880 --> 00:07:25,820 from dynamic and static analysis. And, you know, going even higher level, look, this is a game of 86 00:07:25,820 --> 00:07:26,460 where's Waldo. 87 00:07:26,620 --> 00:07:31,940 So we have kind of a die shot of a processor and it's pretty easy to, you know, see Waldo. And Waldo's 88 00:07:31,940 --> 00:07:38,280 our attack. But if you can go down to the most primitive unit, when you fit a chip, it's going to 89 00:07:38,280 --> 00:07:42,700 become a game of where's Waldo, where everything looks like Waldo. So everything, because your 90 00:07:42,700 --> 00:07:48,960 attack is expressed in the most basic unit of digital hardware, everything looks, could be an attack 91 00:07:48,960 --> 00:07:53,340 circuit and you have to not trust anything. So that's really the goal that we're trying to meet. 92 00:07:53,460 --> 00:07:56,600 All this functionality to hide our attack from dynamic and static, all this functionality to hide 93 00:07:56,600 --> 00:08:01,940 our attack from dynamic and static analysis in the most primitive unit of hardware, a cell. So 94 00:08:01,940 --> 00:08:07,400 before I get into it, some of you may not know the kind of design process of hardware. It's kind of 95 00:08:07,400 --> 00:08:12,900 similar to software before fabrication. So you have, you have your specification stage where you 96 00:08:12,900 --> 00:08:18,320 have some text of the specification in an English language or whatever language. Then you implement 97 00:08:18,320 --> 00:08:23,680 this specification. HDL, which is a hardware description language, the same thing like a 98 00:08:23,680 --> 00:08:26,580 software description language. You take a software description language, you take a hardware 99 00:08:26,580 --> 00:08:29,960 description language, you take that and then you want to formally slash functionally verify it. You 100 00:08:29,960 --> 00:08:36,060 can't formally verify everything because that's an intractable problem. And in fact, hardware 101 00:08:36,060 --> 00:08:41,660 complexity is drastically outpacing the complexity that formal verification tolerates. It's even 102 00:08:41,660 --> 00:08:46,500 getting worse. So stuff you can't formally verify, you want to functionally verify. You know, 103 00:08:46,500 --> 00:08:51,580 automatic test pattern generation. You kind of want to run test cases through it. So once you get 104 00:08:51,580 --> 00:08:56,560 this done, you say I have something which I'm confident is a correct implementation of the 105 00:08:58,540 --> 00:09:02,940 specification. So you pass it off and now we go into the different stages. So this is all like 106 00:09:02,940 --> 00:09:07,720 software. And you can see you have a binary which is similar to a netlist. But the problem is a 107 00:09:07,720 --> 00:09:11,660 binary you can run in every computer. A netlist, you actually need to be able to hand somebody a 108 00:09:11,660 --> 00:09:17,000 physical chip. So that requires some more steps. So I hand somebody this netlist and I say, hey, I 109 00:09:17,000 --> 00:09:21,620 don't have the skills to do this or some of these steps. I need you to actually create hardware for 110 00:09:21,620 --> 00:09:26,560 me. So the first thing you do is you take that hardware netlist, which is all the, all the 111 00:09:26,580 --> 00:09:31,120 basic blocks. You lay them out. You connect them together using metal. And you make sure 112 00:09:31,120 --> 00:09:36,320 everything runs time, passes timing. This is, you create a GDS2 file, which we'll see in a second, 113 00:09:36,400 --> 00:09:40,900 which is basically a bunch of polygons which represent metal that are wires connected 114 00:09:40,900 --> 00:09:46,660 together. And you go to fabricators. So TSMC is a great example. Say, okay, I actually need you to 115 00:09:46,660 --> 00:09:51,620 build me this. Let's say you have $100,000. Most of us can't afford to build our own. But in 116 00:09:51,620 --> 00:09:56,520 university we can. We hand them the GDS2 file and $100,000 and say, hey, build me a 117 00:09:56,580 --> 00:10:00,220 hundred of these. And they do that. And they do their own testing to make sure they didn't make 118 00:10:00,220 --> 00:10:05,640 mistakes. Because unlike software, when you build hardware there are variations that occur that 119 00:10:05,640 --> 00:10:11,000 make each hardware unique. And we'll come back to that later on. Then when the founder gets 120 00:10:11,000 --> 00:10:16,020 done, TSMC mails you back some chips. And you go through this kind of layers of you do your own 121 00:10:16,020 --> 00:10:21,360 in-house testing to try to detect faults that TSMC missed. You do your own system integration, 122 00:10:21,620 --> 00:10:25,080 adding this hardware to other pieces of hardware. You can do that at the hardware hacking 123 00:10:25,080 --> 00:10:30,620 village. And you have this other supply chain. Eventually leading to a FedEx truck and an end 124 00:10:30,620 --> 00:10:36,060 user getting a complete system. So this is kind of the high-level space. And we're going to focus on 125 00:10:36,560 --> 00:10:40,920 not the design stage, which is above the first dash line. We're going to focus on threats in this 126 00:10:40,920 --> 00:10:47,200 stage right here, which is the start of the supply chain or just fabrication time attacks. So 127 00:10:47,200 --> 00:10:52,200 let's see what you get. So you can either this is what a net list looks like. It's still just a 128 00:10:52,200 --> 00:10:55,060 text file. It's less human readable. But in the end, it's just a text file. So you can see what 129 00:10:55,080 --> 00:11:00,360 it is. And an important point is it does have meaningful names. If you go down a little lower, if 130 00:11:00,360 --> 00:11:05,280 you were actually to build it, place and route your design yourself, you could hand TSMC this kind 131 00:11:05,280 --> 00:11:11,000 of like art-looking thing here, which is just a visual representation of polygons that represent 132 00:11:11,000 --> 00:11:18,600 wires connected together. This is called a GDS2 file. This could be fabricated directly. And we're 133 00:11:18,600 --> 00:11:23,080 going to focus on this. All the attacks work in either space. We're going to focus on, well, what 134 00:11:23,080 --> 00:11:24,720 can this person at this stage do? 135 00:11:25,080 --> 00:11:30,740 And this is, without loss of generality, more complex because these are the same except for this has 136 00:11:30,740 --> 00:11:36,760 meaningful names. And this is literally polygons with X and Y and Z coordinates. So this is 137 00:11:36,760 --> 00:11:41,320 called a semantic gap. You have less information to attack the surrogate than you do here. Like, 138 00:11:41,360 --> 00:11:47,940 where's my privilege bit? Where is this thing I want to attack? So here comes the kind of main 139 00:11:47,940 --> 00:11:54,120 point of the talk. So most people in here probably haven't built malicious hardware, although 140 00:11:54,120 --> 00:11:54,760 it's very likely. 141 00:11:55,980 --> 00:12:00,960 That's done here than in the other talks I've given so far. If you do, this is kind of what it looks 142 00:12:00,960 --> 00:12:06,140 like. So this block of code is pseudocode for what we call a counter-based trigger. And basically 143 00:12:06,140 --> 00:12:11,500 the attack works like the longer I execute my processor, the more likely it is that the attack will 144 00:12:11,500 --> 00:12:16,980 be deployed. And so it's very simple to implement this with a counter that looks for this threshold 145 00:12:16,980 --> 00:12:22,720 value, one, two, three, four, five. If I'm below this threshold value or not at it, I add one to my 146 00:12:22,720 --> 00:12:25,060 counter. And then if, when I do that, I'm going to have a counter that's going to look like this. And 147 00:12:25,080 --> 00:12:32,460 then whenever I hit this value, it says do the attack. And this kind of code is run every time this 148 00:12:33,820 --> 00:12:40,660 RBACE signal, this is a wire and hardware, every time this toggles. And RBACE stands for rare, 149 00:12:40,900 --> 00:12:46,320 meaning that if I run my benchmark or defense program on here, it doesn't trigger, it doesn't call 150 00:12:46,320 --> 00:12:52,940 this signal to toggle. So it doesn't activate this code a lot. But the attacker can load stealthy code 151 00:12:52,940 --> 00:12:59,720 on the system once it's deployed that artificially creates an increased toggle rate. So that's what 152 00:12:59,720 --> 00:13:05,700 rare but attacker controllable event means. And we'll call this our, because it's hard to say rare but 153 00:13:05,700 --> 00:13:09,980 attacker controllable all the time, we just call that our victim wire. So really we're going to want to 154 00:13:09,980 --> 00:13:15,740 implement something that replaces this, that gives you the effect of a counter-based trigger when you 155 00:13:15,740 --> 00:13:20,900 attach it to some victim wire. But this takes a lot of logic. You have at least 32 bits to hold a 156 00:13:20,900 --> 00:13:22,920 count. You have a mux to decide. You have a counter-based trigger. You have a counter-based trigger. 157 00:13:22,920 --> 00:13:27,300 You have a mux to decide whether you need to add one or not and then to unleash the attack. So because it 158 00:13:27,300 --> 00:13:34,060 has lots of logic, it makes it more susceptible to visual inspection or side channel analysis. So what we 159 00:13:34,060 --> 00:13:42,620 have is this very simple operation. I mean observation that a capacitor acts as a charge accumulator or as a 160 00:13:42,620 --> 00:13:49,240 counter of charge. So as you see here, the red represents charge on the capacitor. There's kind of an 161 00:13:49,240 --> 00:13:52,900 orange dashed line in the capacitor. That's the threshold. In the area of the red line, there's a 162 00:13:52,920 --> 00:13:54,100 red line. That's the threshold. In the area of the green line, there's a red line. So in the analog domain, the 163 00:13:54,100 --> 00:14:01,940 capacitor, its voltage increases as you increase the charge on the capacitor, just like a counter. But if you take 164 00:14:01,940 --> 00:14:08,300 this output of this, the voltage on this capacitor, and you try to read it as a digital value, digital values only 165 00:14:08,300 --> 00:14:15,060 have 0 and 1. They don't have 2.7 volts. So that orange line represents where the output of the capacitor gets 166 00:14:15,060 --> 00:14:22,720 interpreted as a 0, then to a 1 in the digital domain. So really we operate in the analog domain, but eventually it 167 00:14:22,920 --> 00:14:28,800 has some digital circuit influence. So we need to convert that analog value to a digital value, and that orange line 168 00:14:28,800 --> 00:14:35,000 represents our threshold. So you can see here, these are almost analogous, except for the capacitor is actually more 169 00:14:35,000 --> 00:14:41,800 complex, because capacitors, they leak. So if you have a capacitor, you charge it up, and you don't connect it to 170 00:14:41,800 --> 00:14:47,060 anything, eventually it'll come back to it, and it'll have 0 volts on it. It'll lose all of its charge. Well, that's 171 00:14:47,060 --> 00:14:51,980 kind of a leaky bucket counter, which has a great impact for us, because that means you can get what they call 172 00:14:51,980 --> 00:14:52,900 spurious activity. So that's kind of a leaky bucket counter, which has a great impact for us, because that means you can get 173 00:14:52,900 --> 00:14:53,380 everything back into Eagle So you can get fully electric energy out of your hands. What this is actually 174 00:14:53,380 --> 00:14:56,460 level observations, so you put some use on your alterations. So you'll put some charge on there accidentally, and it 175 00:14:56,460 --> 00:15:03,480 will forget about that the longer in time you go.That's a high level observation, capacitor acts like an 176 00:15:03,480 --> 00:15:10,100 accumulator. So the rest of it is just how we do actually implement that to get the effect that we want. And so this 177 00:15:10,100 --> 00:15:15,440 is the effect that we want. We are at the top of the slide, this is kind of a black box diagram. So we have that victim 178 00:15:15,440 --> 00:15:20,280 wire red on that, RHAIRBUTT, ATTACKER CONTROLLE instruments, and that's in the digital space. And that wire will to 179 00:15:20,280 --> 00:15:25,860 toggle. And what we want to have is this black box trigger behavior, which you see here. And that 180 00:15:25,860 --> 00:15:30,020 works in the analog space. And then eventually it produces an output, which is analog, but will 181 00:15:30,020 --> 00:15:35,980 be interpreted as a digital value, which will basically deploy our attack or not. So this 182 00:15:35,980 --> 00:15:40,420 victim wire has some toggling here. We'll go through the steps in a second. This is our 183 00:15:40,420 --> 00:15:46,200 capacitor voltage. And notice there's a red line dash line here at the top, which is whenever the 184 00:15:46,200 --> 00:15:51,240 voltage on the capacitor goes above that line, that means our output of our trigger circuit is 185 00:15:51,240 --> 00:15:56,380 interpreted as a one, do attack. If it's below that line, we'll see in a second, it's generally 186 00:15:56,380 --> 00:16:02,480 zero, don't attack. There's a harder to see green dash line right below it. And that's actually 187 00:16:02,480 --> 00:16:08,720 where if you are attacking, if you say do attack, you don't actually turn off until you get the 188 00:16:08,720 --> 00:16:14,520 voltage on the capacitor below this line. That's called hysteresis, but it's real functionality at 189 00:16:14,520 --> 00:16:16,040 high levels. It gives you an attack window. 190 00:16:16,200 --> 00:16:21,460 So I as an attacker can run software which says, you know, pump up the charge, accumulate charge 191 00:16:21,460 --> 00:16:26,300 in this capacitor. And then once I know it's above that level, I don't have to keep running that 192 00:16:26,300 --> 00:16:31,640 code anymore. I need to run other code to give you a permanent attack. So there you can read 193 00:16:31,640 --> 00:16:37,340 Linux's memory, read your process structure and make modifications, you know, actually weaponizing 194 00:16:37,340 --> 00:16:41,820 the attack and giving it kind of higher software level meaning. And so this difference between the 195 00:16:41,820 --> 00:16:46,000 red line on top and the green line on the bottom is this hysteresis, which gives you that effect. 196 00:16:46,200 --> 00:16:51,200 And then on the output is the digital value of our trigger, which you'll see in a second. So there's 197 00:16:51,200 --> 00:16:59,400 kind of three important phases. So the first one is the attacker may actually kind of cause toggles 198 00:16:59,400 --> 00:17:04,500 or just maybe background toggles to your victim wire. And you want your attack trigger to be robust 199 00:17:04,500 --> 00:17:09,540 against that. So that's what we have here. There's a couple triggers. They don't happen a long time 200 00:17:09,540 --> 00:17:14,320 or there's space between them. And you can see charge gets accumulated on the capacitor but not 201 00:17:14,320 --> 00:17:16,180 enough to release the attack. But then there's the trigger. So that's what we have here. There's a couple 202 00:17:16,200 --> 00:17:19,040 triggers. So the trigger is not working. And then after the toggling stops because of capacitor 203 00:17:19,040 --> 00:17:24,660 leakage, it kind of forgets about this spurious activation. So it's like you got close but you 204 00:17:24,660 --> 00:17:28,280 didn't get enough. So I'm going to kind of forget about it as time goes on. And you can see the 205 00:17:28,280 --> 00:17:34,900 output of our trigger is still a don't attack, a zero. So in the next phase, the attacker wants 206 00:17:34,900 --> 00:17:40,280 it. Now the attacker runs their code on there, which wants to actually accumulate enough charge 207 00:17:40,280 --> 00:17:46,180 on the capacitor to deploy the attack. So in this case, they run software which creates a 208 00:17:46,200 --> 00:17:51,260 high enough toggle rate and for a long enough period of time to actually accumulate more than 209 00:17:51,260 --> 00:17:57,580 enough charge on the capacitor so that the output eventually changes from a zero to a one. So now 210 00:17:57,580 --> 00:18:03,780 you will deploy the attack. And we'll get to what the attack is later on. And then I don't know 211 00:18:03,780 --> 00:18:07,300 how many of you have heard about Heisenbugs in software, but this is like a hardware Heisenbug 212 00:18:07,300 --> 00:18:12,220 here. You don't want your, once you start your attack, you don't want your attack to be on in 213 00:18:12,220 --> 00:18:16,180 hardware all the time. You actually want it to kind of disappear because you don't want it to 214 00:18:16,200 --> 00:18:19,220 disappear because it makes it really hard to find. Because you don't know how you triggered the 215 00:18:19,220 --> 00:18:23,520 attack. And you don't know, you know, when it was triggered or for how long. So you want to kind 216 00:18:23,520 --> 00:18:28,860 of, you know, release the attack eventually. And so we'll take advantage again of capacitor 217 00:18:28,860 --> 00:18:35,100 leakage. And we'll get below that dashed green line. And eventually our attack will 218 00:18:35,100 --> 00:18:41,020 disable. And the, uh, this is called the retention time from when we go on to when we go off. And 219 00:18:41,020 --> 00:18:46,180 that's the time frame you have to modify software where you have high enough privilege to 220 00:18:46,180 --> 00:18:50,320 escalate, escalated privilege where you can actually take a hardware attack and make it a 221 00:18:50,320 --> 00:18:55,460 software level persistent attack. So the hardware attack is not persistent, but you have a 222 00:18:55,460 --> 00:19:00,440 retention time window to make your attack persistent from the hardware level to the software 223 00:19:00,440 --> 00:19:06,220 level. Now, uh, this could be the last slide, but it's great for us. It's not because we never 224 00:19:06,220 --> 00:19:09,540 would have got a paper out of it. You're probably thinking, well, that's, I mean, that's 225 00:19:09,540 --> 00:19:14,360 interesting, but just connecting a capacitor or some wire in the design doesn't seem that 226 00:19:14,360 --> 00:19:16,160 interesting, right? Uh, well, that's, that's, that's, that's, that's, that's, that's, that's 227 00:19:16,160 --> 00:19:22,220 well, let's, let's analyze that theory. So I have a capacitor and I'll connect it. And, uh, let's 228 00:19:22,220 --> 00:19:26,660 start out when the, when our victim wire is zero. Well, the current value is zero. We have no 229 00:19:26,660 --> 00:19:33,080 value, no charge in the capacitor. Everything works in this case. The problem comes. So we 230 00:19:33,080 --> 00:19:38,380 start, we change values. Our victim wire goes to high or to one value. And that basically starts 231 00:19:38,380 --> 00:19:44,260 accumulating charge very quickly on our capacitor. So quickly, in fact, that with almost 232 00:19:44,260 --> 00:19:46,140 instantaneously within a clock cycle, we're going to be able to, we're going to be able to 233 00:19:46,160 --> 00:19:49,900 trigger a single clock cycle. Your capacitor is at full charge. But our problem was we wanted 234 00:19:49,900 --> 00:19:54,980 this complex state machine, not an attack which was triggerable within a single clock cycle, 235 00:19:55,220 --> 00:20:01,220 within a single toggle of a wire. So we just can't, uh, add a simple small capacitor to the 236 00:20:01,220 --> 00:20:05,020 design. Now you're probably like, well, that's a small capacitor. I understand that. Small 237 00:20:05,020 --> 00:20:09,560 capacitors don't hold a lot of charge. But what if I had a really large capacitor? Well, one 238 00:20:09,560 --> 00:20:15,040 problem is we're implementing this in, uh, full custom ASIC. So you can't actually implement very 239 00:20:15,040 --> 00:20:16,140 large capacitors. So we're going to have to, we're going to have to, we're going to have to 240 00:20:16,140 --> 00:20:22,380 do this. Uh, we're talking femtoferrets. Femtoferrets. It's below nano. Uh, so it's very small. And 241 00:20:22,380 --> 00:20:28,020 even if you could implement a large capacitor, a large capacitor actually affects the surrounding 242 00:20:28,020 --> 00:20:33,680 components much more. Has large current spikes as you try to push current into that large capacitor 243 00:20:33,680 --> 00:20:39,400 to fill it up. So that makes it more obvious from a side channel analysis perspective. So you can't 244 00:20:39,400 --> 00:20:45,240 use a small capacitor. You can't directly connect a large capacitor. What can we do? Well, we 245 00:20:45,240 --> 00:20:46,120 thought about this and we said, well, we're going to have to, we're going to have to, we're going to 246 00:20:46,140 --> 00:20:50,560 do this. And we said, well, what if we, instead of having one single capacitor, what if we had two 247 00:20:50,560 --> 00:20:56,440 capacitors? Uh, a small, what we call unit capacitor, and then a relative, relatively larger, 248 00:20:56,460 --> 00:21:02,280 still femtoferrets, larger capacitor. And then we do what's called charge sharing. I'll load up 249 00:21:02,280 --> 00:21:06,520 charge very quickly in a small capacitor, and then I'll throw a switch, and then I'll, these, 250 00:21:06,620 --> 00:21:10,620 I'll connect this capacitor to this capacitor. And when you do that, capacitor's what's called 251 00:21:10,620 --> 00:21:16,120 share charge. They basically agree upon a common voltage. And so you see here, all this charge is 252 00:21:16,140 --> 00:21:21,600 on here, uh, gets shared with the larger capacitor. And because, again, the unit capacitor is 253 00:21:21,600 --> 00:21:27,720 relatively small compared to the main capacitor, it takes several fills of the small capacitor to 254 00:21:27,720 --> 00:21:33,640 eventually fill up this much relatively larger capacitor. So that's the premise of how we get 255 00:21:33,640 --> 00:21:37,600 the effect that we're looking for. I'm going to kind of run through it here and a little lower. 256 00:21:37,900 --> 00:21:43,260 So each of these, we implement this all using transistors. A capacitor, they're so small 257 00:21:43,260 --> 00:21:47,560 because they're just wire lengths in a design. Uh, it's not actually, you're not actually adding a 258 00:21:47,560 --> 00:21:52,000 physical component capacitor. You're choosing the capacitance and wire lengths. And so what we have 259 00:21:52,000 --> 00:21:57,300 here is that two transistors. These gates are hooked up kind of complementary to one another. 260 00:21:57,520 --> 00:22:04,440 This gate closes when victim wire is zero. This gate closes when victim wire is one. So they're 261 00:22:04,440 --> 00:22:09,140 kind of mutually exclusive. When this gate closes, it charges up this small unit capacitor. 262 00:22:09,860 --> 00:22:13,240 When this gate closes and this one opens, it disconnects this small capacitor. And so you 263 00:22:13,260 --> 00:22:17,120 connect this one capacitor from power and connects it to the other capacitor in this kind of charge 264 00:22:17,120 --> 00:22:22,760 sharing. And if you do this several times, toggling the victim wire, you will gradually charge it up. 265 00:22:22,840 --> 00:22:27,560 So let's see what that looks like. Okay. So we start out with zero and you can see the victim 266 00:22:27,560 --> 00:22:35,760 wire, uh, goes from one to zero, uh, on zero. Remember this unit capacitors connected to power. 267 00:22:35,940 --> 00:22:41,600 And so you can see it almost instantaneously fills up the charge on the unit capacitor, bringing it 268 00:22:41,600 --> 00:22:42,180 to VDD. 269 00:22:43,260 --> 00:22:48,540 Um, but again, the output of our attack is on the main capacitor. So the victim wire will toggle again. 270 00:22:48,960 --> 00:22:55,220 And as soon as it does, that connects the capacitors in charge sharing. And now basically they, both the 271 00:22:55,220 --> 00:23:01,820 capacitors agree on a much, much smaller common voltage. And so if you do this for long enough, you 272 00:23:01,820 --> 00:23:07,840 will eventually pump up the charge on the main capacitor high enough so that its output, its 273 00:23:07,840 --> 00:23:12,440 voltage in the analog domain, when interpreted in the digital domain, now is a one, do attack. 274 00:23:13,260 --> 00:23:18,320 And so that's how we use charge sharing to give you that ideal behavior of accumulating 275 00:23:18,320 --> 00:23:25,120 charge in a stepwise factoring fashion on the capacitor. So, that's kind of like the high-level 276 00:23:25,120 --> 00:23:29,900 attack. But that actually doesn't buy you much besides like, oh, that's an interesting thing. We 277 00:23:29,900 --> 00:23:34,200 actually want to demonstrate this in a real design. So what's the next step that we needed to do? 278 00:23:34,420 --> 00:23:40,460 Well, what's an appropriate victim wire? Remember some of the properties we had are, uh, has a, it's 279 00:23:40,460 --> 00:23:43,240 rare, it has a low-level common-case toggle. This is the normal branch. And you make a problem with a 280 00:23:43,260 --> 00:23:48,260 in the background or whatever kind of testing suite that we're going to run on it. But the 281 00:23:48,260 --> 00:23:55,240 attacker can control it using kind of user mode code. So we need to find wires in the design that 282 00:23:55,240 --> 00:24:00,420 do that. There's details in our paper which is freely available on my website, impediment 283 00:24:00,420 --> 00:24:05,320 to progress.com, along with all my other stuff. You can read about it. We basically reverse 284 00:24:05,320 --> 00:24:11,460 engineered the design and used simulations to figure out wires that were in both sets. And 285 00:24:11,460 --> 00:24:15,400 some of our selections are the most important one is divide by zero. That's one everybody 286 00:24:15,400 --> 00:24:20,600 understands. So in the processor we do, there's a flag that gets set every time you do a division 287 00:24:20,600 --> 00:24:25,860 by zero. x86 is a little different. And we're going to attach, that's going to be our victim 288 00:24:25,860 --> 00:24:31,600 wire. We also can use signed division with unsigned division. In the paper we go into 289 00:24:31,600 --> 00:24:36,380 multi-stage attacks. So using this as a building block, this analog trigger as a building block, 290 00:24:36,520 --> 00:24:41,380 and how you can connect them in different ways to kind of trade off how 291 00:24:41,380 --> 00:24:47,740 large your attack is for, or trigger is for how nestled in the space it is. So we're going to use 292 00:24:47,740 --> 00:24:53,340 division by zero. What does the code look like that triggers it? So this is my very simple academic 293 00:24:53,340 --> 00:24:59,420 code to do this. How I did this is I had some idea about how to use volatile to do it and I 294 00:24:59,420 --> 00:25:03,460 compiled it, looked at the assembly and said that's not a dense enough toggle rate to trigger our 295 00:25:03,460 --> 00:25:08,500 attack. And so this is what I ended up on which is kind of still high enough level in C. You can 296 00:25:08,500 --> 00:25:11,360 also do an inline assemble if you want. But the things to notice here is that you don't have to 297 00:25:13,780 --> 00:25:17,600 look at all the code going into your system. You would look at this and say oh that looks fine. 298 00:25:17,700 --> 00:25:22,660 It's not using any special instructions. No privileged behavior. All it has is two fundamental 299 00:25:22,660 --> 00:25:29,520 components. The first one is division by zero. So the division by zero takes that flag which 300 00:25:29,520 --> 00:25:34,500 says division by zero and moves it from a zero to a one. If you followed up by another division by 301 00:25:34,500 --> 00:25:39,980 zero, that flag would stay at one. So that's why we have the plus one afterwards. That plus one is 302 00:25:39,980 --> 00:25:41,020 an arithmetic operation. 303 00:25:41,380 --> 00:25:47,260 Which resets the division by zero flag. So with these two operations, divide by zero plus one, 304 00:25:47,320 --> 00:25:51,760 divide by zero plus one, the rest of the code is just getting that packed into enough in 305 00:25:51,760 --> 00:25:57,020 assembly so that we have a high enough toggle rate. But this is all we do and this doesn't have any 306 00:25:57,020 --> 00:26:05,980 problems. Oh yeah, questions are awesome. So you can't use C because the volatile means it'll 307 00:26:05,980 --> 00:26:11,220 have to read that register every time. So yeah, there's some, don't worry about this too much. 308 00:26:11,380 --> 00:26:16,080 I played tricks with volatile and the embedded people might know. But yeah, so I wanted an initial 309 00:26:16,080 --> 00:26:20,320 read of that C. I want to separate those A, B, and C off to be different registers. Because 310 00:26:20,320 --> 00:26:25,920 basically what I want to do, instead of writing inline assembly, I want to have the compiler not 311 00:26:25,920 --> 00:26:30,680 optimize my code away as having no effect. So I need the A, B, and C to look different but 312 00:26:30,680 --> 00:26:35,460 actually be zero. So that's what volatile does there. I want to read it once. I don't want you to 313 00:26:35,460 --> 00:26:41,300 read C every time. So I put a, I use C one as my intermediate which is not volatile. So it can say, oh, 314 00:26:41,360 --> 00:26:45,140 the compiler says, oh, I know that value is going to be the same every time. Because if you use C, 315 00:26:45,180 --> 00:26:49,920 yeah. So the initial was not that clever. It was in assembly. But this is kind of a high level way 316 00:26:49,920 --> 00:26:56,200 to do it. Okay. So with that, I implement attack. We do some reverse engineering to actually 317 00:26:56,200 --> 00:27:02,200 find the wires. And we have some C language which will actually trigger the attack. Well, what's 318 00:27:02,200 --> 00:27:05,140 this attack? What do we actually do with this? Because so far I haven't told you what it does. 319 00:27:06,780 --> 00:27:11,340 The asterisk means our trigger is attack agnostic. We don't actually care about the attack. We 320 00:27:11,340 --> 00:27:15,220 don't care what the attack is. In this case, we do something that most people can understand, 321 00:27:15,380 --> 00:27:21,220 which is called privilege escalation. So think if you're on X86 LAN, you run in ring three. And I 322 00:27:21,220 --> 00:27:26,500 want to go to ring zero or ring negative one which some of you may not even know exists. This is 323 00:27:26,500 --> 00:27:31,940 the attack that does it. What privilege you're executing on is stored in what's called a 324 00:27:31,940 --> 00:27:38,840 register. What we do is we simply take the digital interpretive version of our trigger output 325 00:27:39,480 --> 00:27:41,320 and reset that flip-flop. And then we run it over to the other side. And then we run it over to the 326 00:27:41,320 --> 00:27:46,640 flip-flop or that state that holds it. Now, why does resetting the state work? Think about it. 327 00:27:46,680 --> 00:27:51,820 Every time you restart your computers, it starts in the most trusted mode and then gradually 328 00:27:51,820 --> 00:27:58,240 deescalates privilege as you boot the system up. So we partially reset part of the hardware and 329 00:27:58,240 --> 00:28:02,400 there's no software to deescalate privilege so we're naturally in the most privileged state of 330 00:28:02,400 --> 00:28:08,040 hardware. And that's why it's this can apply to any register you want or anything really in the 331 00:28:08,040 --> 00:28:11,300 system. Because all systems start at the highest privilege and they deescalate privilege. And 332 00:28:11,320 --> 00:28:15,900 they deescalate down. All systems that I know about do that. So that's our attack. And when you 333 00:28:15,900 --> 00:28:19,740 have that attack, what can you do with it? You can run any instruction that you want in the system. 334 00:28:19,860 --> 00:28:25,280 You can read arbitrary memory. And so what I would do is I would start reading the kernel's 335 00:28:25,280 --> 00:28:29,900 process trucks to find my process truck and deescalate my privilege in the process truck by 336 00:28:29,900 --> 00:28:36,100 changing memory. And you have that retention time window to do that. So some of you from x86 land, 337 00:28:37,160 --> 00:28:41,300 you know, this is going to be a little different. So from here I have this. We implement this on the 338 00:28:41,320 --> 00:28:47,960 OR1200 which is an open source risk processor. Here is a snapshot of the instruction set 339 00:28:47,960 --> 00:28:52,860 specification of a page for it. And really the next question is, okay, I have my attack. I know what 340 00:28:52,860 --> 00:28:57,320 wire I'm attacking. I know how to trigger it. But how do I know when I can spend cycles on doing 341 00:28:57,320 --> 00:29:02,180 escalating my hardware attack to software instead of just trying to trigger my hardware attack? And 342 00:29:02,180 --> 00:29:06,880 this is called, you know, checking for success. And so we use this special instruction. It's 343 00:29:06,880 --> 00:29:11,240 different for different architectures. The key points are this is how we kind of read and 344 00:29:11,240 --> 00:29:18,000 modify privilege registers. Notice you can only do this from when you're in supervisor mode or 345 00:29:18,000 --> 00:29:24,440 let's say ring zero in x86. But on the OR1200, if you do this from any other lower privilege level, 346 00:29:24,640 --> 00:29:32,020 what happens? Nothing happens. So this is kind of a context sensitive behavior. Many processors 347 00:29:32,020 --> 00:29:36,560 have that. It's not just an open source thing. ARM has some of these. One thing to look for is 348 00:29:36,560 --> 00:29:41,220 something called read as zero. So processor designers say, hey, it's actually going to be a 349 00:29:41,240 --> 00:29:45,500 more efficient for us just to return a zero value if you try to read something you shouldn't be 350 00:29:45,500 --> 00:29:50,500 reading as opposed to giving you the actual value or giving you an exception. So what they do is 351 00:29:50,500 --> 00:29:54,520 they have this context sensitive behavior. When you read a register, if you don't have privilege, 352 00:29:54,600 --> 00:29:59,040 it's zero. If you do have privilege, maybe because of our attack, you have some non-zero 353 00:29:59,040 --> 00:30:03,580 value. So we'll do our attack sled and then we'll read this register. If we get anything other 354 00:30:03,580 --> 00:30:09,760 than zero, we go escalate our attack to the software level. And so that's what we do. Okay. 355 00:30:09,840 --> 00:30:11,220 There are a lot more challenges. I'm going to show you how to do this. I'm going to show you how to 356 00:30:11,220 --> 00:30:16,080 do this. Then I have time here today. There's a lot of low level analog because when you go at 357 00:30:16,080 --> 00:30:20,720 this level, lots of things leak when you kind of build a full custom ASIC and there's kind of a 358 00:30:21,180 --> 00:30:25,280 kind of thing we have to loop we have to do there. How do you actually find this? We describe 359 00:30:25,280 --> 00:30:30,460 better the reverse engineering that we did. And then I talk about multistage attacks, kind of 360 00:30:30,460 --> 00:30:36,040 making this a general thing. So to recap before we get to the evaluation, what we have here is we 361 00:30:36,040 --> 00:30:41,200 have kind of we operate on two levels. The blue boxes here in the top and the outside. We have 362 00:30:41,200 --> 00:30:46,400 the digital domain. And we also operate in this orange block which is what implements our 363 00:30:46,400 --> 00:30:52,800 capacitor in the analog domain. All the defenses that exist today for malicious hardware that don't 364 00:30:52,800 --> 00:30:58,860 look for like side channels, they operate in the digital domain. And when you take this design and 365 00:30:58,860 --> 00:31:05,420 you pop it up, try to make a digital representation of it, this behavior disappears. So you 366 00:31:05,420 --> 00:31:08,480 can't actually like what's called you can't actually image a chip and rebuild the digital 367 00:31:08,480 --> 00:31:10,020 circuit because this disappears. 368 00:31:11,200 --> 00:31:16,120 Now if you try to actually characterize the analog behavior there's things called spice. But 369 00:31:16,120 --> 00:31:20,740 anybody in here who's ever done a spice simulation knows you can't do it for a full processor 370 00:31:20,740 --> 00:31:24,560 number one. And if you can, you can't do it for hundreds of thousands of clock cycles that it 371 00:31:24,560 --> 00:31:30,840 takes. It's just too low level of information. So you know that's how we get around all the 372 00:31:30,840 --> 00:31:36,800 defenses. So we had the attack. We told you about finding victims and how to activate it and 373 00:31:36,800 --> 00:31:41,180 check for success. Well now how do we integrate that into an existing chip? So we get 374 00:31:41,200 --> 00:31:45,300 something that kind of looks like this and we had to find a place to put it. You would think that 375 00:31:45,300 --> 00:31:50,520 would be hard but unfortunately it's a two second slide. It was actually easy because all commercial 376 00:31:50,520 --> 00:31:56,340 chips have probably about 30 percent free space, black space in design. So inserting one 377 00:31:56,340 --> 00:32:01,540 primitive unit, one cell is trivial in this. You don't create it. Why do they have this for people 378 00:32:01,540 --> 00:32:06,220 not to know? Because routing is a very hard problem. It gets exponentially harder the more 379 00:32:06,740 --> 00:32:11,180 utilization you have. The tighter your area is packed with devices. So they keep the 380 00:32:11,200 --> 00:32:16,420 utilization fairly low below the elbow of the curve to make it tractable for tools to 381 00:32:16,420 --> 00:32:21,940 automatically layout your design. So that wasn't actually a problem for us. We actually built 382 00:32:21,940 --> 00:32:27,400 this. I forgot the actual prototype at my house but because this exists in both analog and 383 00:32:27,400 --> 00:32:32,820 digital domain, it's not something we can run in FPGA. Yeah, we ran simulations of it. We ran 384 00:32:32,820 --> 00:32:37,160 hardware simulations. But the hardware simulations can't do the analog behavior. We run analog 385 00:32:37,160 --> 00:32:41,080 spy simulations but again you can't simulate a whole processor. So that's simulated 386 00:32:41,080 --> 00:32:45,480 the analog behavior of our trigger. To put them together, there's no tool that exists for that. So 387 00:32:45,480 --> 00:32:51,040 we had to actually build a chip. And so this is the OR 1200 we built. You can see a couple levels of 388 00:32:51,040 --> 00:32:56,620 zooming in to see basically our one cell attack and amongst many other cells about 100,000 389 00:32:56,620 --> 00:33:04,600 transistors worth. So we built it. And so real quickly, some experiments. So what you're seeing 390 00:33:04,600 --> 00:33:11,060 here, it's a histogram of wire toggle rates. So on the bottom you see how much is this sort of 391 00:33:11,060 --> 00:33:17,240 circuit wire toggle in relation to the clock. And then on here you see the proportion of signals 392 00:33:17,240 --> 00:33:22,260 that toggle at that rate. And you'll see here it's not kind of interesting because we were very 393 00:33:23,480 --> 00:33:28,000 pessimistic with how we implemented this. But this red highlighted bar is actually a bar. That's 394 00:33:28,000 --> 00:33:33,360 a bar that contains our division by zero signal. And as you can see, we even picked out, went 395 00:33:33,360 --> 00:33:38,340 through all of our benchmarks, we picked the most division by zero every kernel of our mathematics 396 00:33:38,340 --> 00:33:40,660 benchmark and just ran that alone. 397 00:33:41,060 --> 00:33:49,920 And that produced a toggle rate of .0002. So basically essentially a zero. This dash line tells 398 00:33:49,920 --> 00:33:54,940 you that's our threshold. So you have to toggle for a certain amount of time above this dash line. 399 00:33:55,220 --> 00:33:59,980 So move this red line above this dash line for enough time to fill up the charge in the 400 00:33:59,980 --> 00:34:05,680 capacitor. If you're below that red line, so this solid red line is below that dash red line, you 401 00:34:05,680 --> 00:34:11,000 are not keeping pace with leakage. So you don't actually end up accumulating any charge. As you 402 00:34:11,000 --> 00:34:16,960 can see here, we were way too pessimistic with how we built our threshold and our circuit. But this 403 00:34:16,960 --> 00:34:22,000 is just, this is an animation, by the way, of running our, one of our, I guess our most division 404 00:34:22,000 --> 00:34:26,880 heavy benchmark. And this just gives you an idea how close we are to spuriously activating our 405 00:34:26,880 --> 00:34:33,180 attack. The short answer is not close. Well, the next question is, well, we see here on here from 406 00:34:33,180 --> 00:34:37,740 the snapshot of the animation that your benchmarks, even the benchmark that gets the closest, 407 00:34:37,940 --> 00:34:40,360 doesn't even come close to your activating the attack. 408 00:34:41,000 --> 00:34:46,540 But can you activate it as an attacker? So this snapshot is running that division by zero code 409 00:34:46,540 --> 00:34:51,860 that I showed earlier, user mode code. And the red, solid red line is right here. And these are all 410 00:34:51,860 --> 00:34:57,900 division by zero and sign division related signals. And you can see it's well past that bar. 411 00:34:58,100 --> 00:35:05,160 So, defenders can't trigger our attack without knowing exact specifics about it. But we can load 412 00:35:05,160 --> 00:35:10,980 user mode code that can trigger it ourselves. Okay. So, we're going to go ahead and do a little 413 00:35:11,000 --> 00:35:18,100 testing. So, last little bit, I kind of lied to you about some of this stuff. This bar, I, it was kind of, I 414 00:35:18,100 --> 00:35:22,040 actually picked a random number where that was in previous slides. It's actually a question, where 415 00:35:22,040 --> 00:35:28,120 does that bar exist in real life? And those of you coming into the hardware space, every processor 416 00:35:28,120 --> 00:35:34,140 has a bar in a different location due to the manufacturing time variances. So, you get a little 417 00:35:34,140 --> 00:35:38,960 bit more metal here, a little mess, metal here. The capacitors are actually different ratios 418 00:35:38,960 --> 00:35:40,980 relative to each other. So, that moves you around. So, I'm going to go ahead and do a little testing. 419 00:35:41,000 --> 00:35:46,460 I'm going to use that bar around. So, as an attacker, I want to be able to kind of simulate where 420 00:35:46,460 --> 00:35:54,360 this bar is at. And why do I want to do that? Well, if I, if the bar ends up being, if I thought it was 421 00:35:54,360 --> 00:35:59,380 over there and it ends up being back here, well, then a benchmark could trigger the attack. And then 422 00:35:59,380 --> 00:36:05,420 I would slip in my attack and then every device would be obvious that this attack existed. And kind 423 00:36:05,420 --> 00:36:10,900 of on the other side of the spectrum, if the bar is pushed way out in toggle rate, then I can't even 424 00:36:11,000 --> 00:36:16,660 attack, I can't even toggle at a fast enough rate to put deposit charge in that capacitor. And so, I 425 00:36:16,660 --> 00:36:21,520 can never attack anything. So, we want to make our thing, make our attack, our trigger not 426 00:36:21,520 --> 00:36:27,820 trivially, uh, triggerable, but attacker, a knowledgeable attacker can trigger it. But we don't 427 00:36:27,820 --> 00:36:33,920 want to have to build a chip. Because, again, most of us don't have $100,000 to build, uh, you 428 00:36:33,920 --> 00:36:39,080 know, 100 chips that nobody will use. So, we want to rely on simulation. If simulation is fairly 429 00:36:39,080 --> 00:36:40,980 accurate, then an attacker can simulate it. So, we want to rely on simulation. If simulation is fairly 430 00:36:41,000 --> 00:36:45,400 accurate, then an attacker can simulate, uh, their circuit at different nodes in the space, and 431 00:36:45,400 --> 00:36:50,500 then they can have high trust that it will end up that way. So, what you see here, uh, on the 432 00:36:50,500 --> 00:36:55,440 rightmost column is our simulated value. Uh, typical corner, corners are just the operating 433 00:36:55,440 --> 00:37:01,360 environment and manufacturing variances. Uh, so we can see seven for the first example. And then 434 00:37:01,360 --> 00:37:05,300 our measure. We take 10 chips out of our 100 and we measure where that bar is at and take an 435 00:37:05,300 --> 00:37:10,900 average. And our average is 7.4. And so, what this kind of high-level results tell you is, you 436 00:37:10,900 --> 00:37:14,920 know, the attacker doesn't have to build the attack circuit to have confidence that where they 437 00:37:14,920 --> 00:37:18,380 think that bar is going to be at, where they think the threshold is going to be at, it's going to be 438 00:37:18,380 --> 00:37:24,220 really be at that threshold. In our case, uh, our threshold was, we had, none of our circuits 439 00:37:24,220 --> 00:37:28,460 were trivially activatable. None of them we couldn't activate. But we were still way too 440 00:37:28,460 --> 00:37:36,240 pessimistic, given that our benchmarks barely toggle our wire. Uh, good question. I don't 441 00:37:36,240 --> 00:37:40,880 actually, I don't, so, yeah, variance, you're assuming that the distribution of the 442 00:37:40,900 --> 00:37:44,740 distribution is normal. I think it actually is normal. Um, I would actually have to look for what 443 00:37:44,740 --> 00:37:49,480 the variance is. No, yeah, I think it is a normal. I think those, those process, they're natural 444 00:37:49,480 --> 00:37:54,680 processes and I think it is normal. Uh, is the standard different? Yeah. Um, but that's a good 445 00:37:54,680 --> 00:37:58,280 question. I don't know why. I don't even know if we have that in the paper, the variance of it. I 446 00:37:58,280 --> 00:38:04,360 was thinking the same. Um, but again, that's why I say, none of the chips we couldn't activate and 447 00:38:04,360 --> 00:38:09,080 none of them we could. Although, uh, the, the margin, least margin, least slack that we had was 448 00:38:09,080 --> 00:38:10,880 actually between the toggle rate that we could toggle and the, the, the, the, the, the, the, the, the, the, the, the, 449 00:38:10,880 --> 00:38:11,840 the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, where 450 00:38:11,840 --> 00:38:18,680 we're gonna, it probably that we couldn't actually activate our attack on some chips. Um, but that's a 451 00:38:18,680 --> 00:38:23,140 great question of what the variance was, cause it is important to know. Um, I don't think, it 452 00:38:23,140 --> 00:38:27,580 wasn't, for certain devices, and by the way it's device dependent, uh, certain devices have more. 453 00:38:27,920 --> 00:38:32,900 So, okay. There's a lot more exper- uh, there are more experiments in the paper. Uh, you can talk 454 00:38:32,900 --> 00:38:37,640 about it afterwards. Okay, so, that's kind of the end of my pitch. You can always ask questions 455 00:38:37,640 --> 00:38:40,860 afterwards. Uh, the whole point of this is, you know, where are the first issues in, in the 456 00:38:40,880 --> 00:38:45,580 show that you can't just divide the attack space uh trivially anymore that these kind of 457 00:38:45,580 --> 00:38:51,740 cross layer attacks that are both incredibly small working on no perturbation attacks uh are 458 00:38:51,740 --> 00:38:55,920 incredibly small and still stealthy they can get rid they can hide from static and dynamic 459 00:38:55,920 --> 00:39:02,920 analysis um it's con- our attack is controllable it's stealthy and uh it can currently you can 460 00:39:02,920 --> 00:39:08,080 only detect it uh there's no known way to detect it the only signature you have is you know 461 00:39:08,080 --> 00:39:13,880 side channels and so uh from an academic sense we need to probably move forward and assume that 462 00:39:13,880 --> 00:39:18,940 there's some bit of malice in our hardware and we need to make hardware that's robust against 463 00:39:18,940 --> 00:39:23,960 that malice we can't just assume that somebody's gonna invent a malicious hardware panacea 464 00:39:24,460 --> 00:39:29,020 detection tool that's gonna work that's what researchers have been doing I'm guilty of doing 465 00:39:29,020 --> 00:39:32,520 one of the first papers of that although I was on this the first paper that said that that 466 00:39:32,520 --> 00:39:36,420 doesn't work so I gotta I got to double dip there uh but we really need to when we build 467 00:39:36,420 --> 00:39:38,060 systems as hardware if you need hardware and software we need to be able to do that and 468 00:39:38,080 --> 00:39:43,980 engineers you really need to think what happens if I can't trust this or how do I make it so my 469 00:39:43,980 --> 00:39:48,780 system can still work provide value without trusting this thing here and I'm I'm looking 470 00:39:48,780 --> 00:39:55,140 into those areas as well um so hi little bit uh I believe in being as open as possible there's 471 00:39:55,140 --> 00:40:00,340 things some things we cannot share uh with this like the cells because that's proprietary um 472 00:40:01,180 --> 00:40:06,300 so there's some information about fabbing the chip I have to go to my github repo lots of my 473 00:40:06,300 --> 00:40:07,960 other paper stuff's on there if you back tick 474 00:40:08,080 --> 00:40:13,060 a couple times and my website for finding this paper other hardware security and other papers 475 00:40:13,060 --> 00:40:19,600 uh and pregnant to progress.com uh with that I can ask answer questions we can take questions 476 00:40:19,600 --> 00:40:25,680 offline if you want I don't really know the format but uh we have 15 minutes any public 477 00:40:25,680 --> 00:40:27,400 questions public questions yes sir 478 00:40:48,000 --> 00:40:53,840 so as an attack so the is the question as an attacker could I do more complex stitch more 479 00:40:53,840 --> 00:40:58,380 together more complex behavior instead of just looking for one simple event I look for multiple 480 00:40:58,380 --> 00:41:04,760 things things uh yeah so we we do the first we do we go towards that by showing you how to do a 481 00:41:04,760 --> 00:41:07,540 couple of these things together in a multiple stage attack uh 482 00:41:08,080 --> 00:41:12,940 I recently I've been thinking about doing a paper where I can show you how to map existing digital 483 00:41:12,940 --> 00:41:20,520 attacks into analog only attacks so there is there is no fundamental limitation anything you can 484 00:41:20,520 --> 00:41:24,960 think in a digital space uh that well anything that's been thought of in a digital space I can 485 00:41:24,960 --> 00:41:30,060 actually tell you how to implement that using our analog techniques the trade-off though is the more 486 00:41:30,060 --> 00:41:36,960 you do the larger your attack is so it might be easier to spot using visual inspection or side 487 00:41:38,080 --> 00:41:40,320 detection but I don't think it's going to be that great for what we're talking about but yeah we're 488 00:41:40,320 --> 00:41:42,640 looking towards that that's the next thing yes sir 489 00:41:46,540 --> 00:41:51,280 I think we need to couple detection with making it assuming that we're going to have some malice 490 00:41:51,280 --> 00:41:52,940 detection is still valuable for certain 491 00:42:01,920 --> 00:42:08,000 uh yeah I think of so my high level pitch is hardware right now is what we call monolithic 492 00:42:08,080 --> 00:42:13,120 so operating systems you have micro kernels you have monolithic kernels hardware is just monolithic 493 00:42:13,120 --> 00:42:17,460 hardware so even if you build things in modules you put it together and you fab it it's all one big 494 00:42:17,460 --> 00:42:22,720 monolith and I think we need to start thinking about breaking hardware itself into layers and 495 00:42:23,380 --> 00:42:27,860 then at the bottom of this you will have a trusted layer and then you can build on top of that so you 496 00:42:27,860 --> 00:42:31,880 know it's always a trusted computing base going to the bottom well you don't just stop at hardware 497 00:42:31,880 --> 00:42:36,720 you need to go deeper into hardware and break that apart into layers itself is what I think you need 498 00:42:36,720 --> 00:42:37,860 to and then yeah 499 00:42:38,080 --> 00:42:43,140 and in terms of how you design it and even how you fabricate it there are coming technologies in split 500 00:42:43,140 --> 00:42:48,840 manufacturing two and a half d three d integration technologies and I think those can all be combined 501 00:42:48,840 --> 00:42:53,720 and then when you divide and you say I only need to trust one hundredth of my design that makes it 502 00:42:53,720 --> 00:42:58,920 more amenable to formal and functional verification and you can actually spend more time on that you 503 00:42:58,920 --> 00:43:02,760 know but I think you really should say here's stuff I don't care about I don't need security and 504 00:43:02,760 --> 00:43:06,860 here's stuff I do need security and let me focus my efforts on the stuff I do need security right 505 00:43:06,860 --> 00:43:07,660 now it's just one big 506 00:43:09,500 --> 00:43:14,460 gobbledygook yeah yeah so yes ma'am 507 00:43:19,420 --> 00:43:20,100 what's that 508 00:43:22,640 --> 00:43:23,600 we're using what 509 00:43:25,900 --> 00:43:32,420 ah yeah so actually that's yeah I've been trying to so one observation and I think you what you're 510 00:43:32,420 --> 00:43:36,460 hinting towards is and I learned about this actually after we even published the paper 511 00:43:37,660 --> 00:43:42,380 I'm curious to know is that most manufacturers put spare cells on the hardware itself I don't know if 512 00:43:42,380 --> 00:43:46,560 you knew about that but that's what your ah so right now I can say I can actually say we have a zero 513 00:43:46,560 --> 00:43:51,400 modification attack because we don't actually don't have to add a cell most manufacturers actually 514 00:43:51,400 --> 00:43:55,340 put spare cells and that's when you see processor steppings what they're doing is they're taking 515 00:43:55,340 --> 00:44:01,060 spare cells and recoding logic in those spare cells because it saves you the cost the NRE cost of 516 00:44:01,060 --> 00:44:06,240 having to do an entire remask and respin it's very easy to connect things up after the fact cheap to 517 00:44:06,240 --> 00:44:07,640 connect things up after the fact but you know what I mean you're losing a lot of problems because the 518 00:44:07,640 --> 00:44:14,620 So they actually put spare cells to basically populate the entire thing when they ship it because they know, oh, we can just do a very low-level patch. 519 00:44:15,180 --> 00:44:21,760 Yes, we could take one of those spare cells and flip it out with our own, and we would have probably even a more stealthy attack. 520 00:44:22,140 --> 00:44:23,920 So does that answer your question? 521 00:44:24,380 --> 00:44:25,560 Yeah, we thought about it. 522 00:44:25,600 --> 00:44:26,740 But I didn't learn about it until afterwards. 523 00:44:27,520 --> 00:44:28,040 Yes, sir. 524 00:44:32,140 --> 00:44:36,680 I think in the future you'll see things that that question is more suitable towards. 525 00:44:37,640 --> 00:44:40,360 Not this, but there's a wink in there somewhere. 526 00:44:41,340 --> 00:44:44,520 I think there's a zero modification attack. 527 00:44:44,720 --> 00:44:50,880 I think that's one area I'm interested in going towards, where you get plausible deniability. 528 00:44:53,620 --> 00:44:54,260 Anyone else? 529 00:44:54,420 --> 00:44:54,780 Okay. 530 00:44:55,340 --> 00:44:57,680 If you have any private questions, come and see me afterwards. 531 00:44:57,820 --> 00:44:59,520 Otherwise, thank you all for attending. 532 00:44:59,700 --> 00:45:00,820 I know this was mysterious. 533 00:45:00,980 --> 00:45:02,000 I didn't know where I was at either. 534 00:45:02,480 --> 00:45:03,100 Thank you.