1 00:00:00,000 --> 00:00:04,260 Good afternoon, everybody, at DEF CON. Thank you for coming. I'd like to take this time 2 00:00:04,260 --> 00:00:08,740 to introduce myself really quick. My name is Christopher Donofsky. I was the principal 3 00:00:08,740 --> 00:00:14,560 at Flylogic. However, as of yesterday, it was announced that Flylogic has now been acquired 4 00:00:14,560 --> 00:00:22,000 by IOactive. Thus, we will become Flyoactive. So anyway, with all that said, you can expect 5 00:00:22,000 --> 00:00:26,280 to see lots of good stuff coming from us as a team. Going to have some people working 6 00:00:26,280 --> 00:00:31,140 with me now. Won't just be myself. Make things a lot easier, more productive, which benefits 7 00:00:31,140 --> 00:00:37,200 the customer, which is maybe you guys. So what I'm going to do today is basically walk 8 00:00:37,200 --> 00:00:45,600 through basically a look into my world, the way I see things, so to speak, compared to 9 00:00:45,600 --> 00:00:52,100 the way many of you might see it in regards to chips. And so in 2010, February, I reverse 10 00:00:52,100 --> 00:00:56,260 engineered the Infineon 66PE TPM. As anybody knows, it's a chip. It's a chip that works 11 00:00:56,260 --> 00:01:02,340 really well. Are anyone familiar with this? Okay. So now I started to reverse engineer 12 00:01:03,600 --> 00:01:09,560 STMicroelectronics version of their PE ‑‑ I'm sorry, their TPM. I speak really, really 13 00:01:09,560 --> 00:01:13,140 fast and I'm really wound up today. I have a lot of friends in the audience. So if I 14 00:01:13,140 --> 00:01:17,580 speak too quick or you have a question, raise your hand, get my attention, and we'll pause 15 00:01:17,580 --> 00:01:25,460 and I'll take your question. Otherwise, I'll just continue and never stop. So these chips 16 00:01:25,460 --> 00:01:26,240 are put into your motherboards. They're built into your computer. They're built into your 17 00:01:26,240 --> 00:01:28,860 motherboards or your computers, depending what kind of motherboard you have. You're 18 00:01:28,860 --> 00:01:32,560 supposed to trust them, put all your key material in there and everything. Windows can use it 19 00:01:32,560 --> 00:01:39,320 in BitLocker and so forth. But these chips are not really that secure. And I'm baffled 20 00:01:39,740 --> 00:01:45,300 and cannot understand how Infineon and ST and AppMail as well can take the same processor 21 00:01:45,300 --> 00:01:51,760 families that they use for their smart cards and then just put some Band-Aids onto it and 22 00:01:52,120 --> 00:01:54,800 sell it to you, you know, as a trusted platform module. 23 00:01:54,800 --> 00:01:59,880 Remember, this chip's going to sit in your motherboard for years. So, you know, this 24 00:01:59,880 --> 00:02:05,180 legacy ‑‑ you're only as strong as your legacy products were. And they're not that 25 00:02:05,180 --> 00:02:14,520 strong in most cases. So who here is familiar with ST smart cards? Okay. So let's go back 26 00:02:14,520 --> 00:02:17,900 in time a little bit. Because I want to make sure that everybody understands today the 27 00:02:17,900 --> 00:02:24,700 principles. This is all about the principles. You can shrink to 90 nanometers, for example, 28 00:02:24,800 --> 00:02:31,760 the ST23 today. And you can get your EAL 6 plus rating for common criteria. But honestly, 29 00:02:31,900 --> 00:02:36,780 it doesn't mean anything if you take the time, polish down the chips, do your imaging, what 30 00:02:36,780 --> 00:02:40,460 I'd call your due diligence, and you find out that it's really not that complicated 31 00:02:40,460 --> 00:02:47,380 when you break it down into simple terms. So everything that ST makes today in their 32 00:02:47,380 --> 00:02:52,760 smart card field that is 6805 variant, it's all based on their past. That's why I always 33 00:02:52,760 --> 00:02:54,540 like to say you're only as strong as your past. 34 00:02:55,120 --> 00:03:00,000 Because the first thing that I'm going to do is go look at your past, then look at newer 35 00:03:00,000 --> 00:03:07,460 and then slowly advance up to today. Not much has changed. In 1998 they came out with the 36 00:03:07,460 --> 00:03:13,380 first 19 series. And it was a 600 nanometer process. And it had three metal layers of 37 00:03:13,380 --> 00:03:19,780 aluminum. It had an 8‑bit bus internally for the core. And the ‑‑ everything basically 38 00:03:19,780 --> 00:03:23,280 was 8‑bits. The ROM, the RAM, the E‑Prom. 39 00:03:23,280 --> 00:03:30,440 It was a micro‑coded based design. So they had some tables of ones and zeros that represented 40 00:03:30,440 --> 00:03:37,120 how to dispatch the instructions and so forth. And it was based on an even older version 41 00:03:37,120 --> 00:03:39,500 of their smart card families known as the ST16. 42 00:03:42,660 --> 00:03:49,960 So then in about 2001, ST starts to come out with this X series platform. So the X, there 43 00:03:49,960 --> 00:03:52,700 was an XL series. There was an XT series. 44 00:03:53,280 --> 00:03:59,560 These now went smaller in feature size. They went from a 600 nanometer, three metal. They 45 00:03:59,560 --> 00:04:03,580 went to a 350 nanometer, four metal, still aluminum process. 46 00:04:04,660 --> 00:04:12,720 The ROM and all the other output buses of memories except the E‑Prom, it's an 8‑bit 47 00:04:12,720 --> 00:04:17,880 internal bus still. The micro‑code tables got removed. And basically it became this 48 00:04:17,880 --> 00:04:23,160 nest of glue logic. Who here does, anybody do layout in here? No? 49 00:04:23,280 --> 00:04:27,860 Okay, good, good, good. So we'll get into that. That will be the last thing we get into. So 50 00:04:27,860 --> 00:04:30,980 we're going to go through all my slides and then I'm going to put you into Photoshop and 51 00:04:30,980 --> 00:04:36,800 we'll have some fun in Photoshop. So they added some additional instructions as well. 52 00:04:38,280 --> 00:04:43,320 So then they came out with what they call the W series, which is what my target is, my 53 00:04:44,980 --> 00:04:53,100 WP18. 18 means 18 kilobytes of WEPROM. So now they shrunk from 300, so 600, 350, now 54 00:04:53,100 --> 00:04:59,880 they're down to a 180 process and it still has four metal layers. The ROM bus output 55 00:04:59,880 --> 00:05:04,860 became 16 bits, but then what happens, it goes through a little block of logic and it 56 00:05:04,860 --> 00:05:11,500 gets deduced to the actual true 8-bit value that this chip speaks internally. So it was 57 00:05:11,500 --> 00:05:17,020 a shrink and it was like I'm seeing here, a typical, it was just band-aided together 58 00:05:17,020 --> 00:05:21,640 on top of the old stuff. They add a little bit of new stuff and then, uh-oh, we ran out 59 00:05:21,640 --> 00:05:21,900 of room. 60 00:05:22,080 --> 00:05:23,080 So we have to, 61 00:05:23,080 --> 00:05:27,600 we have to get rid of the active shielding in an area to fit our changes into place. 62 00:05:28,740 --> 00:05:32,780 Because of what they did on this TPM chip, they actually made it weaker than any other 63 00:05:32,780 --> 00:05:37,760 ST-19 that I've ever seen because the mesh does not consistently cover the entire surface 64 00:05:37,760 --> 00:05:43,640 anymore. In this hole that I'll show you, there's, I found three or four different 65 00:05:43,640 --> 00:05:46,560 clock signals that I can use to eavesdrop the data bus. 66 00:05:47,400 --> 00:05:52,400 Because these chips run on their own internal clock. They can switch to the outside world 67 00:05:52,400 --> 00:05:56,740 if software allows, but they power up on the internal clock and they may never switch 68 00:05:56,740 --> 00:06:03,160 to the outside world. For example, XM satellite radio. They used a 19AFO8. It never ran on 69 00:06:03,160 --> 00:06:12,280 the outside world clock. So this makes the WP18 weaker than the Infineon TPM by far. 70 00:06:12,480 --> 00:06:19,600 And I've never seen the 19WP18 in the field in use. I've found them on the surplus markets. 71 00:06:25,020 --> 00:06:29,360 So start to take a look at this just so everybody can understand. I did a real quick cross section 72 00:06:29,360 --> 00:06:35,720 into the WP18 just to kind of give everybody an understanding of what we're going, what 73 00:06:35,720 --> 00:06:41,280 I'm trying to talk about today. Because you'll hear me talk about M1, M2, M3, M4, which 74 00:06:41,280 --> 00:06:44,900 really means metal 1, metal 2, metal 3, metal 4. Or you might hear me talk about the poly. 75 00:06:46,400 --> 00:06:48,640 And so you can see here in the picture. 76 00:06:49,600 --> 00:06:55,820 I milled away a staircase into the chip and then tilted it and imaged it. And you can 77 00:06:55,820 --> 00:07:02,220 see there's some metal ‑‑ two big fat chunks of metal 4. Okay. My mouse. Then I 78 00:07:02,220 --> 00:07:07,480 drew these blue lines for a show. But then you can see metal 3 was under there. And then 79 00:07:07,480 --> 00:07:12,140 we can see there's a via right here and there's a via right there. There's one more via here 80 00:07:12,140 --> 00:07:18,460 that I didn't put an arrow to. And then there's your metal 2. And then finally metal 1. I 81 00:07:19,600 --> 00:07:26,060 did a little bit longer cross section. And then you can see the poly where they designed 82 00:07:26,060 --> 00:07:37,140 their transistor down in the bottom a little bit. Anybody have questions yet? Okay. ST, 83 00:07:37,360 --> 00:07:40,980 like all these other manufacturers, they like to put little pictures on their chips 84 00:07:40,980 --> 00:07:46,280 sometimes or little code names. So they've code named this particular device Longhorn. 85 00:07:46,540 --> 00:07:49,580 I have no idea why. But I just thought it was interesting. There's a lot of people who 86 00:07:49,600 --> 00:07:57,140 interesting to show you. So before we even ‑‑ there's an active 87 00:07:57,140 --> 00:08:01,620 shield over the whole entire ‑‑ 99% of this entire surface area there's an active 88 00:08:01,620 --> 00:08:08,540 shielding that they place down. If you have fingers of ground and then you have going 89 00:08:08,540 --> 00:08:15,480 at 45 degrees and then you have a single serpentine wire going in between them, if you break this 90 00:08:15,480 --> 00:08:22,060 line or ground it out in any way, it will pull down the ground if you cut it. If it 91 00:08:22,060 --> 00:08:28,420 ever sees zero, the chip will bulk erase its EPROM and it will ‑‑ it's a sanity check 92 00:08:28,420 --> 00:08:34,220 on power up that it will never boot again. What I have to do to polish these chips down, 93 00:08:34,460 --> 00:08:40,160 I have to ‑‑ well, I could polish off this layer with a lapping machine, but it's 94 00:08:40,160 --> 00:08:44,520 very time consuming. So I tend to cheat. Use the quickest way possible to get the 95 00:08:44,520 --> 00:08:45,100 task accomplished. 96 00:08:46,020 --> 00:08:51,980 So here, this image you can see, I've removed the shield by dipping it in hydrofluoric 97 00:08:51,980 --> 00:08:56,740 acid for about two minutes. As soon as it came off, I rinsed it, cleaned it, and now 98 00:08:56,740 --> 00:09:01,600 you can still see the oxide residue of where the shield used to live. Can everybody see 99 00:09:01,600 --> 00:09:08,980 the ripples in the ‑‑ like the orange area? So it looks pretty ugly, though. So 100 00:09:08,980 --> 00:09:12,980 do you see ‑‑ you can't really see anything down deep. It just looks like a fog layer 101 00:09:12,980 --> 00:09:13,980 on top of it. 102 00:09:15,960 --> 00:09:21,080 Now, once we start to polish the chip, now it can ‑‑ it completely changes it and 103 00:09:21,080 --> 00:09:27,740 that's what we end up with once that oxide layer has been polished off. So this is the 104 00:09:27,740 --> 00:09:34,240 TPM chip with its active shield stripped off and polished until it was nice and shiny for ‑‑ 105 00:09:34,240 --> 00:09:39,420 and then a quick image was made. You can see here we've got 8 ‑‑ we've got a ROM right 106 00:09:39,420 --> 00:09:43,960 here. This is ‑‑ uh‑oh, hold on. Okay. This is the ROM. And this is the RAM. And 107 00:09:43,980 --> 00:09:49,360 the read only memory. This is where the CPU will always boot up first. You've got 18 kilobytes 108 00:09:49,360 --> 00:09:54,060 of EPROM in here. You've got ‑‑ I don't recall, I think this is 4 kilobytes of static 109 00:09:54,060 --> 00:10:00,580 RAM down here. You have two tables up in this upper ‑‑ the upper right quadrant, if 110 00:10:00,580 --> 00:10:05,320 you can see my mouse here, which are firewall access rules, where are you coming from, where 111 00:10:05,320 --> 00:10:13,960 do you want to go to, can you read, can you write from there and so forth, execute. You've 112 00:10:13,960 --> 00:10:18,220 got under the word metal, there's a 2K RAM right there. They talk about this in the product 113 00:10:18,220 --> 00:10:24,740 quick spec that you can find online. And then if you look to the ‑‑ below my mouse 114 00:10:24,740 --> 00:10:29,080 is to the left of the M in metal 3, there's a little black spot, there's a little black 115 00:10:29,080 --> 00:10:35,220 box. Can everybody see that black box? That black box is where metal 4 had to be used 116 00:10:35,700 --> 00:10:42,960 to finish their modeling of their additional logic that they added into this. The CPU in 117 00:10:42,960 --> 00:10:43,920 this chip is ‑‑ 118 00:10:43,920 --> 00:10:50,800 all contained to the left of the RAM near this metal 4 area that I continue to refer 119 00:10:50,800 --> 00:10:55,660 to. Everything else pretty much is something to do with cryptography, hardware crypto units, 120 00:10:55,880 --> 00:11:05,600 SHA-1, RSA, triple DES and so forth. When I'm polishing a chip, I don't polish one chip, 121 00:11:05,680 --> 00:11:09,720 I'll polish four or five of them. So here's one chip, I'll take them all to metal 3, let's 122 00:11:09,720 --> 00:11:13,900 say, and then whoever is the best stays at metal 3. Then I'll take the rest and I'll 123 00:11:13,900 --> 00:11:17,940 go to metal 2. Whoever is the best, he stays at metal 2. And I don't need the chip to 124 00:11:17,940 --> 00:11:23,760 be perfectly smooth. I need the chip to be perfectly smooth in the area of my interest. 125 00:11:24,140 --> 00:11:31,020 So it's very normal for me to not have it 100% even in planner. I'm polishing these 126 00:11:31,020 --> 00:11:38,340 chips with my finger and a silica solution, .05 micron, like a sandpaper, liquid sandpaper. 127 00:11:38,560 --> 00:11:43,860 So here's the metal 2. So you can see metal ‑‑ there's the metal 3. Go back to metal 2. There's 128 00:11:43,860 --> 00:11:43,880 2. Go back to metal 2. Go back to metal 2. Go back to metal 2. Go back to metal 2. Go back to metal 129 00:11:43,900 --> 00:11:47,160 1. You can see it's slowly ‑‑ things are starting to ‑‑ it's getting less and less dense 130 00:11:47,160 --> 00:11:54,140 as you ‑‑ as you ‑‑ as I polish down to the bottom. Then we've got metal 1. So you've got 131 00:11:54,140 --> 00:11:58,280 metal 3, metal 2, metal 1. Metal 4 we don't care about because that was the mesh, the 132 00:11:58,280 --> 00:12:03,860 shielding. The only reason I would care about metal 4 is for that unprotected area where I was 133 00:12:03,860 --> 00:12:07,660 talking about that they left ‑‑ that they had to ‑‑ where there's tracks being ‑‑ 134 00:12:07,660 --> 00:12:12,320 there's routing there. So metal 1 is where you're going to have all your gates created, metal 2, 135 00:12:12,320 --> 00:12:17,820 metal 1. Metal 2, 3, and in this case part of 4, it's all routing. It's all routing to get your 136 00:12:17,820 --> 00:12:23,700 NAND to your OR, to your OR, to your MUX, you know, to your flip flop, whatever, to make the 137 00:12:23,700 --> 00:12:33,800 state machine run. That small section you can see in this picture from the FIB. So I went in on, 138 00:12:33,960 --> 00:12:38,700 does everybody know what a focused ion beam workstation is? So it's a machine that will 139 00:12:38,700 --> 00:12:42,300 basically ‑‑ it's a nuclear weapon to a terrorist, kind of. So this machine is going to 140 00:12:42,300 --> 00:12:49,620 let me deposit metals, deposit insulator, mill away material and so forth. So I can totally 141 00:12:49,620 --> 00:12:56,160 change the behavior of circuits. And here I was having some fun. I was going to do some ‑‑ this 142 00:12:56,160 --> 00:13:00,260 is where I did the cross section that you saw earlier. And so I've sputter coat with some 143 00:13:00,260 --> 00:13:05,600 tungsten to make the area visible. Otherwise you would see black everywhere because it's 144 00:13:05,600 --> 00:13:11,820 insulated by the oxide layer on the surface. So, again, I ‑‑ this is unacceptable. 145 00:13:11,820 --> 00:13:19,300 For a device that's EAL5 certified. And I have no clue who certifies these chips. But common 146 00:13:19,300 --> 00:13:26,920 criteria doesn't mean anything to someone like myself, you know, if it's a target. So here's 147 00:13:26,920 --> 00:13:32,580 just ‑‑ in that logic zone on metal four, here's a random shot I took in the FIB again at 148 00:13:32,580 --> 00:13:39,360 15,000 magnification. The FIB can go up to about 800,000. It can go up to 800,000. I've only 149 00:13:39,360 --> 00:13:41,800 ever been as high as 200,000 mag, though. So I'm not going to go into that much detail. So I'm 150 00:13:41,820 --> 00:13:48,080 not going to go into that. It just depends how small the device was to begin with. So here 151 00:13:48,080 --> 00:13:52,940 you can see another shot of the ‑‑ of the shield ‑‑ the active shield to the left is 152 00:13:52,940 --> 00:13:59,180 ending. And to the right, you can see the metal four routing that they placed. This is such a 153 00:13:59,180 --> 00:14:04,740 big boo boo. Because you know in this area, I guarantee you the data bus is in there. There's 154 00:14:04,740 --> 00:14:08,320 eight lines that will have the data going back and forth on it. It's going to be mangled. It will 155 00:14:08,320 --> 00:14:11,800 be encrypted with an XOR. But X exclusive OR on data, it's going to be mangled. It's going to be 156 00:14:11,820 --> 00:14:13,140 encrypted with an XOR. So you can see the data is when you know what the data should have been 157 00:14:13,140 --> 00:14:20,460 in the clear isn't hard to figure out. And then ‑‑ and there, of course, there will be a 158 00:14:20,460 --> 00:14:25,300 clock in here. So what do I need as an attacker? I need the data bus or maybe the instruction 159 00:14:25,300 --> 00:14:29,520 registers. That way I can induce glitches to change the behavior of an instruction being 160 00:14:29,520 --> 00:14:34,480 executed. And I need a clock because I have to synchronize with the chip's internal operations. 161 00:14:37,300 --> 00:14:41,800 So here, that same area, I started playing around milling. And I just milled it. I just milled it 162 00:14:41,820 --> 00:14:46,860 out. There was an open space in that cavity right there. And so I milled until I hit metal three. 163 00:14:48,560 --> 00:14:58,680 Excuse me. And it's nothing significant in the picture. Just a show. The ROM on this super, 164 00:14:58,720 --> 00:15:04,920 super trustable chip that you would put your secrets in isn't even encrypted very hard because 165 00:15:04,920 --> 00:15:08,580 you can see these spots. You can see the checkerboard pattern. Do you see the checkerboard 166 00:15:08,580 --> 00:15:11,800 pattern? This is giving away the key. You can see the checkerboard pattern. This is giving away 167 00:15:11,820 --> 00:15:15,740 the key that they're using the XOR, the ROM material with. So where we see these XOR patterns, 168 00:15:15,940 --> 00:15:20,220 it's clearly FFs right there or zeros. And it's ‑‑ but it's been encrypted ‑‑ it's 169 00:15:20,220 --> 00:15:25,600 been, I'd like to say mangled or scrambled with an XOR. And the XOR is based on a mix 170 00:15:25,600 --> 00:15:32,880 of high and low address. Just going to stay on that image for one second. The scariest 171 00:15:32,880 --> 00:15:37,220 thing about this whole thing is that this is the metal one layer of where they laid 172 00:15:37,220 --> 00:15:41,700 their mask ROM. That's only a 20X objective that I took this picture with. 173 00:15:41,820 --> 00:15:46,720 And you can make out little things. Just imagine that you don't even have to have high‑tech 174 00:15:46,720 --> 00:15:53,820 equipment to image this ROM. And I think the best example of this in real life are the 175 00:15:53,820 --> 00:15:58,540 people who hacked NAGRA vision in satellite TV. Because these guys study optically read 176 00:15:58,540 --> 00:16:04,580 this ROM out for NAGRA 2 and were able to figure it out, deduce everything and glitch into 177 00:16:04,580 --> 00:16:11,800 it. Every chip that ST has ever made has been broken. Just for the record. And the 178 00:16:11,820 --> 00:16:17,980 next thing I'm going to show you, here's the same ROM bits, metal one again, but now 179 00:16:17,980 --> 00:16:23,260 I've zoomed in to the max I can go optically. So the maximum my ZEISS can do optically is 180 00:16:23,260 --> 00:16:27,840 1500 power. And so it just gives you ‑‑ I mean, that's a beautiful shot. You can see 181 00:16:27,840 --> 00:16:33,520 the bits clear as day. And I mean, it's not game over because the ROM is like this, but 182 00:16:33,520 --> 00:16:39,160 you can clearly see that the ROM is not encrypted at all. It's some type of very weak scrambling. 183 00:16:42,360 --> 00:16:47,300 So ST likes to play this game. They like to have a bunch of different areas of memory. 184 00:16:47,540 --> 00:16:51,960 And everybody basically, if you're not driving the bus, you're tri‑stated. They don't believe 185 00:16:51,960 --> 00:16:58,300 ‑‑ this is kind of like a 1980s mux in my opinion. So rather than using a true 186 00:16:59,740 --> 00:17:05,700 multiplexer, they basically have these tri‑statable drivers everywhere around the chip. And this 187 00:17:05,700 --> 00:17:10,480 explains why they're only capable of about 15 megahertz compared to an Infineon running 188 00:17:10,480 --> 00:17:11,020 at 33. 189 00:17:15,840 --> 00:17:22,540 They do it right. And ST, I think they have a lot to learn. This is ‑‑ in this picture 190 00:17:22,540 --> 00:17:27,880 you can see the metal one layer, which makes the actual ‑‑ it completes these gates. 191 00:17:28,100 --> 00:17:34,000 There's two gates here. You've got a buffer ‑‑ I'm sorry, a driver, a high output driver, 192 00:17:34,240 --> 00:17:40,080 and then you've got the tri‑statable area to the left. It almost acts like a 74126, 193 00:17:41,820 --> 00:17:47,780 where everybody does electronics. You can see the polysilicon below that. 194 00:17:49,780 --> 00:17:58,840 So the WP18, here we go again. Same exact tri‑state driver, just it's a shrink. This 195 00:17:58,840 --> 00:18:04,700 was the 350 nanometer design of the driver. This is the 180 nanometer design of the driver. 196 00:18:05,220 --> 00:18:10,560 Same crap, different day. I mean, it's ‑‑ I don't understand. They just shrink. That's 197 00:18:10,560 --> 00:18:10,680 it. 198 00:18:12,920 --> 00:18:17,740 Size doesn't matter, either, because this is from their latest generation, ST23. 199 00:18:18,120 --> 00:18:20,360 That's a 90 nanometer process that I did in the SEM. 200 00:18:20,700 --> 00:18:26,080 So you can see clearly here, there again is your poly, and then above it, that's actually 201 00:18:26,080 --> 00:18:28,000 there's two tri-stateable drivers in this image. 202 00:18:28,260 --> 00:18:29,640 So you have one on the left, one on the right. 203 00:18:29,940 --> 00:18:35,260 And those had been overlaid, and then I cropped it and I separated them and put them into 204 00:18:35,260 --> 00:18:35,840 the slide deck. 205 00:18:37,440 --> 00:18:38,940 Does anybody have any questions? 206 00:18:39,100 --> 00:18:40,200 Because I'm moving really fast. 207 00:18:41,440 --> 00:18:41,800 No? 208 00:18:42,600 --> 00:18:42,960 Okay. 209 00:18:44,600 --> 00:18:44,960 Yes? 210 00:18:46,720 --> 00:18:47,080 . 211 00:18:54,160 --> 00:18:55,140 That's a very good question. 212 00:18:55,240 --> 00:18:55,660 That's what I was saying. 213 00:18:55,740 --> 00:19:00,540 This is like a 1980s design, you know, where if you're not on, you're tri-stated, you're 214 00:19:00,540 --> 00:19:00,700 off. 215 00:19:01,940 --> 00:19:02,900 I don't know why. 216 00:19:03,040 --> 00:19:05,520 Every other manufacturer I've ever looked at uses a true MUX. 217 00:19:05,840 --> 00:19:06,840 A multiplexer. 218 00:19:13,000 --> 00:19:14,840 I can't hear you. 219 00:19:15,180 --> 00:19:15,840 Move on? 220 00:19:16,680 --> 00:19:17,160 Okay. 221 00:19:19,400 --> 00:19:21,700 So we can learn a lot by studying their past. 222 00:19:22,020 --> 00:19:24,840 So the WP's, it's fairly small. 223 00:19:25,040 --> 00:19:25,740 It's 180 nano. 224 00:19:25,920 --> 00:19:27,700 You're pushing the optic limits almost. 225 00:19:28,180 --> 00:19:33,960 140, you're really at your optical limits for seeing, you know, the metal one and the 226 00:19:33,960 --> 00:19:34,460 poly area. 227 00:19:36,860 --> 00:19:45,360 But going back to their past, which I've shown two different chips above, you can learn 228 00:19:45,360 --> 00:19:45,620 a lot. 229 00:19:47,160 --> 00:19:50,720 So these are two 350 nanometer versions of their chips. 230 00:19:51,200 --> 00:19:53,220 But remember what I just said five minutes ago. 231 00:19:53,340 --> 00:19:57,480 There's nothing different about the 23 or the W series or the N series. 232 00:19:57,740 --> 00:20:03,020 They still ‑‑ the only differences are the ROM outputs, they fetch 16 bits wide or 233 00:20:03,020 --> 00:20:04,380 they fetch 34 bits. 234 00:20:04,460 --> 00:20:06,300 You know, 32 plus 2‑bit parity. 235 00:20:06,720 --> 00:20:12,860 But as soon as they're done with their little cipher block, you end up with an 8‑bit bus 236 00:20:12,860 --> 00:20:14,480 again internally with the tri‑states. 237 00:20:18,460 --> 00:20:24,440 Looking at the 350 nanometer chip, I did some extensive work on this a few months ago. 238 00:20:25,560 --> 00:20:31,280 You can see here in the middle of the CPU, which we'll get to that after the slide deck 239 00:20:31,280 --> 00:20:31,600 is finished. 240 00:20:32,020 --> 00:20:34,100 You can see that metal one. 241 00:20:34,100 --> 00:20:37,660 Metal two ‑‑ sorry, metal three, metal two, metal one, you can see that the three 242 00:20:37,660 --> 00:20:40,800 ‑‑ these have been overlaid on top of each other. 243 00:20:41,060 --> 00:20:43,280 And then I separated them and put them into the picture. 244 00:20:43,680 --> 00:20:48,820 Those are the eight driver, tri‑stateable drivers for the ROM output, the decrypted 245 00:20:48,820 --> 00:20:49,220 ROM fetch. 246 00:20:52,920 --> 00:21:01,500 So this is a FIB picture where from my reference, excuse me, my reference point, I went over 247 00:21:01,500 --> 00:21:04,080 on the X axis 1925 miles per second. 248 00:21:04,100 --> 00:21:11,040 And then I milled a little arrow into the chip ‑‑ well, I deposited an arrow with 249 00:21:11,040 --> 00:21:17,460 platinum down here in the bottom, but you can barely see it because of the slide show. 250 00:21:22,680 --> 00:21:27,860 So in summary, this chip really doesn't come as a shocker to me. 251 00:21:28,220 --> 00:21:32,960 There are a lot of exposed and unprotected areas in that block on metal four that I was 252 00:21:32,960 --> 00:21:33,260 showing you. 253 00:21:34,100 --> 00:21:34,500 The signals are present. 254 00:21:34,740 --> 00:21:39,220 I have to finish all my tracing and I'm not done imaging on my imaging of the lower layers 255 00:21:39,220 --> 00:21:40,320 of the WP. 256 00:21:41,420 --> 00:21:46,260 But so far from what I found, it's ‑‑ they're on the same road as the other chips, as their 257 00:21:46,260 --> 00:21:48,880 other variants have been for failure. 258 00:21:50,840 --> 00:21:56,020 You know, it's ‑‑ again, it's based on the same ‑‑ it's the same device as 259 00:21:56,020 --> 00:21:58,880 the past, except it shrunk and they added some extra things to it. 260 00:22:01,060 --> 00:22:02,940 So who wants to go into Photoshop? 261 00:22:04,220 --> 00:22:04,640 Okay. 262 00:22:06,540 --> 00:22:07,520 So thank you. 263 00:22:07,700 --> 00:22:09,100 So this is the end of my slide deck. 264 00:22:11,040 --> 00:22:16,360 So be sure and fill out the DEF CON card, please, if they have one. 265 00:22:26,260 --> 00:22:30,700 Does anybody know how to make the Photoshop screen show up on there? 266 00:22:33,660 --> 00:22:34,080 Okay. 267 00:22:40,720 --> 00:22:43,820 Any Mac guys here that knows how to make my screen become active here? 268 00:22:46,860 --> 00:22:47,340 Okay. 269 00:22:53,720 --> 00:22:54,200 Okay. 270 00:22:55,840 --> 00:22:55,880 Okay. 271 00:22:56,520 --> 00:22:57,000 Okay. 272 00:23:06,800 --> 00:23:07,300 Okay. 273 00:23:07,300 --> 00:23:11,000 It's not showing me ‑‑ mirror. 274 00:23:18,620 --> 00:23:19,940 No, it's not going. 275 00:23:22,720 --> 00:23:23,220 Okay. 276 00:23:26,140 --> 00:23:26,640 Okay. 277 00:23:26,680 --> 00:23:27,420 So now ‑‑ 278 00:23:50,140 --> 00:24:01,380 Can everybody see it? I can't tell from here. Okay. So this is actually a nice spot wherever 279 00:24:01,380 --> 00:24:05,660 we are. I have no clue where we are. Because it's all offset now. Everything's changed on my 280 00:24:05,660 --> 00:24:10,500 side, too. So ST likes to do a lot of funny things. A lot of weird things. A lot of things that I 281 00:24:10,500 --> 00:24:15,840 have no idea why because I don't work with them. One thing that they like to do is they like to 282 00:24:15,840 --> 00:24:22,660 drop in what I call dead gates. And I don't know why they do it. It's almost as if they think 283 00:24:22,660 --> 00:24:28,260 that they'll scare you off if you're going to try to polish them down or something. So they leave 284 00:24:28,260 --> 00:24:31,360 these gates that are actually strapped off. And they're going to try to get you out of the 285 00:24:31,360 --> 00:24:31,560 state of the art. And they try to do this in the shape of a 286 00:24:31,560 --> 00:24:34,620 boomerang. And you can see the chip is tied to the ground fingers of the mesh that's now been 287 00:24:34,620 --> 00:24:39,680 removed. So in theory, if you're an attacker, I suppose, and you don't know anything, you'll 288 00:24:39,680 --> 00:24:44,340 think, uh oh, you know, the chip can never run like this because there was a signal tied to the 289 00:24:44,340 --> 00:24:50,320 mesh's ground finger. And I've just cut this finger off. But it's not true. It's not true at 290 00:24:50,320 --> 00:24:57,680 all. It's completely bogus. So let's see. So in this picture, in the middle of the view right 291 00:24:57,680 --> 00:25:03,880 here where my mouse is, this, that is an example of a bogus 292 00:25:03,880 --> 00:25:08,820 gate. This gate has no purpose in life whatsoever. I don't even 293 00:25:08,820 --> 00:25:14,340 know what it is. Let's look and see what it is. So we can see 294 00:25:14,340 --> 00:25:18,940 like there was one ‑‑ this right here used to come to the 295 00:25:18,940 --> 00:25:21,760 surface to the finger of ground. That little black dot is what's 296 00:25:21,760 --> 00:25:24,860 left of the via that had been there before I polished. So this 297 00:25:24,860 --> 00:25:27,920 has been polished until the aluminum became nice and white. 298 00:25:28,200 --> 00:25:33,360 This way I don't have to sputter coat it if I put it in a SEM. You 299 00:25:33,360 --> 00:25:38,060 should sputter coat, but I'm lazy. So I didn't. But I could 300 00:25:38,060 --> 00:25:46,440 have. Anyhow. And I should have. So, okay. This work has all been 301 00:25:46,440 --> 00:25:50,420 hobby. It's not a job. So that's why I'm saying I'm lazy about 302 00:25:50,420 --> 00:25:53,640 it. But if this had been a job, I'd do it from steps A to Z and 303 00:25:53,640 --> 00:25:54,020 be done. 304 00:25:55,540 --> 00:26:05,580 So now we can see that that had gone to here. And then it went 305 00:26:05,580 --> 00:26:13,000 down. They like to play these games with their routing, too. 306 00:26:13,460 --> 00:26:16,360 Some of it is auto placed and routed and some of it is not. 307 00:26:16,460 --> 00:26:22,380 Some of it you can certainly tell has been manually put in. And 308 00:26:22,380 --> 00:26:24,840 so then it went to this. And then it went to this. And then it 309 00:26:24,860 --> 00:26:27,740 went to this. And then you guys are like, what's that? But look 310 00:26:27,740 --> 00:26:31,540 right here. This is one of the power rails. Now, knowing ST, 311 00:26:31,760 --> 00:26:34,200 this is ground. It has to be ground. Because they're not going 312 00:26:34,200 --> 00:26:38,120 to tie one input to ground and the other input to a one, to VDD. 313 00:26:39,340 --> 00:26:42,860 You know, VDD being whatever their internal core voltage is. 314 00:26:43,100 --> 00:26:45,280 They're not going to do that. They're going to strap the gates 315 00:26:45,280 --> 00:26:50,220 off, which is grounding them. Strap them the same, I should 316 00:26:50,220 --> 00:26:53,540 say. So I know that this connects to there. It can't go 317 00:26:53,540 --> 00:26:54,840 anywhere else. And so we turn back on the other side of the 318 00:26:54,840 --> 00:26:57,360 metal, too. And it did. Now, the picture is slightly out of 319 00:26:57,360 --> 00:27:00,380 alignment right here. But it's such a large chip, you can get 320 00:27:00,380 --> 00:27:02,160 away with it being out of alignment. I don't have to have 321 00:27:02,160 --> 00:27:05,200 it perfectly aligned. But if I had taken some more time, I 322 00:27:05,200 --> 00:27:10,280 could have aligned it. It's all rotational alignment. So this 323 00:27:10,280 --> 00:27:14,700 gate, we just ‑‑ here we can see here, this is A, 324 00:27:16,960 --> 00:27:22,480 hypothetically. And then this is B. And then this would have 325 00:27:22,480 --> 00:27:24,820 been Y. But it doesn't ‑‑ it doesn't ‑‑ it doesn't work. 326 00:27:24,840 --> 00:27:28,180 It's not ‑‑ there's no via nothing. It's just completing the 327 00:27:28,180 --> 00:27:31,480 gate. So ‑‑ and they're not spares. These are not like spare 328 00:27:31,480 --> 00:27:34,220 NANDs or NORs. Let's see what it is, though, because I don't 329 00:27:34,220 --> 00:27:40,660 know what it is. So given that this was our ground rail right 330 00:27:40,660 --> 00:27:46,040 here, given that this is our ground rail here, oops, well, 331 00:27:46,100 --> 00:27:50,460 it's a little big. But you get the point. Well, let me kill 332 00:27:50,460 --> 00:27:52,860 that, though. So if ground went across here ‑‑ 333 00:27:55,020 --> 00:28:04,540 wait, wrong color. Okay. So ground went across here. A and B 334 00:28:04,540 --> 00:28:07,240 are in series with each other. Who can tell me what this gate 335 00:28:07,240 --> 00:28:13,160 is? You have two NFETs to ground in series. Anybody? Thank 336 00:28:13,160 --> 00:28:17,660 you. It's a NAND. It's a dead NAND. So why they do it, I have 337 00:28:17,660 --> 00:28:21,640 no clue. You can see a lot of other gates to the right that 338 00:28:21,640 --> 00:28:24,200 are really functional. The pictures don't lie. That's what 339 00:28:24,200 --> 00:28:24,820 I always tell everybody. You can see a lot of other gates to 340 00:28:24,820 --> 00:28:25,820 the left. That's what I always tell everybody. If you do your 341 00:28:25,820 --> 00:28:29,340 due diligence, you do all your polishing, you can ‑‑ the chip 342 00:28:29,340 --> 00:28:31,940 is right in front of you, whatever you need. When we 343 00:28:31,940 --> 00:28:35,740 first came into the chip, it looked pretty scary. Let me zoom 344 00:28:35,740 --> 00:28:41,840 out. So you look at the chip, and also does everybody notice 345 00:28:41,840 --> 00:28:44,720 that I didn't image the whole chip. This is at 1,000 power 346 00:28:44,720 --> 00:28:47,920 optically. But I didn't image the whole chip. I only imaged my 347 00:28:47,920 --> 00:28:51,900 region of interest. I don't need to image the whole chip. Because 348 00:28:51,900 --> 00:28:54,800 you know that by design, there's no way you're going to be able 349 00:28:54,800 --> 00:28:57,240 to do that. There's no way that these guys would have the decrypted 350 00:28:57,240 --> 00:29:01,560 op code, you know, the instruction that they're about to execute in 351 00:29:01,560 --> 00:29:04,160 the middle of this nest of logic. And then where is it going to 352 00:29:04,160 --> 00:29:07,520 decode to? It's going to fan out all around in a 360? No, it's 353 00:29:07,520 --> 00:29:10,260 not. It's going to be somewhere towards the side, and then it'll 354 00:29:10,260 --> 00:29:13,680 fan out to the right or to the left or up or down. But it's 355 00:29:13,680 --> 00:29:19,680 not going to be in the center of this whole nest. I suppose it 356 00:29:19,680 --> 00:29:23,100 could be. But I've never seen one. I can show you app malls 357 00:29:23,100 --> 00:29:24,780 and everything. Infineon. I've never seen one. I've never seen 358 00:29:24,780 --> 00:29:27,340 one. And the instruction registers are always somewhere 359 00:29:27,340 --> 00:29:38,180 near the edge. So in this case, we've got in the middle of here 360 00:29:38,180 --> 00:29:43,600 with all my drawings, we have a whole bunch of little blocks and 361 00:29:43,600 --> 00:29:47,920 things that I highlighted. You can see here in this image. So 362 00:29:47,920 --> 00:29:51,160 these are those drivers that we were talking about. So how did I 363 00:29:51,160 --> 00:29:54,060 get here? Who has an idea? How do I find this in the middle of 364 00:29:54,060 --> 00:29:54,760 all this logic? How do I find this? How do I find this in the 365 00:29:54,780 --> 00:29:59,280 middle of all this logic? How do I find this? Anybody? Where did 366 00:29:59,280 --> 00:30:03,940 the chip power up first? Powered up in its ROM. If these chips 367 00:30:03,940 --> 00:30:06,840 have any type of ROM on them, it has to power up there because 368 00:30:06,840 --> 00:30:09,160 it's the only place where the CPU knows that it's got static 369 00:30:09,160 --> 00:30:13,440 code set. Same with anything. You know, you're always going to 370 00:30:13,440 --> 00:30:17,500 power up a phone. Take your baseband processor in a phone. It 371 00:30:17,500 --> 00:30:20,440 has a boot ROM inside. The boot ROM powers up, does some checks, 372 00:30:20,520 --> 00:30:24,020 determines is the flash loaded, et cetera. What mode are we in, 373 00:30:24,020 --> 00:30:26,480 this type of thing. Same with a smart card or any other type of 374 00:30:26,480 --> 00:30:33,520 device that fits this mold. And so by following the ROM, which was 375 00:30:33,520 --> 00:30:41,280 to our left, the ROM was to the left in this image. Here, let me 376 00:30:41,280 --> 00:30:45,000 ‑‑ the ROM was over here. Now I've cropped this image. So 377 00:30:45,000 --> 00:30:48,860 because this image got cropped, and you can see here, I didn't 378 00:30:48,860 --> 00:30:52,680 even image this spot right here. It's missing. This is one of the 379 00:30:52,680 --> 00:30:56,620 math coprocessor. So this chip has math coprocessor, it can do 380 00:30:56,620 --> 00:31:01,280 SHA1, it can do RSA, DES, and a bunch of things. I don't even know 381 00:31:01,280 --> 00:31:05,600 what some of the functions it has besides those. So I knew I 382 00:31:05,600 --> 00:31:08,640 didn't need that very bottom area. And I took it ‑‑ I actually 383 00:31:08,640 --> 00:31:13,960 went in more than I needed to in the left section. So if we look 384 00:31:13,960 --> 00:31:19,940 here, you can see I've been drawing here. If I turn off all 385 00:31:19,940 --> 00:31:20,920 the layers for a second ‑‑ 386 00:31:28,000 --> 00:31:38,840 It's really slow. One second. So now you can see the ROM bits ‑‑ so the ROM's 387 00:31:38,840 --> 00:31:42,420 output drivers were to our left. They're out of view. We don't need 388 00:31:42,420 --> 00:31:46,680 them. Just trust me, they were there. If I went back in my slide deck, one of 389 00:31:46,680 --> 00:31:52,520 those two chips that I had shown you about the past was this chip. And so they 390 00:31:52,680 --> 00:31:55,100 again, they're going to play games, they're going to play a lot of games, and they're 391 00:31:55,100 --> 00:32:04,440 going to ‑‑ they're going to weave their way through memory. And so you really do need 392 00:32:04,440 --> 00:32:07,580 to image. You need to image from the ROM and then figure out which way did it go. And 393 00:32:07,580 --> 00:32:11,220 then some of them went up. So they play this game, you know, he went up and she went over 394 00:32:11,220 --> 00:32:15,060 this way, but they all meet again, you know, a few hundred micrometers to the right. They 395 00:32:15,060 --> 00:32:21,500 all meet right there. And let's take it there right now. Anybody ‑‑ is everybody following? 396 00:32:24,160 --> 00:32:29,260 Okay. So we ‑‑ just following the wires without turning on metal three. Metal three, 397 00:32:29,320 --> 00:32:37,960 it's not so easy to see it. We can see ‑‑ boom. And then I even have some notes here still. 398 00:32:41,980 --> 00:32:47,940 So ST has this little thing they're doing. And it's funny because Dr. Carson and I have 399 00:32:47,940 --> 00:32:52,560 a bet going right now to see who's right. I say that XOR1 ‑‑ 400 00:32:52,680 --> 00:32:57,120 Okay. ‑‑ is decrypting the ROM fetch and XOR2 is reencrypting the decrypted ROM 401 00:32:57,120 --> 00:33:01,440 fetch before it goes out on the open data bus. This way if you eavesdrop the open data 402 00:33:01,440 --> 00:33:07,060 bus, you'll see scrambled data, basically. But this is yet to be proven. So I haven't 403 00:33:07,060 --> 00:33:10,900 finished probing right now. I'm in the middle of it, but, again, this has been a hobby. 404 00:33:11,340 --> 00:33:19,800 It's a side project. It's not work. So if we take a given bit, number four, ROM trace 405 00:33:19,800 --> 00:33:22,280 number four, it came ‑‑ it came ‑‑ I don't know if you can see it. I don't know 406 00:33:23,320 --> 00:33:31,300 if you can see it. It came in on middle three. Here, let's see. You can see right here if 407 00:33:31,300 --> 00:33:47,380 it paints. One second. It will not paint. Okay. So ‑‑ so can everybody see ROM 408 00:33:47,380 --> 00:33:52,420 trace with the little arrow? I drew a little arrow. Okay. So this came in on middle three. 409 00:33:52,680 --> 00:33:59,300 So now it Vs down. So now we undo that. And now we look. And then again it Vs down very 410 00:33:59,300 --> 00:34:06,320 shortly after. And then, boom, in it goes. And then, you know, we have this weird looking 411 00:34:06,320 --> 00:34:13,060 gate here. And so as I said before, the images don't lie. So metal one, as you can see here, 412 00:34:13,260 --> 00:34:19,340 and the poly, we can see clearly that this is an exclusive OR. So it's ‑‑ I'm not 413 00:34:19,340 --> 00:34:22,660 going to get into how you make an XOR and an AND and an AND, but there's many, many 414 00:34:22,680 --> 00:34:29,160 of you in here, it sounds like, that know ‑‑ that understand this. So ‑‑ does anybody 415 00:34:29,160 --> 00:34:40,880 have questions? Okay. So the output of XOR one feeds into what I call XOR two. These 416 00:34:40,880 --> 00:34:45,860 both of XOR one and XOR two could be turned off if they wanted to. ST could turn it off 417 00:34:45,860 --> 00:34:50,360 depending on what's going on in the system. I don't know why they would, but they could 418 00:34:50,360 --> 00:34:51,060 in theory. 419 00:34:51,240 --> 00:34:51,680 Okay. 420 00:34:53,280 --> 00:34:58,180 Maybe in the factory they don't want to scramble that main central core. Or maybe 421 00:34:58,180 --> 00:35:01,700 when certain operations are happening to the crypto unit or something, maybe it's turned 422 00:35:01,700 --> 00:35:05,840 off for there. I'll be able to answer these ‑‑ I'll actually blog about this in a few weeks 423 00:35:05,840 --> 00:35:11,400 once I finish these tests. I have found the instruction registers, though, which is even 424 00:35:11,400 --> 00:35:20,420 more important. So I can probe later. So the output of XOR two came over and it plugged 425 00:35:21,260 --> 00:35:22,000 into ‑‑ 426 00:35:24,880 --> 00:35:31,520 into this here. I have it labeled number four, where my mouse is, this box. And I 427 00:35:31,520 --> 00:35:37,420 can turn the boxes off, but I think they actually help. Is it easier with the boxes 428 00:35:37,420 --> 00:35:41,920 lit up or with them off? Okay. I'll leave them on. 429 00:35:44,960 --> 00:35:47,760 So when we shrink down ‑‑ actually, I'll turn them off, because you can't see now. 430 00:35:49,300 --> 00:35:51,980 So the decrypted value ‑‑ with the ‑‑ with the decrypted value, the decrypted value, 431 00:35:52,000 --> 00:35:55,920 the decrypted again feeds into this tristate that I labeled number four. And I don't know 432 00:35:55,920 --> 00:35:59,300 if this is truly bit four or not, but I have to label them. I've got to label them in some 433 00:35:59,300 --> 00:36:05,720 order that I can tell the difference for now. And then here's that game I was talking 434 00:36:05,720 --> 00:36:12,000 about. So look at the plate on number four right here. Number four's plate, it's getting 435 00:36:12,000 --> 00:36:17,720 a little fuzzy. I'm too zoomed in. But you can see there was a via where my mouse is 436 00:36:17,720 --> 00:36:21,400 here that went up. And then there was a via here. 437 00:36:22,000 --> 00:36:28,000 And then it went down. And so if we follow this blue wire right here, and I don't want 438 00:36:28,000 --> 00:36:31,860 to turn the layers on and off, because it gets confusing to everybody, but the blue 439 00:36:31,860 --> 00:36:38,240 wire is following where the routing had gone. And then, boom, look at that. It connects 440 00:36:38,240 --> 00:36:43,720 into another one. So this is what I was saying before. Now you've seen two different tristatable 441 00:36:43,720 --> 00:36:48,680 output drivers for bit four, my pseudo bit four, to be determined. 442 00:36:50,880 --> 00:36:51,980 I found 14. I found 14. I found 14. I found 14. I found 14. I found 14. I found 14. I found 443 00:36:51,980 --> 00:36:56,760 14. I found 14. I found 14. I found 14. And again, it via'd. It via'd right to the 444 00:36:56,760 --> 00:37:02,340 right where my point and where my hand is. There's another via right there. So that tristate 445 00:37:02,340 --> 00:37:08,820 keeps going. It's really a strange idea. The ST23 is still following this procedure in 446 00:37:08,820 --> 00:37:20,420 a 90 nanometer shrink. And the ST19WP is doing the same things. So you can see here's 447 00:37:20,420 --> 00:37:21,100 eight more. 448 00:37:21,100 --> 00:37:29,840 more. So here's, you know, 2, 4, 6, 8. And then I change the color and this is coming 449 00:37:29,840 --> 00:37:33,700 from EEPROM. The EEPROM comes down and it gets latched into these next set of red boxes. 450 00:37:34,380 --> 00:37:38,460 And they're all happily coupled together, you know, tri-statable. Only ones ever on, 451 00:37:38,500 --> 00:37:44,740 of course. The NANDs can ‑‑ so when the NANDs turn off the ‑‑ or the ANs ‑‑ 452 00:37:44,740 --> 00:37:49,100 the ANs are NANDs. I forget which one they were. But when they ‑‑ in order to turn 453 00:37:49,100 --> 00:37:53,420 off the XOR, they basically output zero. And then, you know, one XOR zero is a one. 454 00:37:53,580 --> 00:37:59,020 So you know that XOR gate and you simply make a propagation delay. 455 00:38:00,960 --> 00:38:07,760 So following these lines led me over here to these beautiful blue boxes. These beautiful 456 00:38:07,760 --> 00:38:13,160 blue blocks ‑‑ blue boxes, there's only two spots in this whole chip, just stepping 457 00:38:13,160 --> 00:38:17,780 back for a second, that were ‑‑ where these lines went to inputs. Every other place 458 00:38:17,780 --> 00:38:19,080 these lines went to were tri‑statable. 459 00:38:19,100 --> 00:38:26,460 So out of 16 places I traced it to, two were inputs and one ‑‑ and 14 were output ‑‑ 460 00:38:26,460 --> 00:38:31,600 were only output, you know, capable. So this is ‑‑ you know, because this is a unidirectional 461 00:38:31,600 --> 00:38:36,740 bus. This is basically the TX side, let's say, and the RX side, I don't care about it. 462 00:38:36,860 --> 00:38:40,540 Because, you know, I want to care about change ‑‑ latching an instruction into the CPU 463 00:38:40,540 --> 00:38:45,180 core and making it walk through time forever. Will I listen with my needles? 464 00:38:45,540 --> 00:38:49,020 So this is the only side that could possibly be the 465 00:38:49,020 --> 00:38:55,040 instruction registers. We have 24 flip flops. They're daisy chained, you know, eight that 466 00:38:55,040 --> 00:38:59,340 can feed again into eight that can feed again into eight, which makes sense, because anybody 467 00:38:59,340 --> 00:39:04,960 who knows the ST 19 architecture knows that there are three levels of instructions. There's 468 00:39:04,960 --> 00:39:11,980 a few instructions that are three op codes long to dispatch like another set of 256 possibly. 469 00:39:12,440 --> 00:39:17,320 And so this would make perfect sense of why it should be the instruction register. Also, 470 00:39:19,060 --> 00:39:24,000 these are sets of eight flip flops that are all the same type of flip flop. They're not 471 00:39:24,000 --> 00:39:29,120 different types of flip flops. The other set ‑‑ the other input, they didn't all go to the 472 00:39:29,120 --> 00:39:33,040 same kind of flip flops and they didn't all go to flip flops, actually. So that would 473 00:39:33,040 --> 00:39:36,580 make more sense to me that that would be where the operand is being latched ‑‑ not latched, 474 00:39:36,700 --> 00:39:41,460 but being looked at and analyzed, potentially latched. It just depends how they interpret. 475 00:39:43,800 --> 00:39:48,520 Is everybody lost? You're here, I see. 476 00:39:49,220 --> 00:39:55,720 Anybody have any questions? No? I have nine minutes. 477 00:39:57,940 --> 00:40:02,780 Okay. Sorry? How many other chips have you looked at? 478 00:40:04,060 --> 00:40:12,700 Oh, I've looked at everybody. Renaissance, ST, Infineon, Atmel, I have some cool pictures 479 00:40:12,700 --> 00:40:19,000 from Atmel. They just happen to be on my desktop. Atmel, another company that's lost, they've 480 00:40:20,080 --> 00:40:23,660 Atmel likes to use a specific kind of flip-flop for their instruction registers. 481 00:40:24,600 --> 00:40:29,100 But here's an Atmel, this is a secure VR from an Atmel, it's an older one. 482 00:40:29,240 --> 00:40:30,840 I was going to use it as a training tool. 483 00:40:31,360 --> 00:40:33,720 So it's a 350 nanometer chip as well. 484 00:40:33,940 --> 00:40:38,420 And so you can see it polishes very nicely. 485 00:40:39,820 --> 00:40:46,540 So I can see here's a flip-flop and you can even see like this, here's a clock to a flip-flop. 486 00:40:46,780 --> 00:40:48,120 It's chained to this flip-flop. 487 00:40:48,120 --> 00:40:49,820 I have no idea what area this is. 488 00:40:49,960 --> 00:40:53,260 These were random tiles that I pulled to show somebody. 489 00:40:55,760 --> 00:40:58,960 But I also have the Atmel stuff polished, overlaid, same thing. 490 00:40:59,100 --> 00:41:01,500 It's always the same thing no matter who the manufacturer is. 491 00:41:01,820 --> 00:41:03,060 And that's what I was trying to explain before. 492 00:41:03,380 --> 00:41:07,160 It looks like, you know, ooh, it looks real scary, you know, when you look at it from 493 00:41:07,160 --> 00:41:07,560 a distance. 494 00:41:07,760 --> 00:41:12,820 But once you really get in close, polish it down, take all your images, you start to 495 00:41:12,820 --> 00:41:14,320 realize there's not much to it. 496 00:41:14,540 --> 00:41:15,820 Like look at there. 497 00:41:15,960 --> 00:41:16,800 Follow your output. 498 00:41:16,920 --> 00:41:17,540 Follow your ROM. 499 00:41:17,540 --> 00:41:20,960 Or this Atmel here, for example, it only has flash. 500 00:41:22,040 --> 00:41:23,820 So follow your flash data bus outputs. 501 00:41:24,100 --> 00:41:28,620 What you'll find is it goes through some combinatorial logic and then it latches into a flip-flop. 502 00:41:29,800 --> 00:41:35,980 You cannot latch something into a flip-flop to like hold it for being decrypted and then 503 00:41:37,020 --> 00:41:37,720 latch again. 504 00:41:37,980 --> 00:41:39,440 Because now you've created a two-clock penalty. 505 00:41:39,680 --> 00:41:42,980 So that means that the CPU would be crawling on its knees to execute. 506 00:41:43,340 --> 00:41:47,140 So you know, from the output stage of the ROM or the flash, wherever it boots from, 507 00:41:47,140 --> 00:41:51,420 it's going to trickle through some combinatorial logic, propagate down, and then the first 508 00:41:51,420 --> 00:41:56,500 flip-flop you hit, it's either a key holding register of something for maybe like a cipher 509 00:41:56,500 --> 00:42:01,940 feedback chaining or like a cipher block chaining type thing, or it's the instruction register. 510 00:42:02,280 --> 00:42:04,040 But it cannot be anything else. 511 00:42:04,880 --> 00:42:07,060 And then you have the fun part of figuring out the order. 512 00:42:07,540 --> 00:42:10,080 That's always ‑‑ on Atmel AVRs, there's 16 bits. 513 00:42:10,220 --> 00:42:10,840 It's a pain in the butt. 514 00:42:12,520 --> 00:42:13,700 Anybody else have questions? 515 00:42:15,060 --> 00:42:15,500 Yes. 516 00:42:15,760 --> 00:42:16,180 AUDIENCE MEMBER 2. 517 00:42:16,180 --> 00:42:18,680 Do you think that XR2 is in place? 518 00:42:19,020 --> 00:42:19,460 No. 519 00:42:19,580 --> 00:42:19,800 No. 520 00:42:19,860 --> 00:42:21,580 But that is why I believe XR2 is in place. 521 00:42:21,800 --> 00:42:24,760 There are more things I could have shown you on that layout that I just had open. 522 00:42:25,300 --> 00:42:29,020 Because they do some wild things with what I call XR3 and XR4. 523 00:42:29,340 --> 00:42:32,280 And they have the same key bit material coming into them. 524 00:42:32,420 --> 00:42:34,780 And they're individually selectable to be turned off. 525 00:42:34,980 --> 00:42:36,940 And I believe that that's for DPA. 526 00:42:37,580 --> 00:42:41,860 So that main common bus is ‑‑ every reset, it's randomized. 527 00:42:43,900 --> 00:42:44,340 Yes. 528 00:42:45,720 --> 00:42:46,160 AUDIENCE MEMBER 3. 529 00:42:49,140 --> 00:42:49,540 Do you have a question? 530 00:42:49,540 --> 00:42:50,480 The Infineon TPMs? 531 00:42:50,620 --> 00:42:50,700 Yes. 532 00:42:51,440 --> 00:42:51,840 AUDIENCE MEMBER 4. 533 00:42:51,840 --> 00:42:52,140 Can you repeat the question? 534 00:42:53,080 --> 00:42:53,880 Oh, okay. 535 00:42:53,960 --> 00:42:54,340 Thank you. 536 00:42:54,520 --> 00:42:57,760 He asked if I've successfully recovered the key material from this particular chip. 537 00:42:57,920 --> 00:43:02,080 Not ‑‑ I've successfully recovered the Infineon TPMs, which was much stronger than 538 00:43:02,080 --> 00:43:02,400 this one. 539 00:43:02,620 --> 00:43:03,940 I'm not finished with this work. 540 00:43:04,180 --> 00:43:05,920 So this is ‑‑ that's why I said it's a look into it. 541 00:43:05,980 --> 00:43:10,120 I'm still ‑‑ it's ‑‑ I'm probably three months if I keep it as a hobby project 542 00:43:10,120 --> 00:43:12,500 to actually put needles on the WP. 543 00:43:13,800 --> 00:43:14,200 AUDIENCE MEMBER 5. 544 00:43:15,060 --> 00:43:20,480 To get ‑‑ to get to the ‑‑ so to follow the ROM, to get into that, where I 545 00:43:20,480 --> 00:43:22,400 showed you those tristates, it took an hour and a half. 546 00:43:22,960 --> 00:43:23,680 Yes, sir. 547 00:43:24,040 --> 00:43:24,660 AUDIENCE MEMBER 6. 548 00:43:24,680 --> 00:43:25,320 Can you hear me? 549 00:43:26,760 --> 00:43:27,160 AUDIENCE MEMBER 7. 550 00:43:27,560 --> 00:43:28,580 I can't hear you, sir. 551 00:43:28,900 --> 00:43:28,960 AUDIENCE MEMBER 8. 552 00:43:28,960 --> 00:43:30,300 Is there any special software? 553 00:43:30,760 --> 00:43:30,800 AUDIENCE MEMBER 9. 554 00:43:31,620 --> 00:43:32,020 No. 555 00:43:32,160 --> 00:43:36,160 I've wrote some tools on my own, and I use Panaview image assembler to stitch my images 556 00:43:36,160 --> 00:43:36,480 together. 557 00:43:36,780 --> 00:43:38,320 He asked me if there's any special software. 558 00:43:38,500 --> 00:43:39,080 I'm sorry. 559 00:43:39,300 --> 00:43:43,280 The only special software really is my probing board that I stimulate the chips with. 560 00:43:43,280 --> 00:43:46,160 It's an FPGA‑based design, and it's all my custom logic. 561 00:43:46,940 --> 00:43:47,580 Anyone else? 562 00:43:48,480 --> 00:43:48,700 Yes. 563 00:43:49,000 --> 00:43:49,060 AUDIENCE MEMBER 7. 564 00:43:49,060 --> 00:43:51,640 Ultimately, what will be a time for our work team? 565 00:43:51,980 --> 00:43:52,060 AUDIENCE MEMBER 8. 566 00:43:52,780 --> 00:43:55,740 This TPM, if I really worked on it, I could have it finished in about two weeks. 567 00:43:56,140 --> 00:43:56,580 If it was ‑‑ AUDIENCE MEMBER 9. 568 00:43:56,580 --> 00:43:58,680 Give it a ‑‑ give it a ‑‑ . 569 00:43:58,680 --> 00:43:59,200 AUDIENCE MEMBER 10. 570 00:44:00,740 --> 00:44:01,980 I can barely ‑‑ AUDIENCE MEMBER 11. 571 00:44:01,980 --> 00:44:02,820 Can you finish this attack? 572 00:44:03,160 --> 00:44:04,840 Can someone give me a new TPM? 573 00:44:05,420 --> 00:44:05,820 AUDIENCE MEMBER 12. 574 00:44:05,820 --> 00:44:06,200 Okay. 575 00:44:06,820 --> 00:44:12,040 So the ‑‑ so once I'm finished and I've extracted an image, which is the eProm area 576 00:44:12,040 --> 00:44:13,260 of a particular chip. 577 00:44:13,280 --> 00:44:18,040 The gentleman wants to know how much ‑‑ what's the time to do another one, to kind 578 00:44:18,040 --> 00:44:18,720 of repeat the process. 579 00:44:19,300 --> 00:44:22,000 On the Infineon chips, it took me six hours. 580 00:44:22,340 --> 00:44:26,480 On the ST, it would be significantly less because of their mesh concept. 581 00:44:27,320 --> 00:44:29,700 Their shielding is the weakest in the market. 582 00:44:30,000 --> 00:44:33,360 Then it's even worse on their newest ‑‑ their 90 nanometer stuff is even worse. 583 00:44:33,600 --> 00:44:39,220 They have a one micrometer spacing on their new stuff between mesh tracks, which is absurd. 584 00:44:39,480 --> 00:44:43,260 I mean, I can put ‑‑ I love Millen 40 by .4. 585 00:44:43,280 --> 00:44:44,720 By .4 holes, and that's large. 586 00:44:45,220 --> 00:44:49,120 And so one micron space is ‑‑ it's sad. 587 00:44:49,420 --> 00:44:53,280 But remember, the fingers, I can turn off the finger, and it's dead metal, and then 588 00:44:53,280 --> 00:44:56,100 I can use it as ‑‑ I can actually use it as a conductor if I wanted to. 589 00:44:56,280 --> 00:44:58,220 Or I can mill it completely away. 590 00:44:58,640 --> 00:45:04,660 And the mesh main active mesh signal, I just have to mill down to VDD and then strap it, 591 00:45:04,740 --> 00:45:05,520 and then I can cut it. 592 00:45:06,300 --> 00:45:08,820 I also ‑‑ I can do selective wet etching on the ST chips. 593 00:45:09,000 --> 00:45:10,160 I can't do that on the Infineons. 594 00:45:10,760 --> 00:45:11,700 Selective wet etching. 595 00:45:11,700 --> 00:45:16,860 You can see my video from Wired where I use nail polish to make a mask, and then I use 596 00:45:16,860 --> 00:45:19,220 hydrofluoric acid, very selective time detches. 597 00:45:19,460 --> 00:45:23,640 So the ST chip would be maybe an hour and a half prep and then put needles on it. 598 00:45:24,440 --> 00:45:25,180 Anyone else? 599 00:45:26,480 --> 00:45:26,920 Yes. 600 00:45:27,460 --> 00:45:29,400 The layout of the chip was very standard. 601 00:45:29,780 --> 00:45:30,200 Sorry? 602 00:45:30,860 --> 00:45:32,520 The layout of the chip was very standard. 603 00:45:32,700 --> 00:45:35,200 The layout of the chip was very standard, yes. 604 00:45:35,320 --> 00:45:36,720 And it almost always ‑‑ . 605 00:45:46,560 --> 00:45:50,880 It would have been harder, but it's not that hard to identify where the actual core 606 00:45:50,880 --> 00:45:51,060 is. 607 00:45:51,180 --> 00:45:57,140 Because there's so many crypto blocks inside, and you see a lot of register logic, a lot 608 00:45:57,140 --> 00:45:59,820 of chain register logic and shift networks and stuff like this. 609 00:46:00,040 --> 00:46:05,540 So if you isolate all of that out of the picture, which is what I did on that one Photoshop 610 00:46:05,540 --> 00:46:08,720 image that you saw, it's pretty much game over. 611 00:46:08,860 --> 00:46:10,340 You can start line tracing and things. 612 00:46:10,340 --> 00:46:16,200 It's more of how ‑‑ the smaller you are and the more layers you have, the harder 613 00:46:16,200 --> 00:46:17,060 you would make my life. 614 00:46:17,880 --> 00:46:18,700 In a nutshell. 615 00:46:19,100 --> 00:46:19,500 Yes? 616 00:46:20,900 --> 00:46:21,340 . 617 00:46:28,760 --> 00:46:33,480 There are a lot of things they could have done to make ‑‑ to obfuscate the surface 618 00:46:33,480 --> 00:46:37,120 and make it a little bit harder, but they didn't do it, and I'm not going to voluntarily 619 00:46:37,120 --> 00:46:40,020 give them, you know, ways of slowing me down. 620 00:46:40,020 --> 00:46:40,580 Yes? 621 00:46:41,800 --> 00:46:42,280 . 622 00:46:43,400 --> 00:46:44,360 45 nanometer. 623 00:46:45,660 --> 00:46:46,140 Yes? 624 00:46:47,220 --> 00:46:47,700 . 625 00:46:49,360 --> 00:46:52,840 Once I've done my ‑‑ I have over 400 samples of this chip. 626 00:46:53,020 --> 00:46:55,980 They were, like, 20 cents on Hong Kong inventory surplus. 627 00:46:56,940 --> 00:47:02,360 So once I burn through whatever I need to do my initial analysis, my success rate is 628 00:47:02,360 --> 00:47:02,980 going to be 100%. 629 00:47:02,980 --> 00:47:07,240 Unless something catastrophic happened, like I wasn't, I wasn't eucentrically level in 630 00:47:07,240 --> 00:47:09,960 the fib and I stick the needle in and it's, oops, it wasn't. 631 00:47:09,960 --> 00:47:12,820 It wasn't 100 microns above the surface and I scratch it. 632 00:47:13,020 --> 00:47:14,560 Otherwise it's almost zero risk. 633 00:47:14,740 --> 00:47:19,120 Because remember, if I break ‑‑ if I damage it in any way, it would be like maybe I sever 634 00:47:19,120 --> 00:47:19,960 a track with my needle. 635 00:47:20,220 --> 00:47:25,700 But on the ST chip, I can drop platinum everywhere because of its ‑‑ the mesh is inferior 636 00:47:25,700 --> 00:47:28,100 to most of the stuff I'm up against today. 637 00:47:29,640 --> 00:47:30,880 One more question, please? 638 00:47:31,020 --> 00:47:31,400 Anybody? 639 00:47:32,800 --> 00:47:33,200 No? 640 00:47:33,940 --> 00:47:34,340 Okay. 641 00:47:34,440 --> 00:47:35,160 Thank you very much. 642 00:47:40,600 --> 00:47:41,180 . 643 00:47:41,180 --> 00:47:41,900 Thank you very much. 644 00:47:42,260 --> 00:47:42,280 . 645 00:47:42,940 --> 00:47:43,560 Thank you. 646 00:47:43,780 --> 00:47:44,320 .