00:00:00.000,00:00:05.005 >>Does anybody have any idea what this talk is about? [applause] Or how important it 00:00:11.612,00:00:16.617 is? This is, this in my opinion is the real important work, um, so normally I would just give 00:00:25.225,00:00:30.230 you the boilerplate, but, you know what, ill do it anyway. So the emergency exits are all 00:00:32.833,00:00:37.838 around you. The normal entrance is where you came in, and the normal exit is directly behind 00:00:40.007,00:00:45.012 you because everything you wanna do it directly behind you. There is nothing that way. There is a 00:00:48.315,00:00:53.320 talk that way, but you gotta get in line for it, and that's hot. Ya the outside is that way. You 00:00:56.156,00:01:01.094 don't wanna go that way. Um. so. I think im, ya, my time is quickly closing. I'm gonna just 00:01:04.798,00:01:09.803 go ahead and hand it over to Fart to blow your minds. [applause] >>thank you folks, I 00:01:14.942,00:01:19.947 don't know about any mind blowing, but um hopefully I will freak a few people out. Uh, I've 00:01:22.482,00:01:27.187 lost some business, so hopefully ill get some business back. [chuckle] [audience comment 00:01:27.187,00:01:31.458 about microphone] Ya? Better? Yes! Ok, I can hear myself. Uhh, so ok, I get told these kind of 00:01:31.458,00:01:36.463 uh, im obligated to tell you who I am and what I do. Umm, I hack stuff for IOActive. Uhh, I don't 00:01:39.166,00:01:42.903 really know how to categorize what I do, I just kind of find weird stuff, play with it, try 00:01:42.903,00:01:47.908 to find where the relevance is in some piece of um what we do for business. Umm. I'm not 00:01:50.277,00:01:54.481 really good at uh, sort of being the professional security guy, but, as it says, I know how the 00:01:54.481,00:01:59.987 pixies flow. um, I tend to be pretty good at uh ahh, looking at the security interface, the 00:01:59.987,00:02:04.958 physical security interface for embedded systems when it comes to how electricity, electrons, 00:02:04.958,00:02:09.062 noise, RF and stuff like that get used, uhh, and most importantly, im not interested 00:02:09.062,00:02:14.568 in hacking one thing, if im going to hack some stuff, I wanna hack all the things. Umm, 00:02:14.568,00:02:17.971 so this means I don't wanna just find a buffer overflow in something, I want to find an 00:02:17.971,00:02:23.377 unpatchable, unfixable buffer overflow that no one can do anything about. And if I can, 00:02:23.377,00:02:29.449 write my name on it. Umm. anyway, also, uhh, as it says, im a local or an amatuer lock 00:02:29.449,00:02:34.521 picker. I'm not very good. Uhh, I have tried cracking safes and things like that I cnat really 00:02:34.521,00:02:38.992 crack safes the old fashion, like listening with a stethoscope kind of way. Umm, 00:02:38.992,00:02:44.831 but I thought this would be a really fun way to put my stamp on lock picking. Uhh, so without 00:02:44.831,00:02:48.402 getting sort of too into the weeds, uh, we are going to talk about some of the previous high 00:02:48.402,00:02:53.106 security lock design, and really how similar they are, and why the attack ive been working on 00:02:53.106,00:02:58.879 is kind of a systemic flaw in pretty much every lock design by KABA uh, and they exist in many 00:02:58.879,00:03:05.385 other designs. uhh, were gonna talk about how the locks kind of evolved from sort of point to 00:03:05.385,00:03:09.456 point and sort of look at the security boundary as far as electrons go. Umm, i'm gonna 00:03:09.456,00:03:13.660 have some schematics, they're not really schematics, they may look like schematics, they are 00:03:13.660,00:03:17.831 block diagrams. Uh, they're really just to kind of talk about where that security 00:03:17.831,00:03:22.269 boundary is between locks. Uh, and of course im gonna whine about secure disclosure a bit, 00:03:22.269,00:03:27.274 because uh everybody is whining at me about it. So, for these locks, uh the most important 00:03:30.710,00:03:34.748 things to know are kinda these bullet points. Were trying to make an electronic lock. A thing 00:03:34.748,00:03:39.219 that's exactly like the old lock, that replaces the old one exactly, the mechanical brass 00:03:39.219,00:03:44.024 made machine thing. But we want to replace it with electrons and pixies, because those are more 00:03:44.024,00:03:48.895 secure, they have secure in them. Um, so all the requirements we have here, they 00:03:48.895,00:03:53.800 need to be long lived. We don't want any batteries in them, umm, now that we are making them 00:03:53.800,00:03:58.205 electronically we want tiered permission schemes, multiple users, time windows, all kinds 00:03:58.205,00:04:02.709 of interesting things like that. Umm, and because of all these things these locks are gonna be 00:04:02.709,00:04:06.646 more secure, were sure of it. There's no real reason why, we've just made them electronic. 00:04:06.646,00:04:13.353 Umm, so this is your basic lock design, uhh, if you were gonna put something together with an 00:04:13.353,00:04:17.090 art, we know this is probably what you would do. Uhh you’d prob use an internal lead prong, 00:04:17.090,00:04:21.828 but whatever. You have an external lead prong, you have some place to store the 00:04:21.828,00:04:25.632 personality of the lock, the actual individual stuff. You have a microcontroller that's 00:04:25.632,00:04:29.569 gotta do the interfacing with the real world, uh, if I want to be long lived, ive gotta have 00:04:29.569,00:04:33.373 something power me externally. And you kinda see this little dotted line, I'll use that in 00:04:33.373,00:04:38.111 all my schematics, to kinda show the privilege boundary of the lock. So anything that's on the 00:04:38.111,00:04:43.316 Right hand side of that dotted line is going to be something that is available to an attacker 00:04:43.316,00:04:49.823 everything on the other side is theoretically inside the physically secure safe. okay so 00:04:49.823,00:04:53.760 we've added some security to our design we're basically doing the same thing that they didn't 00:04:53.760,00:04:58.765 smart cards where we're trying to use the power line as our communication lines so well just 00:04:58.765,00:05:03.403 well power ourselves off of that internal IO line. store that makes passenger put a diode in 00:05:03.403,00:05:10.076 there so you cant glitch me out and done, let's call it over that's what cyber lock did. umm 00:05:10.076,00:05:14.781 I'm just going to beat cyberlock over the head really quickly cuz I think it's interesting because 00:05:14.781,00:05:20.320 every single one of their door-in-door cylinders were beatable with bulshit crypto 00:05:20.320,00:05:23.390 when I did the analysis actually let me go back to that real quick, you can actually see, I 00:05:23.390,00:05:26.726 love this little quote right here, I just kinda threw in the original advisory you could 00:05:26.726,00:05:29.563 probably extract the private key through power analysis but I don't really think it's worth 00:05:29.563,00:05:35.335 the effort this is the actual power Trace that's in the report you can actually see between the 00:05:35.335,00:05:41.508 A1 and A2 markers there's kind of a little bit of a wiggle at the top of that line and that's 00:05:41.508,00:05:46.213 actually the microcontroller transferring its internal EEPROM contents into microcontroller as 00:05:46.213,00:05:51.218 lock is powered up external and that's pretty much our Target, for at least this presentation. 00:05:53.286,00:05:57.357 So, you know, we’ve seen basic parts of the minuses don't need batteries have an audit Trail 00:05:57.357,00:06:02.362 have all those special security things umm but of course we started with bulshit crypto we 00:06:02.362,00:06:06.967 started with making it reliant on external power sources like me how basically attacker 00:06:06.967,00:06:11.771 provided power and of course we made sure that they couldn't be firmware updated or anything so 00:06:11.771,00:06:14.975 once they're in the door cylinders every single door cylinder has got to be replaced. 00:06:14.975,00:06:19.980 Umm, so this is kind of a tangent, im not going to be on this too much Uhm- as a result 00:06:24.117,00:06:29.122 of the cyberlock work uh- I got one of my, I want to say first but just most recent DMCA cut 00:06:31.424,00:06:37.264 your sh** out letters and uh- I just I find it really annoying that be working at electronic 00:06:37.264,00:06:42.836 locks but this is the response that we get now when sort of you know 200 years ago the idea of 00:06:42.836,00:06:46.439 perfect security and the likelihood that a lock was going to be broken at least was 00:06:46.439,00:06:50.777 somewhat accepted people were looking to try to figure out where the reality of that lock 00:06:50.777,00:06:55.682 security is uh- but now it's sort of the inherit encroachment of software Security in this 00:06:55.682,00:07:00.287 area. Uh- we're starting to see the same sort of strategies from software security. Sue them 00:07:00.287,00:07:05.592 threaten them claim it's not a problem.Uhm- I'm okay with claim it's not a problem but sue them, 00:07:05.592,00:07:11.097 threaten them, [sigh] then claim that they've they've violated some sort of code of ethics by 00:07:11.097,00:07:16.469 not going to the government first.Uhm- which we did uhm- you know that kind of stuff is 00:07:16.469,00:07:19.739 really starting to get annoying that's my quick tangent on that we-we- will put a pin in that 00:07:19.739,00:07:24.210 and get back to that [laugh] there's another lot design that you start saying it's a pretty 00:07:24.210,00:07:29.382 common one this is your your standard home safe, uhm, this is the kind of the thing that you 00:07:29.382,00:07:34.120 might have in your hotel room in fact. Ahm, these locks have actually been pretty thoroughly 00:07:34.120,00:07:38.491 beaten any time you have any sort of external power source you just threw together some 00:07:38.491,00:07:42.495 really shity code you're going to introduce timing flaws your gonna introduce some interesting 00:07:42.495,00:07:47.267 power analysis and uhm- I think both of these guys did, guys did some some really good job if Pur 00:07:47.267,00:07:52.005 is out there I owe him a beer somewhere if Dave is out there like probably owe you a beer 00:07:52.005,00:07:58.445 whatever Australians drink. Uhm- I know it's terrible. Uh- [laughs] but this lock design is 00:07:58.445,00:08:02.816 pretty obvious, right? We have the battery on the outside we know that we can measure current 00:08:02.816,00:08:07.620 flow from the battery if you're going to steal pixies of course I can measure current flow from 00:08:07.620,00:08:13.293 you give me a ground of course I can reference myself to your internal circuit. And you know 00:08:13.293,00:08:15.962 we-we’ve kinda learned that these kind of designs are cheap.They, they're really easy 00:08:15.962,00:08:19.532 to crank out there you don't have to have software experts you just throw it together 00:08:19.532,00:08:23.670 really quick but it's still reliant on external power and then introduced these at least 00:08:23.670,00:08:27.640 two side channels in this new design. I don’t believe either of these lock designs have done 00:08:27.640,00:08:32.645 really anything to update that [laughs]. So, okay, what, what are we doing with these kinds of 00:08:35.148,00:08:38.418 locks in other places and this is where I get to my other quick tangent of things that I really 00:08:38.418,00:08:43.423 enjoy working on, the ATM. Uhm- It turns out that ATMs also use combination safes and uh- here’s 00:08:46.659,00:08:51.264 a here’s another guy I owe a beer too. Uhm- I really love this video. If you wanna go look 00:08:51.264,00:08:55.101 it up online,It’s the greatest thing ever. He basically spent a full minute talking about how in 00:08:55.101,00:08:59.539 the old days attackers would try to go through the safe door to steal the money makes sense to 00:08:59.539,00:09:03.877 go to straight through just to get that money. Uhm- but then goes on and explain how malware 00:09:03.877,00:09:08.381 seems like a much more reasonable way to steal money these days. Uhm- I kinda figured 00:09:08.381,00:09:12.419 what- why not. Let’s look at that lock. This thing is everywhere. And I get some work 00:09:12.419,00:09:17.056 from a customer and it turned out their ATM lab, had every single ATM had one of these 00:09:17.056,00:09:22.061 locks on it. It didn't know how ubiquitous they were until I started looking. So it turns out 00:09:24.631,00:09:29.069 this lock design is kind of full we have uh- you can really tell the difference between here 00:09:29.069,00:09:32.572 between the gen one or gen two but we have basically two different versions of this end 00:09:32.572,00:09:37.444 con, we have an audit con, and we got all this banking stuff he's a little little tiny uh- 00:09:37.444,00:09:41.381 ibutton devices that- look at it, just looks like security, it looks super official, it got 00:09:41.381,00:09:47.287 easier ibutton everything to get in. Its two part authentication. And this is more or less you are 00:09:47.287,00:09:53.359 looking a schematics wise it’s- its actually pretty interesting. Uhm- just to kind to go over, 00:09:53.359,00:09:57.897 really quick and dirty what the- the interesting bits are, um- we’ve got a self generating 00:09:57.897,00:10:01.935 power. Sp there’s no power now, external to the safe they’re just bringing power in by 00:10:01.935,00:10:06.940 generating it with this little knob, this is my terrible drawing there uh the knob 00:10:06.940,00:10:11.010 generates power internally when the lock has enough power it’ll boot up and happily display 00:10:11.010,00:10:16.816 things on the LCD and you can input the code and do things with it um but I can’t directly 00:10:16.816,00:10:20.487 measure the current flow here right? The battery’s on the inside, how do I how do I even 00:10:20.487,00:10:26.092 look at this? But it turns out if you take the same approach, so here’s the uh the AuditCon, 00:10:26.092,00:10:30.897 not too different, uh if you take the same approach and look at both of these um you know 00:10:30.897,00:10:35.235 power and ground lines you can more or less see a stable voltage but if you AC uh bias 00:10:35.235,00:10:40.740 that signal and take a look at the very tiny wiggles at the very top that signal and amplify 00:10:40.740,00:10:45.812 the f**k out of them um you end up getting that same side channel back even though you’re 00:10:45.812,00:10:49.549 not drawing power from these insides as it turns out that having power drawn from the 00:10:49.549,00:10:54.554 outside of the safe is enough to kind of make that current flow variation work out. Uh just 00:10:56.656,00:11:01.060 skipping over those real quick uh these are kind of the insides of the safe just so you can kind 00:11:01.060,00:11:05.031 of get an idea of mechanically what they are uh there’s nothing too interesting going on with 00:11:05.031,00:11:10.103 them, here’s the S2000 we’ll do a proof of concept on uh the AuditCon is very similar the 00:11:10.103,00:11:13.840 Generation 2 you can basically they’re they’re almost clones except for some new features 00:11:13.840,00:11:18.411 have been added. Um but you’re looking at an 851 microcontroller in the case of 00:11:18.411,00:11:24.317 the AuditCon and the S2000 they don’t even have the room for crypto in these things. Uh the 00:11:24.317,00:11:29.923 Generation 2 is an MSP430 and we’ll, we’ll talk about that a little bit uh but digging 00:11:29.923,00:11:32.792 through the patents for these locks you can kind of see they didn’t really have an idea of 00:11:32.792,00:11:37.330 what security really meant when you’re trying to deal with these internal EEPROMs, they basically 00:11:37.330,00:11:42.335 talk about trying to mix and hide bits um uh you could probably extract all of the 00:11:46.172,00:11:51.010 information necessary for doing something like the banking modes by looking through the patents 00:11:51.010,00:11:55.715 but ultimately you’re dealing with anding, oring, exclusive oring, nothing too fancy to 00:11:55.715,00:12:00.653 generate a combination from the internal authentication data. Um this is a basically what you’re 00:12:03.556,00:12:07.794 looking at internal so in this case we’re talking about the S2000 lock uh we’re getting a 00:12:07.794,00:12:11.898 little bit into the actual attack that I’m gonna show a proof of concept for and this is 00:12:11.898,00:12:17.971 fairly consistent along a lot of the locks um. You have the parts of the EEPROM that the lock 00:12:17.971,00:12:23.376 would read as it’s trying to read it’s uh identity uh you can see the second hex line, the ox 00:12:23.376,00:12:28.381 two hundred address starts with value 2 um in the first case so that’s a shelving mode block and 00:12:30.550,00:12:35.788 the other one below it is 05 that’s a bank mode lock um but basically these 3 authentication 00:12:35.788,00:12:40.193 fields are all that make it up, it doesn’t re- everybody sort of focuses on the fact that I am 00:12:40.193,00:12:45.865 working on the simplest version of uh the lock configuration but regardless of the lock 00:12:45.865,00:12:49.936 configuration it still has to read these same EEPROM contents and these same EEPROM contents 00:12:49.936,00:12:54.307 provide everything necessary for generating combination regardless of the mode uh it 00:12:54.307,00:12:59.646 might just be that as you can see here an ibotton is required to identify itself to the lock, 00:12:59.646,00:13:03.082 you will need to figure out what that ibutton number is, which is also stored in the external 00:13:03.082,00:13:08.921 EEPROM uh and you’d have to emulate with uh arduino library uh it’s pretty straight forward. 00:13:08.921,00:13:13.926 But as far as getting the power out okay er er or as getting the actual data out this is pretty 00:13:16.329,00:13:20.266 much what we’re looking at, this is the actual side channel, or at least one version of the side 00:13:20.266,00:13:25.638 channel, that we’re looking at um along with the actual data that it represents um when we 00:13:25.638,00:13:29.042 first looked at the lock, I thought I had this thing beat because we’re looking at the 00:13:29.042,00:13:34.814 soft I2C section, you just look at the first few bytes of that transfer. In this particular 00:13:34.814,00:13:40.119 side channel because it’s I2- soft I2C the edges between the clock and the data line are not 00:13:40.119,00:13:44.490 perfectly aligned so the timing signature between them is slightly offset and then your 00:13:44.490,00:13:49.195 data looks as though it's been manchester coded, if you see three blips, you go transfers 00:13:49.195,00:13:55.635 from a 0 to a 1, if you see another three blips, you go transfers from a 1 to a 0 um and 00:13:55.635,00:13:58.671 uh you dig a little bit further and it turns out I can’t do that um that only works for the 00:13:58.671,00:14:03.042 microcontroller talking to the EEPROM [laughs] if the EEPROM’s talking back those edges are 00:14:03.042,00:14:07.513 simultaneous um but after spending a little bit of time filtering and sort of poking at 00:14:07.513,00:14:11.718 it, uh it turns out that ones are sort of preferentially leaked on those high sharp 00:14:11.718,00:14:17.256 edges. Right? You can you can sort of see in both of these there’s uh goes from a 1 to a 0 00:14:17.256,00:14:20.993 and a 0 to a 1 on that clock edge, there’s these high frequency spikes that sort of 00:14:20.993,00:14:24.163 happen, those high frequency spikes like to leak out, they’re, they’re very high 00:14:24.163,00:14:29.368 frequency, they’ve got lots of harmonics, if there’s frequency they can leak out on they will. 00:14:29.368,00:14:34.474 Uh and that’s how I wrote a first proof of concept in fact, um but because I had no faith in 00:14:34.474,00:14:40.012 that actually working on stage here uh I rewrote the proof of concept uh to work against sort 00:14:40.012,00:14:45.651 of the lower frequency data set of the side channel uh so in this case uh you can actually 00:14:45.651,00:14:49.255 line the bits of what the actual this is actually the clock track, not the data track, uh 00:14:49.255,00:14:53.726 but then you have the powered trace aligned perfectly with that clock track, can anyone 00:14:53.726,00:14:59.432 tell me which ones are ones? Right? Right. Can you pick that out ba- by hand um so I think 00:14:59.432,00:15:04.303 that’s basically where I’ll get to my proof of concept real quick uh just to prove that I 00:15:04.303,00:15:08.074 can actually do that automatically but I don’t think anybody should really focus on 00:15:08.074,00:15:13.212 the idea that I can do it with an automated script since this is basically what it looks like 00:15:13.212,00:15:19.285 if you spent the time to align the traces, you can extract that signal by hand. So let’s let’s 00:15:19.285,00:15:24.290 see if we can pull this off by hand first uh, you’re not gonna play okay. So just so you can 00:15:29.829,00:15:34.600 see uh this is my S2000 here, I don’t really have anything going on except uh salesscope pro 00:15:34.600,00:15:39.605 jammed in the data port. Uh the actual ibutton port and if everything goes well uh I’m 00:15:41.641,00:15:47.747 gonna hit uh a single just to get a single trace uh may have to boot the sc- uh boot the lock 00:15:47.747,00:15:52.752 a couple of times, but we’ll just get a quick power trace. [off mic mumbling] [faint 00:16:19.378,00:16:22.849 beeping] Now mine kinda looks okay. I’m I’m not sure that one will decode but let’s find out 00:16:22.849,00:16:27.854 if that one will decode, c’mon work with me here, gestures. Ignore that. [computer pings] 00:16:37.463,00:16:42.468 let’s uh quickly, of course this is not gonna go quickly. Is there lf palloc? Download from 00:16:52.511,00:16:57.884 the scope real quick, but if not I will just switch to a pre captured. Yay, salesscope 00:16:57.884,00:17:02.822 downloads [laughs] uh so once this downloads we’ll just uh run it through the low frequency poc 00:17:06.225,00:17:11.230 script uh it already knows what the alignment uh for each of the edges of the square wave should 00:17:15.635,00:17:21.240 be uh and ultimately what this is the actual proof of concept code here uh so what this guy is 00:17:21.240,00:17:26.245 actually doing is, once we’ve gone in to find where the byte offsets are from the trigger 00:17:26.245,00:17:32.818 point uh we synchronize using the high frequency data from the, the actual lock itself so 00:17:32.818,00:17:37.823 I- oh! You’re not even seeing the the download. Shoot. Let me uh, aha, so this is the actual 00:17:47.833,00:17:53.139 uh proof of concept code and I apologize didn’t know that you couldn’t see that there, I’m bad 00:17:53.139,00:17:57.710 at this. Uh so these are the actual byte offsets um we’re using the high frequency data in 00:17:57.710,00:18:02.381 the signal to actually create an alignment uh so we just filter for everything above a hundred 00:18:02.381,00:18:06.218 megahertz, we get some nice sharp spikes we use those sharp spikes to create our zero 00:18:06.218,00:18:10.523 alignment, from that zero alignment we calculate our byte offsets from each byte offset we 00:18:10.523,00:18:14.994 have a clock edge and ultimately what we’re calculating is the difference in power consumption 00:18:14.994,00:18:19.031 between the positive going clock edge and the negative going clock edge, if that rises above 00:18:19.031,00:18:25.471 a certain threshold then that’s that was a one that got transferred. Um, this looks 00:18:25.471,00:18:30.476 really dirty so we’ll- we’ll give that a try [laughs] uh ch ch ch ch ch lf poc you know what 00:18:45.024,00:18:49.028 I’m just gonna do what I want, let’s just do the capture I did earlier so that I don’t have to 00:18:49.028,00:18:54.033 have a heart attack anymore. Where is it at, where is it at, where is it at? Unfortunately it 00:19:11.651,00:19:14.954 looks like my signal was clipped out of the top a little bit and clipped out of the bottom you 00:19:14.954,00:19:18.391 might just have to do a recapture uh but this is ultimately what we get when we- 00:19:18.391,00:19:25.164 oh shoot shoot shoot shoot shoot shoot shoot I’m bringing all these little windows over here 00:19:25.164,00:19:30.269 [laughs] these are the little windows that actually decode the data, the output is actually 00:19:30.269,00:19:35.274 this guy right here. You can actually see, so this is the expected data that we would see 00:19:37.843,00:19:42.648 internally with this being the lock mode and then these three bytes actually being the 00:19:42.648,00:19:48.254 shelving mode combination and you can see we have a lock that is in fact in shelving mode with 00:19:48.254,00:19:53.793 combination 11, 22, 33 and for whatever reason it’s in hex I don’t- I don’t actually know why 00:19:53.793,00:20:00.199 um we’re also gonna miss a few bits here, let’s see if I can actually get this, yeah we 00:20:00.199,00:20:05.671 missed a bit there, you can kind of see there’s a little bit of spike of noise in our waveform. 00:20:05.671,00:20:09.108 Um but you can pretty much always see when you lose this bit in the waveform there’s 00:20:09.108,00:20:14.246 nothing too insane about uh sort of manually parsing this, the problem is creating a simple 00:20:14.246,00:20:19.218 rule for how to threshold that bit out, it’s not exactly easy, um so don’t concentrate too much 00:20:19.218,00:20:23.722 on the fact of creating an automated script for this thing uh so to maybe get back to the 00:20:23.722,00:20:29.361 slide deck a little bit um the um once once the lock is actually booted and you have 00:20:29.361,00:20:35.701 these 3 authentication fields, uh all your actual side channel attack has to do is extract what 00:20:35.701,00:20:42.208 those 3 fields are, and from that point you can calculate for any of the generation 1 locks uh 00:20:42.208,00:20:46.946 what the opening and closing cl- closing codes for those safes should be so as far as I’m 00:20:46.946,00:20:51.717 concerned any SIMCOM Generation 1 safes that are actually in deployment are basically dead, 00:20:51.717,00:20:58.290 um they’re, they’re not safe. The [laughs] let’s do this a little bit storywise, when we 00:20:58.290,00:21:02.795 reported this vulnerability to Kaba um there was a few things that happened, first we found 00:21:02.795,00:21:09.001 out that we reported them to the wrong Kaba [laughs] you’ll laugh but this is gonna be a really 00:21:09.001,00:21:14.273 funny detail, uh that guy at Kaba is like no great you did some great work we really 00:21:14.273,00:21:18.778 appreciate it um I’ll pass this off to the other team that actually works on these locks, 00:21:18.778,00:21:25.284 um he said, we only work, we only make government locks, um we make the Xo9 series uh so I 00:21:25.284,00:21:31.490 googled the Xo9 series and actually found some really interesting stuff, um uh the Xo9 00:21:31.490,00:21:35.227 series actually looks like it has a similar design to these SIMCON locks, it’s made almost 00:21:35.227,00:21:39.832 identically same- the same design pattern um we told them this, uh maybe your locks might 00:21:39.832,00:21:44.270 also be affected by this design pattern issue and he said, you don't have the authority to test 00:21:44.270,00:21:51.010 these locks! [laughter] if if you are doing any research on an X10 the feds will be after you 00:21:51.010,00:21:56.015 and whoever sold it to you! Kay uh we then went off and notified our banking customers uh and 00:21:58.984,00:22:04.423 they said immediately, well what about Generation 2? Uh, there’s a Generation 2? Don’t know 00:22:04.423,00:22:08.360 anything about it, I guess I’m gonna have to go buy some. Uh so at the same time I found out 00:22:08.360,00:22:12.831 about Generation 2 I found out about the AuditCon which is used in pharmaceuticals, uh weapon 00:22:12.831,00:22:16.135 storage, uh anything that you might want to have, sort of an audit trail for the number of 00:22:16.135,00:22:21.106 people maybe multiple people who are allowed to access that uh the AuditCon just falls to this 00:22:21.106,00:22:24.843 vulnerability, there’s a master code, the master code is directly read from the EEPROM so 00:22:24.843,00:22:28.714 there’s no banking mode or any d**king around with any sort of ibuttons or anything, you can 00:22:28.714,00:22:33.018 just put in the master code once you’ve extracted that and that guy will open. Uh Generation 2 00:22:33.018,00:22:36.388 you can actually see from the power trace, I can extract that s**t, and that’s easy, it’s 00:22:36.388,00:22:40.926 loud, it makes lots of noise, um but when I spent a little bit of time with it it turns out that 00:22:40.926,00:22:44.463 it actually does seem to try to use encryption internally to prevent you from pulling off 00:22:44.463,00:22:48.801 this attack, so either they knew that this was a possibility or they were just suspicious that 00:22:48.801,00:22:53.172 it was a possibility, um and I’m gonna put a pin in that, oh you know what, you know what, let’s 00:22:53.172,00:22:57.776 get to that [laughs] and now while I can’t totally tell you about what happened with the 00:22:57.776,00:23:02.114 Gen2 while I was getting my s**t together for this presentation, uh I decided to go and look back 00:23:02.114,00:23:06.752 through the Gen2 and rather than saying that yeah it might still be vulnerable to other side 00:23:06.752,00:23:10.122 channel attacks, power analysis or something like that, but at that point if I’ve got to do 00:23:10.122,00:23:14.760 multiple traces and I got to average traces and stuff, this is probably sufficiently secure 00:23:14.760,00:23:19.665 for what it is um but in putting it together I decided to see what would happen if I switched, 00:23:19.665,00:23:23.569 you know what, I’m not gonna say that [laughs] I decided to see what would happen if I did a 00:23:23.569,00:23:29.642 little bit more poking at locks, um and in poking at the locks I discovered um that the side 00:23:29.642,00:23:36.048 channel does open them up to uh eh um undocumented flaws [laughs] uh and if you can 00:23:36.048,00:23:39.451 trigger some of these undocumented flaws like the one that I have on the screen, you 00:23:39.451,00:23:43.122 can look as much as you want in the SIMCON documentation for the Generation 2, you wont find 00:23:43.122,00:23:49.461 that, um the locks will happily reset themselves to factory condition. Uh which means they 00:23:49.461,00:23:53.332 have a combination of 50, 25, 50, and that’s just pretty much that uh so while the Gen2 00:23:53.332,00:23:59.271 [laughter] so while the Gen2 does defend itself again- uh uh against the sort of base side 00:23:59.271,00:24:05.878 channel attack um that the the uh the Generation 1 went down to, the Generation 2 may in fact 00:24:05.878,00:24:10.649 be more vulnerable in sort of differing ways it’s it’s kind of fascinating um but you are 00:24:10.649,00:24:17.389 probably for the moment somewhat safer with a G- I don’t know what to tell you it- [laughter] 00:24:17.389,00:24:21.327 So we’re done. Let’s disclose this s**t, let’s get to DefCon, you guys would be happy with an 00:24:21.327,00:24:27.099 ATM opening vulnerability, right? Like that’d be good enough um but we kind of left 00:24:27.099,00:24:32.104 this hanging thread of the DOD locks uh so I got myself [laughs] I got myself uh an Xo7 00:24:34.807,00:24:39.812 first because they’re the oldest and cheapest and you know it’s a it’s a hard bit of a lock um uh 00:24:42.548,00:24:47.419 we’ll just we covered this. It’s a hard bit of a lock um this is gonna be a fun video in a second 00:24:47.419,00:24:53.759 um it it actually denies me a lot of the electrical grounding and electrical signaling that 00:24:53.759,00:24:56.428 the other locks sort of present because they have the keypads and things on the outside, 00:24:56.428,00:25:00.966 somebody has really sort of threat modeled uh the Xo series of locks and not only designed 00:25:00.966,00:25:04.269 them to be physically secure, but also try to make them somewhat electronically secure 00:25:04.269,00:25:07.439 and you can actually, we’ll, we’ll look at some images but they’ve kind of switched back 00:25:07.439,00:25:12.678 and forth over uh the years on different design aspects of em where the generator sits, on the 00:25:12.678,00:25:17.516 inside or the outside of the lock, external where the attacker can get it, or inside 00:25:17.516,00:25:22.287 where it’s completely RF shielded um but before I talk about the Xo series, a lot of 00:25:22.287,00:25:26.892 you guys don’t know what the Xo series is and because I’m constantly s**ting on people who 00:25:26.892,00:25:32.598 fud [laughs] I’m not gonna fud, I’m just gonna play this video which hopefully you guys can 00:25:32.598,00:25:37.603 hear the audio from now, alright. [video plays] no. audio? Somebody? [music plays] 00:25:48.781,00:25:53.786 there we go. >>KabaMas is proud to announce the newdly designed X-10, the secure tradition 00:25:57.322,00:26:03.295 continues. With nearly 1 million locks sold, the KabaMas X-0 series is the choice for 00:26:03.295,00:26:08.233 securing the US government's most sensitive materials. In the pentagon alone there are several 00:26:08.233,00:26:13.138 thousand X-0 series locks installed, the Department of Defense, Central Intelligence 00:26:13.138,00:26:19.211 Agency, National Security Agency, and Air Force One all rely upon the KabaMas X-0 series 00:26:19.211,00:26:24.183 to guard it’s most sensitive information, by the way, this includes the launch codes for 00:26:24.183,00:26:29.188 the nuclear missiles on US submarines [audience laughs boisterously][speaker chuckles] 00:26:34.993,00:26:41.333 [video ends] >>So the government was not pleased [laughter] uh this is probably one of the most 00:26:41.333,00:26:45.404 passive aggressive, I really hope you could read the text to this a little bit, one of the 00:26:45.404,00:26:49.842 most passive aggressive sort of semi threatening please stop your research le- uh letters 00:26:49.842,00:26:56.682 that I’ve gotten um under- under authority of the president! You do not have the authority to 00:26:56.682,00:27:01.854 test these locks, oh by the way if you find anything you should you should it is unacceptable 00:27:01.854,00:27:06.658 for you to just tell the vendor, you have to tell us. Uh and then I love the cc list, the only 00:27:06.658,00:27:11.663 thing that ruins this letter for me is it says Dear Mr. Cerrudo [laughs] Um okay so, so 00:27:14.366,00:27:19.905 architecturally this is what we’re looking at with the uh, oh yeah, this is the X-07 right? So 00:27:19.905,00:27:24.810 uh we only have the knob that breaches through the actual safe body and all we have is the LCD 00:27:24.810,00:27:30.082 connector on the outside, uh and this LCD connector you know it’s uh if you’ve ever driven uh an 00:27:30.082,00:27:33.852 actual LCD these signals are not anything that you consider friendly, there’s no power, 00:27:33.852,00:27:38.891 there’s no ground, it’s just sort of an AC signal, um they don’t bring any ground outside 00:27:38.891,00:27:43.896 the safe that I can even measure these signals really against um also the locks are completely 00:27:46.365,00:27:50.469 potted uh because they don’t want you getting inside, by the way, the- you can remove this 00:27:50.469,00:27:56.775 potting, we’ll, we’ll look at that a little bit also. But the uh further X-0s kind of shifted 00:27:56.775,00:28:00.345 the security boundary a little bit, they decided, let’s put the generator on the outside of the 00:28:00.345,00:28:05.150 lock. Still I don’t have ground, that seemed to be a some like some consideration that they had 00:28:05.150,00:28:08.954 not providing me that ground outside of the lock so I I really just have the AC signal 00:28:08.954,00:28:15.460 from the generator knob, and the AC signal from the actual uh LCD signal itself. This is by the 00:28:15.460,00:28:20.465 way two depotted the X-08 and X-09 depotted and sort of wired up for testing. Um and yes uh 00:28:22.668,00:28:27.773 both of these are also 8051 microcontrollers so no room for crypto just nothing they can do 00:28:27.773,00:28:33.879 in here uh and also the internal EEPROM we’ve confirmed are just clear text uh so just keep that 00:28:33.879,00:28:38.884 in mind for similarity of attacks [laughs] I I hear a few people recognizing things um so 00:28:43.689,00:28:46.992 [laughs] so if you actually look at these waveforms you can kind of see why it’s so hard to 00:28:46.992,00:28:51.129 really uh like these are directly from the data sheet for the actual LCD driver chip 00:28:51.129,00:28:57.502 that’s inside these locks um let me go back there uh you can kind of see at any particular time 00:28:57.502,00:29:02.441 any LCD segment may have full VCC, negative VCC, half VCC, half negative VCC, or ground 00:29:04.476,00:29:10.782 anywhere in there and I’m trying to read this millivolt side channel out of there um and more 00:29:10.782,00:29:16.455 or less after I had the X-07 I I kind of dropped it I I just left it alone for awhile and you have 00:29:16.455,00:29:22.227 one of those shower thoughts moments that uh Metty’s face perfectly represents here uh on 00:29:22.227,00:29:26.698 how to recover the side channel from that lock I need to separate the the ones from the 00:29:26.698,00:29:29.801 zeros, I need to separate the positive signals from the negative signals, and we have a 00:29:29.801,00:29:36.308 thing for that it’s a bridge directive fire but normally we only use you know two, two poles 00:29:36.308,00:29:39.478 of a bridge directive fire in your A- in your normal AC circuit turns out you can just 00:29:39.478,00:29:46.184 make a bridge directive fire with twenty of em so its teeing off the LCD itself and like 00:29:46.184,00:29:51.823 right here, you can actually just set up a whole bunch of shot key [inaudible] TB LCD out, 00:29:51.823,00:29:56.395 so the LCD will still continue functioning as normal but now I have a ground to reference the 00:29:56.395,00:30:02.000 signal, the the VCC signal from the LCD itself against, and now I can read that internal VCC 00:30:02.000,00:30:07.005 signal uh so let’s see what we can find [laughs] so the stop trace is the actual full VCC 00:30:10.876,00:30:15.514 signal uh that you get off of the dial when twisting it, keep the knob I’ve uh I keep in mind 00:30:15.514,00:30:18.550 I’ve got to keep the knob together and everything because you have to rotate that knob to 00:30:18.550,00:30:24.890 power the lock so the beginning spikes you can see here if you can see my mouse um this is the 00:30:24.890,00:30:29.327 actual knob rotation time right here and that’s why you have these high voltage, highish 00:30:29.327,00:30:33.932 voltage spikes uh and then suddenly right here is when the lock begins to get power and you 00:30:33.932,00:30:39.204 can see it sort of slowly drawing from that internal voltage pool that it’s got and 00:30:39.204,00:30:44.810 if we sort of zoom right in on this little spot right here and take this little logic trace 00:30:44.810,00:30:50.015 right here [inaudible] surprise there. We can actually see that uh we see these little high 00:30:50.015,00:30:55.120 frequency spikes of bullshit garbage that perfectly line up with the actual data transfers 00:30:55.120,00:31:00.125 internally to the lock. Um and again we know that the lock’s internal EEPROM contents are not 00:31:00.125,00:31:06.331 encrypted, if we band pass that signal a little bit more and try to look a little bit closer we 00:31:06.331,00:31:10.335 can actually see the signal that we actually get is an inverted version of the actual data 00:31:10.335,00:31:14.806 itself just no more signal processing necessary, so I don’t think you need to write, and 00:31:14.806,00:31:18.110 that might even be hard to write a perfect exploit for this to just sort of threshold these 00:31:18.110,00:31:23.115 values out um but you can sort of see these 2 waveforms are inverted versions of each other 00:31:23.115,00:31:27.486 and that effectively allows me to extract the internal combination of the X-07 er the 00:31:27.486,00:31:32.491 X-08 and the X-09. [applause] Thank you. One of the things preventing you from doing this 00:31:41.767,00:31:48.607 easily and stealing the nuclear codes, um is that the X-07 uh, the X-08, the X-09, and the X-10 00:31:48.607,00:31:53.145 have some physical security aspects that make this somewhat difficult uh you would have to 00:31:53.145,00:31:57.916 remove, uh if you kinda see in this uh image here I have to remove the front dial uh to 00:31:57.916,00:32:02.187 actually get to the lock internals to do that uh to do that you would have to defeat 00:32:02.187,00:32:08.360 eeeyahh have to defeat this snap ring uh and that snap ring is intended not to come out once it 00:32:08.360,00:32:13.465 is firmly in place uh but it turns out it’s only that entire dial is really only kept on by a 00:32:13.465,00:32:19.504 set screw [laughs] so if you drill through the front of the actual dial and put a screw in 00:32:19.504,00:32:23.408 through there to thread that little hole, you can push the screw in and back the entire 00:32:23.408,00:32:28.914 knob off of the uh the dial that goes through, that’s not a non destructive attack, you’ve just 00:32:28.914,00:32:34.519 drilled a knob to do this um you but it’s you know it’s definitely a problem in the lock 00:32:34.519,00:32:39.324 design. Um if you happened to bring a replacement knob it would, you know, not leave any 00:32:39.324,00:32:45.363 evidence [laughter] um but I’m but I’m not gonna claim that it’s a non destructive attack. 00:32:45.363,00:32:50.368 Um yeah so in slides that uh I had to add since uh bulls**t ryders articles came out uh we 00:32:57.142,00:33:01.746 called Kaba back and of course we told that uh hey so that lock you told me not to play with 00:33:01.746,00:33:07.719 [laughs] I played with it, totally vulnerable. And uh he was very snippy he didn’t 00:33:07.719,00:33:13.825 actually tell me to go fuck myself [laughter] but between the, he told me that uh since 00:33:13.825,00:33:19.331 the government is the only uh person or the only uh agency that receives the locks, uh they 00:33:19.331,00:33:24.102 will be the ones to respond. Uh he’s also the guy this morning that uh questioned why I would 00:33:24.102,00:33:28.473 present it to a group of hackers, or hobbyists, or whatever, rather than going to 00:33:28.473,00:33:33.445 the government. I did you d**k, ten months ago, because of you. Uh it’s also worth pointing out 00:33:33.445,00:33:36.882 that he actually alerted the government that we were doing it, he tried to call the 00:33:36.882,00:33:42.554 government on us so we kinda went down this road because he was a d**k [laughs] uh so yeah, 00:33:42.554,00:33:47.559 we called the government back, they actually turned out to be a bunch of nice guys, but this was 00:33:49.928,00:33:53.832 all happening during the government shutdown um [laughs] they seemed to think this was 00:33:53.832,00:33:58.270 important enough to fly out to our offices um [laughs] which was one of the most awkward 00:33:58.270,00:34:02.974 meetings that I have ever been in in my life, uh you don’t know awkward until you’ve been in a 00:34:02.974,00:34:07.312 meeting with a guy who will- who cannot spell the government without capitalizing the G 00:34:09.581,00:34:14.386 [laughter] not joking. And with a hacker who is trying to put a challenge accepted meme in his 00:34:14.386,00:34:19.391 slidedeck for them so [laughter] but they they turned out to be nice guys um and ultimately uh 00:34:21.459,00:34:27.365 they went on to develop a mitigation for the X-0 uh series of locks um they asked if I 00:34:27.365,00:34:29.868 could sign a nondisclosure agreement, pretty much everybody has asked me to sign a 00:34:29.868,00:34:35.206 nondisclosure agreement for this but I’m f**king done with locks so I wanted to do DefCon, this 00:34:35.206,00:34:38.977 is this is how I can cathartically get rid of this entire line of research until 00:34:38.977,00:34:43.982 someone shows me another bulls**t lock. Um I can call out some names there, anyway, um, 00:34:48.887,00:34:53.892 metico, so uh, so we we also decided that um since it would potentially be a crime for me to 00:34:59.698,00:35:04.869 purchase the X-10 lock uh and they seemed to warn me against buying it even though they 00:35:04.869,00:35:09.040 agreed that I should probably look at it um we kind of went our separate ways with them sort 00:35:09.040,00:35:13.745 of saying, you know, we’ll go talk to some folks and see if it’s worth you looking at the 00:35:13.745,00:35:18.750 X-10, um but don’t buy one. [laughs] Um I decided to go look at the X-10 the only thing that 00:35:21.686,00:35:28.259 I can tell [laughter] the only thing the X-10 does is add a backlight display uh when we 00:35:28.259,00:35:32.764 were contacted again by the GSA this is the only quote that I have to tell me how the X-10 00:35:32.764,00:35:37.769 security is. [laughter] Alright so so I guess I actually got through 47 slides in 40 minutes 00:35:45.677,00:35:50.682 um there may in fact be time for anybody to ask any questions if you could you know if you wanna 00:35:56.054,00:36:00.992 try. Nope? Alright. [applause] Op! Somebody has a question, sorry. [off mic inaudible 00:36:08.199,00:36:13.304 question] Sa- say it again? [inaudible question continues] uh yeah that is government talk 00:36:13.304,00:36:17.342 for you’d be f**ked um I think that I think that what it means is uh ultimately we’ve design- 00:36:17.342,00:36:23.848 uh we’ve tried to get people to understand this as a um design pattern flaw and uh I think they 00:36:23.848,00:36:27.585 acknowledged that and they went back and they were able to identify this pattern on their 00:36:27.585,00:36:31.656 own and hopefully other lock manufacturers will as well uh they just don’t have as much 00:36:31.656,00:36:38.463 money in them. Anybody else? Is there anybod- [someone shouts from audience] f**k you! 00:36:38.463,00:36:42.734 [laughter] Is there anybody else? Alright I am outta here, I’m going to go get a drink, I 00:36:42.734,00:36:47.739 will be accepting joints. [applause]