00:00:00.033,00:00:04.204 >>You guys are at DefCon I didn’t know if you know that, Uh Saturday morning. Uh we got a 00:00:04.204,00:00:10.210 fantastic talk. Uh this guy has presented f- with us before. Uh he’s coming back to uh talk to 00:00:10.210,00:00:16.850 you about uh it’s a, remote, hacking remote care starters. >>Yep >>Perfect, uh so without 00:00:16.850,00:00:21.221 further ado I will let J-Maxxz get to it. Just let’s give him a big round of applause. 00:00:28.228,00:00:32.833 [applause] >>Thank you. How’s everyone’s DefCon going? [low audience cheers and applause] 00:00:32.833,00:00:37.971 Really? Tr- let’s try that again. How’s everyone’s DefCon going? [audience cheers and 00:00:37.971,00:00:42.242 applause] Okay. So my names J-Maxxz. I’m a software engineer by trade, hacker by passion. I 00:00:42.242,00:00:45.979 pretty much like anything to do with locks and um throughout this talk you’re going to hear 00:00:45.979,00:00:49.983 lots of opinions. Those opinions are my own they’re not my current employers, past 00:00:49.983,00:00:54.988 employers or future employer’s opinions. Louder? Okay. All the opinions are my own. Summary of 00:00:58.759,00:01:03.397 the last statement. Um if you like what you see or you don’t like what you see hit me up on 00:01:03.397,00:01:09.903 twitter, um handle’s @JMaxxz, I’ll try to get back to you. So a little bit on the back story 00:01:09.903,00:01:15.275 here. As you’ve probably figured out this talks about cars. Um, but it’s not about cars 00:01:15.275,00:01:19.780 themselves, it’s about after market uh remote starters and alarm systems. And I think it’s 00:01:19.780,00:01:23.750 important to provide a little backstory here because we may look at these devices and think 00:01:23.750,00:01:28.121 they’re somewhat of a luxury item, who would really want that. Um and so I want to tell 00:01:28.121,00:01:34.161 you how I got into looking at these. So where I live, it’s cold, um some would say really 00:01:34.161,00:01:39.333 cold. And my girlfriend has a condition called Raynaud syndrome and what that is, is 00:01:39.333,00:01:44.271 the blood vessels in her extremities will constrict uh if she gets cold and that can cut 00:01:44.271,00:01:48.075 off blood flow to her hands for example. If you go without blood flow in your hands for a while 00:01:48.075,00:01:53.380 you can end up with something very similar to frostbite. Um, and it's about November of last 00:01:53.380,00:01:58.285 year and I haven’t figured what I’m going to get her for Christmas yet. And she comes 00:01:58.285,00:02:04.157 home from the airport uh one week after traveling for work um, and she gets home and she’s 00:02:04.157,00:02:09.296 very upset because her car never warmed up on the way home. At that point I say okay, I, I 00:02:09.296,00:02:12.199 figured out, I know what I’m going to get her. I’m going to get her a remote car starter. 00:02:12.199,00:02:16.737 And so I start looking around at all the various options out there for remote starters and 00:02:16.737,00:02:20.907 there’s a lot of them and I notice that quite a few of them won’t give you the consumer 00:02:20.907,00:02:25.879 information. They won’t give you access to how to install it, they won’t give you access to 00:02:25.879,00:02:31.852 the tool chains you need um to program the unit. Um and that’s kind of a problem for me, it’s 00:02:31.852,00:02:36.790 my car, it’s my remote starter I should have access to those tools. So I looked around a bit 00:02:36.790,00:02:41.728 more and I find a company out of Canada, Fortin who makes a remote starter and they provide 00:02:41.728,00:02:47.501 a documentation fairly willingly, not only on how to install the, the um, the unit in 00:02:47.501,00:02:53.774 various cars but also the tools you need to program the unit. So I’m like, that’s perfect, um 00:02:53.774,00:02:58.612 that’s what I’m gonna get and I start looking around for remotes. So with remote starters 00:02:58.612,00:03:02.783 while you could use the factory remote, your range would then be limited to the factory remote. 00:03:02.783,00:03:06.987 And you can get aftermarket remotes with these units and they’ll advertise ranges 00:03:06.987,00:03:12.359 anywhere from a half a mile to a mile and a half. Um but from the reviews it’s apparent that those 00:03:12.359,00:03:17.864 are advertised ranges and, in the real world you see much less than that and the problem is as 00:03:17.864,00:03:24.104 I said she travels for work a lot um, and my concern is um, she, she’s not going to be able 00:03:24.104,00:03:27.574 to start her car from a mile in a half a way when she’s at the airport, there’s a lot of 00:03:27.574,00:03:32.212 concrete. So I’m thinking, ya know what would be great if she could just pull out her phone, 00:03:32.212,00:03:37.984 open app on the phone and hit start. Um and so I look around uh Fortin’s list of third party 00:03:37.984,00:03:42.489 vendors that integrate with their system. And I find this one called MyCar. And what it 00:03:42.489,00:03:46.893 is, is a little cellular unit with a GPS in it that you can put in the car and you hook up 00:03:46.893,00:03:51.865 to the remote starter and then this provides the capability of being able to pull up your car 00:03:51.865,00:03:56.269 uh in an app on your phone as a picture of what your car should look like based on its make and 00:03:56.269,00:04:01.041 model, you can start the car, unlock your car, do anything you can do with a key fob. I’m like 00:04:01.041,00:04:04.744 that’s perfect, when the plane lands she can start her car, but they time she gets to it, it 00:04:04.744,00:04:10.550 should be warm. So at this point let's talk a little bit about how remote starters work. In 00:04:10.550,00:04:14.654 order to understand remote starters we first have to understand how cars start. 00:04:14.654,00:04:19.793 Traditionally cars started off of, using a keyed switch, It’s just a keyed switch there’s 00:04:19.793,00:04:23.897 nothing fence there. When you’re putting the key in the ignition you’re completely a circuit when 00:04:23.897,00:04:27.901 you turn it so when you turn it to the accessory position you’re completing a circuit that will 00:04:27.901,00:04:32.105 power up the in-interior of your car, when you turn it to the crank position you’re powering 00:04:32.105,00:04:36.543 up the starter modem. And this was true up until around the mid-nineties, around that time 00:04:36.543,00:04:42.249 vehicle mobilizers started to become fairly popular on the US marked an immobilizer will, ay 00:04:42.249,00:04:47.521 sound fancy it’s just an electronic lock. So you have the mechanical lock that is the key 00:04:47.521,00:04:53.126 and then you have an electronic lock um that is a transponder and something to read that. Um 00:04:53.126,00:04:59.599 and if you don’t unlock the electronic lock your car won’t start. So in the slide here on 00:04:59.599,00:05:04.671 the uh left side there’s a key with a over-molding and there’s on the right side there’s a key 00:05:04.671,00:05:08.441 it’s just a medal insert. The one on the right will just actuate the mechanical 00:05:08.441,00:05:12.646 components whereas the one on the left can actually unlock that electronic lock that allows 00:05:12.646,00:05:18.718 your car to start. So why do I mention this? Well remote starters today have to bypass 00:05:18.718,00:05:22.589 the immobilizer it’s necessary for the remote starter to work if you want it to work in a 00:05:22.589,00:05:28.428 modern car. And so if we look at how you could hook one of these systems up to your car here’s an 00:05:28.428,00:05:32.866 example from Fortin’s documentation showing how the unit I got, the EVO One gets 00:05:32.866,00:05:38.772 hooked up so on the lower left side there’s a couple lines that are labeled IMO and those have 00:05:38.772,00:05:42.409 to do with dealing with the vehicles immobilizer. And then if you go to the very top on the 00:05:42.409,00:05:46.379 right side there’s a couple lines labeled CAN high and low. And those are connections to the 00:05:46.379,00:05:50.350 vehicle’s CAN bus, the reason the remote starters connect to the CAN bus is to reduce 00:05:50.350,00:05:55.956 installation costs because it’s few, it’s fewer connections your installer has to make. So if 00:05:55.956,00:05:59.626 they can read data off the CAN bus or they can send commands over the CAN bus they’re 00:05:59.626,00:06:05.532 motivated to do that because again it reduces installation times. On the uh left side of 00:06:05.532,00:06:09.836 the screen at the very top there’s a bunch of GPIO these are just related to controlling 00:06:09.836,00:06:14.808 or reading information about the car so for example uh when you hit the lock button maybe you 00:06:14.808,00:06:20.580 want the lights to flash and horn to honk um that’s can be controlled by these GPIO. And at 00:06:20.580,00:06:25.252 the bottom on that side that big clunky connector is the high current interface and what that 00:06:25.252,00:06:30.023 does is bypass the mechanical side so as I said when you turn your key you’re completing a 00:06:30.023,00:06:35.729 circuit, um that big chunky cont-connector there allows those circuits to be completed 00:06:35.729,00:06:41.935 with simple relays inside of the remote start unit. So here’s just a couple pictures from um 00:06:41.935,00:06:46.706 installing the remote starter. Uh basically it just consists of pulling off uh the steering 00:06:46.706,00:06:53.246 wheel column, making a couple electrical connections in the um footwell. Um it’s really not 00:06:53.246,00:06:59.252 that complicated, it looks fairly daunting but it’s not that hard to do. The remotes 00:06:59.252,00:07:05.692 themselves get hooked up over what Fortin calls data-link. Um it’s a proprietary protocol, um 00:07:05.692,00:07:11.331 really it’s just five full UART running at ninety-six hundred BAUD and it just connects via a 00:07:11.331,00:07:16.069 bus so these two remotes here that I’m showing would be connected to this same UART 00:07:16.069,00:07:21.074 connection. So sometimes after installing the unit it, I start thinking, you know, I, I wonder 00:07:23.543,00:07:28.548 how this affects the security of that vehicle. Obviously, it has to bypass the immobilizer but 00:07:30.550,00:07:35.822 h-how secure is this um not only the cellular side but the remote start side. So I start looking 00:07:35.822,00:07:40.393 online to see maybe Fortin publishes the protocol for their data-link um so I can start 00:07:40.393,00:07:44.297 looking from that side. So I got to the forums and people have actually asked for the protocol 00:07:44.297,00:07:49.336 and consistently they’re told no. We don’t give out that information. One of the more 00:07:49.336,00:07:54.708 entertaining responses I saw were, was this one where they say, the EVO is not meant to be 00:07:54.708,00:08:01.147 used as a hobbyist toy. It’s meant to be used as a tool by professionals. So, I’m a 00:08:01.147,00:08:07.721 professional of sorts. [laughter] I set about building my own car on my workbench, so I 00:08:07.721,00:08:12.158 got a second unit put together a bread board that represented a car, some switches to represent 00:08:12.158,00:08:16.096 the ignition, momentary buttons to represent the brake pedals and a bunch of LED’s to 00:08:16.096,00:08:21.835 represent various states. Um I get everything wired up and I hook up an FTI device to start 00:08:21.835,00:08:27.140 monitoring the data link. And I’m capturing data and at first it looks something like this. I 00:08:27.140,00:08:31.811 mean, okay it’s not really apparent what’s going on here but if you squint your eyes just 00:08:31.811,00:08:35.715 right you can tell there’s definitely some structure here. Um paying a bit more attention I 00:08:35.715,00:08:39.786 notice that whenever I press the button on my remote the message that is sent by the antenna to 00:08:39.786,00:08:46.092 the remote start unit always starts with zero C and ends with zero D. SO if we just split what 00:08:46.092,00:08:51.131 we’re receiving based on zero C being the start and zero D being the end, we end up with 00:08:51.131,00:08:55.235 something more like this. At this point it’s clear there’s some structure here and we can 00:08:55.235,00:09:00.573 figure out what’s going on. So putting in a bit more time and being a bit more diligent about 00:09:00.573,00:09:04.677 keeping track of what button I pressed and what message I saw eventually I’m able to put 00:09:04.677,00:09:08.348 together a spreadsheet where I um figure out what each of the commands and each of the 00:09:08.348,00:09:13.486 messages look like. And so here’s just a simple break down of what a typical command looks 00:09:13.486,00:09:17.690 like over the data-link protocol. When you press a button on your remote the 00:09:17.690,00:09:21.261 antenna sends the remote start unit a command that looks like this. So you have a start 00:09:21.261,00:09:26.199 sentinel that’s at zero C, you have two bytes that represents the direction or at least that’s 00:09:26.199,00:09:30.336 what I think it represents up that’s somewhat interesting because UART is already 00:09:30.336,00:09:34.374 directional there’s already a transmit receive line um so that’s why I’ve labeled it 00:09:34.374,00:09:38.645 garbage, just treat it as a constant. Um following that we have a single byte that 00:09:38.645,00:09:42.415 represents the command the user would like to run so this could be lock, could lock, could be 00:09:42.415,00:09:47.954 start, stop panic, anything that you can do from the remove um will have a command associated 00:09:47.954,00:09:54.294 with it. Following that we have a payload, um in the case of c- messages coming from an antenna 00:09:54.294,00:10:00.600 to the remote start unit this payload is almost always going to be an address or ID that 00:10:00.600,00:10:07.440 identifies the remote antenna that the message came from. If the remote start unit doesn’t 00:10:07.440,00:10:13.580 recognize an ID it will ignore the command. And to get a remote start unit to recognize the ID 00:10:13.580,00:10:18.284 there’s a multi-step procedure that involves putting the key in the ignition, turning it on or 00:10:18.284,00:10:22.455 to the accessory position and then hitting the brake pedals some number of items pressing 00:10:22.455,00:10:26.893 some buttons with remotes. Um it’s ap procedure, doesn’t really matter but it learns the 00:10:26.893,00:10:31.764 ID at that point. And if we look at the end of the message is ends with a check sum and that 00:10:31.764,00:10:38.471 end sentinel that um we identified earlier. So now that we understand how the protocol 00:10:38.471,00:10:43.476 works, what can we do with it? So, to show this I have a couple videos. Uh do we have sound? It. 00:11:04.430,00:11:09.435 Let’s try this again. >>Not found. Guys, anything? It’s playing. Oh, uh, presentation 00:11:35.328,00:11:40.333 view, got, Oh my God. God dammit. Let’s do this. Ch, Ch, Ch. [inaudible audio] [applause] 00:12:05.358,00:12:10.363 Yeah. Okay. >>Okay. Let’s try this again. Still no sound. [inaudible] It’s plugged in. 00:12:30.717,00:12:36.623 Okay guess we’re just gonna be talking through this then. So I’m showing you there, is the 00:12:36.623,00:12:41.361 scrub back, okay so that white box there is a development board I have that’s running, is a 00:12:41.361,00:12:45.131 particle development board is running firmware I wrote that understands the Fortin protocol 00:12:45.131,00:12:50.136 it allows me to interact with um, the Fortin remote start unit. So what I’m showing here 00:12:52.171,00:12:57.176 is I send an unlock command to the car, um well you should have seen the command in the previous 00:12:59.379,00:13:04.150 one, the unlock command doesn’t work because the remote start doesn’t know about that antenna. 00:13:04.150,00:13:09.088 So as I mentioned, it’s just UART and one of the things with remote start units is they’ll 00:13:09.088,00:13:13.559 often support what’s called two way communication. So they’re able to tell the remote about 00:13:13.559,00:13:17.497 the state of the car. For example if the cars started or stopped and to do this it 00:13:17.497,00:13:21.467 actually set, the remove starter sends a message back to the antenna and when they do this 00:13:21.467,00:13:25.938 they include the address of the antenna they’d like to send the message to. Uh the problem here 00:13:25.938,00:13:30.777 is because it’s going over the UART connection and it’s a flat bus anyone on that bus can see 00:13:30.777,00:13:36.449 that address being sent. So in my firmware the capability to clone an address. So if we turn 00:13:36.449,00:13:41.454 on the clone mode at this point I’d really like sound. Um, so the, at this point we need to 00:13:44.991,00:13:50.029 generate a message to generate a message um we can just simply open the car’s door. So by 00:13:50.029,00:13:55.034 opening the car’s door uh the car sends the remote starter a message or sends the antenna a 00:13:55.034,00:13:59.972 message saying that the door has been opened. At this point in the video the alarm is going 00:13:59.972,00:14:05.478 off. You’ll just have to take my word for it but it is, Um and th- we’ve also match clones the 00:14:05.478,00:14:09.682 antenna because it’s attempted to communicate, or clones the ID because it attempted to 00:14:09.682,00:14:15.421 communicate with the antenna. Now when we send unlock the alarm shuts off and the car 00:14:15.421,00:14:20.426 unlocks. So here. >>So here’s sound settings in here, should, audio settings, mouse. Yeah see 00:14:38.010,00:14:43.015 you need to drag there. [inaudible] >>Kay let’s try this again. W- [inaudible video 00:14:57.196,00:15:02.135 sound] It’s going, we don’t hear anything. Okay so where’s my mouse? >>Go into the sound 00:15:13.246,00:15:18.251 settings. There we go. Sound settings. Click. Try speakers. That should do it. [bell ring] 00:15:48.014,00:15:51.851 >>Hey. [applause] Okay what you see the, so what we have here is a Subaru Impreza, the alarm 00:15:51.851,00:15:58.024 going off, one remote start analog system installed and plugged into the antenna delay 00:15:58.024,00:16:02.962 but I have my particle board and if we send an unlock command from the particle, um we’ll send 00:16:05.264,00:16:10.303 the command but nothing will happen. What we can do then is we can just clone th- an 00:16:10.303,00:16:12.305 existing antenna so if we wanna tell the firmware, hey we want to clone um an existing antenna, 00:16:12.305,00:16:17.310 now we just need to generate a message that’s going to cause the remote start unit to reach 00:16:23.316,00:16:27.053 out to one of the antennas and try to tell it something. So in this case it’s as simple as 00:16:27.053,00:16:33.326 opening the door [alarm sound] now the alarm may be going off but we’ve managed to clone the 00:16:33.326,00:16:38.331 address. Now we can just send an unlock command. And we’ve unlocked the car and disabled 00:16:41.400,00:16:46.405 the alarm. [applause] So at this point we’ve managed to send the c-command to the remote start 00:16:53.045,00:16:58.050 system, get an alert, all without the key. So now let’s try starting the car. [sound] 00:17:00.052,00:17:05.057 Okay now let’s say we want to actually start the car. Normally um, if we just type start and we 00:17:09.762,00:17:13.666 try to run the start command it won’t work and the reason is this car is a manual 00:17:13.666,00:17:19.205 transmission and remote start systems um, will normally have a special procedure when it comes 00:17:19.205,00:17:25.111 to manual transmissions in this case it’s you have to uh with the key in the ignition um hit 00:17:25.111,00:17:29.615 the remote start button while the car is running and then you can pull the key out walk out 00:17:29.615,00:17:34.854 the side the car, when you shut the door it your remote start will shut off the engine and it 00:17:34.854,00:17:39.525 will lock the doors. And this is to keep the car from ever remote starting while it’s in drive 00:17:39.525,00:17:45.398 because that’s dangerous. However, it’s not really a security feature and to prove 00:17:45.398,00:17:49.869 that it’s as simple as if we take a look of one of these remote start units, um what 00:17:49.869,00:17:55.474 makes it um work in the manual transmission mode is this loop wire here. If you cut this loop 00:17:55.474,00:18:00.379 of wire it switches to the automatic uh transmission mode. In that case doesn’t require any 00:18:00.379,00:18:05.651 special sets up, so just saw the start didn’t do anything so I’m going to do is I’m going to 00:18:05.651,00:18:10.423 return on the dash, I’m going to cut this in action, um to make that easy for this demo, I can 00:18:10.423,00:18:15.428 just install a switch on this loop. Okay the connection’s been cut, now if we re-run the start 00:18:20.433,00:18:25.438 command [beep] this time the car starts right up. S-so at this point we have a car that we can 00:18:33.713,00:18:38.484 start um we can add the remote to it, we can start without a key, um but if you have a remote 00:18:38.484,00:18:42.588 start unit you know that’s not everything you need to do, there’s usually a key take over 00:18:42.588,00:18:47.059 procedure, you normally well you shouldn’t be able to drive away on a car that’s remote start. 00:18:47.059,00:18:53.833 But, let’s say we want to drive away on a car that’s remote started. [applause] How would we 00:18:53.833,00:18:58.838 do that? One you send a video. So to disable the wheel lock, okay, um I’ve put a normal key 00:19:07.246,00:19:11.117 in the ignition, this does not have the transponder in it, this is not, so it can’t actually be 00:19:11.117,00:19:15.588 used to start the car. However we have it in the ignition and we actually only have it in the 00:19:15.588,00:19:19.258 accessory position, this is a different video, and that’s enough to disable the wheel lock 00:19:19.258,00:19:23.896 on the Subaru Impreza, um you do have to go all the way to ignition to get the wheel lock 00:19:23.896,00:19:28.901 to cut off. Um, and now. Okay sorry not my computer don’t know what’s going on there. Okay I 00:19:31.871,00:19:38.344 want this video. Let’s try this again. There we go. So now that we have the car started without 00:19:38.344,00:19:42.415 a key let’s say we want to drive off. This is where it gets a little bit tricky because these 00:19:42.415,00:19:46.719 remote start systems will have some form of key takeover. And what that means is we can the 00:19:46.719,00:19:51.223 owner can put the key in the ignition turn it to the ignition setting and then transfer over 00:19:51.223,00:19:56.629 to that. Um, but if we don’t have the key, the moment we press the brake pedal to drive 00:19:56.629,00:20:01.634 off, the car will shut down. Now if we want to get around that, it’s fairly simple. We just have 00:20:05.538,00:20:10.776 to figure out how the car is uh telling the remote starter um that the brake is being pressed, 00:20:10.776,00:20:15.281 in this case that’s happening over CAN bus and plugged into one of these ports back here, 00:20:15.281,00:20:18.651 and plugged into one of these ports back here is the CAN bus connection and if we just unplug 00:20:18.651,00:20:24.490 that while the car is remote started um it’ll no longer care if the brake is being pressed. 00:20:24.490,00:20:31.397 Now because that’s under the dash what I’m going to do here is I’m going to um, start and 00:20:31.397,00:20:36.402 unlock the car. [beeping] So I can get out and uh, get that disabled, I’ll show you that in 00:20:46.946,00:20:53.719 a second. Okay now we’re under the dash here and I have my remote starter um right down 00:20:53.719,00:20:58.190 here and there’s a little white connector here and that’s the connection to the CAN bus if I 00:20:58.190,00:21:05.030 unplug that you’ll see that the car is still running and we still do not have a key in the 00:21:05.030,00:21:10.035 ignition and at this point if I get in the car and hit the brake, so if I press the brake, 00:21:14.607,00:21:18.110 the car will not shut off and that’s because it doesn’t know that the brake pedal is being 00:21:18.110,00:21:23.115 pressed so at this point we can get in the car, we can put the car in drive and we can proceed 00:21:36.896,00:21:41.901 to drive off in the car. All without a key. [applause] Okay so there’s a, an important no- 00:21:53.479,00:22:00.052 eh, bleh, an important note to make there. Um and that was that click you heard at the end. That 00:22:00.052,00:22:03.789 was actually the wheel lock of the car itself engaging. So the wheel lock is entirely 00:22:03.789,00:22:09.495 mechanical. So we can’t defeat that electronically here um you have to use something mechanical 00:22:09.495,00:22:13.666 to get around that so, breaking the cylinder, or something else, something I really wasn’t 00:22:13.666,00:22:18.671 interested in doing in her car. So all the firmware for what I demoed is available at GitHub it 00:22:20.873,00:22:25.511 will be made public after this talk, you just go to GitHub dot com forward slash Jmaxxz open 00:22:25.511,00:22:30.716 remote start. Um you’ll find the fir- the firmware I was using along with the, the schematic um 00:22:30.716,00:22:36.589 for my little dev board there. But now let's get on what you’re really here for. Which is what 00:22:36.589,00:22:40.859 happens when we, l- when we add the internet to this system. Because that should make it 00:22:40.859,00:22:47.700 better right? Um, as I mentioned the unit I got is the MyCar unit. But MyCar’s sold under 00:22:47.700,00:22:50.336 many different names and the unit I got was branded LinkR LT by Omega. But this isn’t the 00:22:50.336,00:22:52.338 only brand name it’s sold under. It’s sold under MyCar uh MyCar Vision, Car Link, Link R. But 00:22:52.338,00:22:57.343 also Kia. It seems for awhile Kia dealerships in Canada were installing this system or at 00:23:05.885,00:23:12.124 least that’s what the MyCar Kia app seemed to imply based on description. Interestingly that 00:23:12.124,00:23:18.530 application is no longer available on the app store. I also want to note that while I’m 00:23:18.530,00:23:23.402 just looking at MyCar and Fortin here um that doesn’t necessarily meant that other systems are 00:23:23.402,00:23:27.806 better at the same time I was doing this research Cybergibbons and pen test partners were 00:23:27.806,00:23:32.511 looking at other systems with similar capabilities. Um and they found very similar issues 00:23:32.511,00:23:38.751 with those systems as well. Which brings me to the real question the thing I want 00:23:38.751,00:23:42.988 everyone to be thinking about, which is how does this happen, how does a product with the 00:23:42.988,00:23:48.694 issues I’m about to show you make it to market um without anyone saying anything? And if 00:23:48.694,00:23:53.399 anyone here has an interest in looking at remote car starters there’s a couple things I want 00:23:53.399,00:23:58.470 to point out. Um first as I mentioned earlier if a remote start system is mis installed in 00:23:58.470,00:24:03.575 a manual transmission vehicle it’s possible a car could start while In gear. Um this means the 00:24:03.575,00:24:08.747 car could actually start moving and the engine could actually start up and now you have a car 00:24:08.747,00:24:14.386 that’s moving without anyone behind the role. So that’s obviously dangerous um but 00:24:14.386,00:24:20.459 there’s actually a more subtle and I think uh bigger risk and that’s, if someone parks a car 00:24:20.459,00:24:25.898 with a remote car system in an attached garage and it’s remote started um accidentally or 00:24:25.898,00:24:29.935 without their knowledge carbon monoxide can enter the home and that could create a very 00:24:29.935,00:24:34.340 dangerous situation. So if you do have a remote start system you should definitely have 00:24:34.340,00:24:40.245 carbon monoxide detectors um but also if you’re looking at remote car start systems, just like 00:24:40.245,00:24:45.551 with locks never start a car you don’t own and you don’t know where it is. Um because the 00:24:45.551,00:24:50.556 consequences could be dire. So looking at the MyCar Unit it’s this little black box with this 00:24:53.192,00:24:57.396 eight pin header, two of those pins are actually for a debugger interface. Um, connecting to 00:24:57.396,00:25:01.533 this debug interface it’s obvious the unit is running Linux a fact which is as far as 00:25:01.533,00:25:07.172 I can tell the manufacturer does not disclose. Um if you want to drop into the Linux shell the 00:25:07.172,00:25:13.812 passwords uh actually O U Linux one, two, three, uh so if you do get one of these there you go. 00:25:13.812,00:25:18.584 Um but without logging in you can use s-something they call the AT engine and this let’s you 00:25:18.584,00:25:22.855 run AT style commands on the command line so you can do things like change the IP 00:25:22.855,00:25:27.993 address the unit is talking to. And if we look at the diagram at the bottom where it says IP this 00:25:27.993,00:25:32.965 is actually the server that MyCar unit talks to, to communicate updates. Um and just 00:25:32.965,00:25:36.435 under that there’s an L Port, that’s the port that this is listening on to receive 00:25:36.435,00:25:41.440 commands. Uh using the AT engine and changing the IP this was talking to, changing it from one 00:25:43.442,00:25:49.348 that my car controlled to one I controlled, I was able to determine that this device is 00:25:49.348,00:25:54.353 talking via unencrypted UDP. Um, I didn’t do much looking into that but I thought that was 00:25:56.455,00:26:01.393 fairly um significant and interesting. So here’s some more information on this if you wanna 00:26:03.529,00:26:10.135 pick one of these up. Um couple things to note uh voltage kind of matters on that UART and well 00:26:10.135,00:26:15.073 also on the documentation seemed to imply could be tolerant of much higher voltages. Next year 00:26:15.073,00:26:20.479 I’ll tell you if I chose that, you gotta be a bit more careful. So as I said where I live it 00:26:20.479,00:26:26.985 gets cold and ab- about a month after I gave this system to my girlfriends my curiosity got the 00:26:26.985,00:26:30.989 better of me, when I installed the system I had a nagging issue that I was opening her up to 00:26:30.989,00:26:36.395 some security risks. But I said you know don’t look at ignorance as bliss just don’t think about 00:26:36.395,00:26:40.032 it, just don’t think about it, just don’t think about it and I was able to do that for about a 00:26:40.032,00:26:44.570 month and after a month I pulled the c- the cellular unit out of her car, put it on my bench and 00:26:44.570,00:26:51.276 started playing with it. And the forecast the next week was cold, negative thirty Fahrenheit um 00:26:51.276,00:26:55.614 and ya know I was able to connect to the shell, get it working and the cellular 00:26:55.614,00:27:00.486 reception in my home lab is not that great, um so some point I decided I wanted to work on it 00:27:00.486,00:27:04.756 with a different computer and the FTDI device I’m using doesn’t have particularly long 00:27:04.756,00:27:10.262 cords so I go find a different one plug in to my computer, plug into my remote start unit, power 00:27:10.262,00:27:16.835 everything up and all the magic smoke leaves the unit and she’s flying out tomorrow. Um so at 00:27:16.835,00:27:21.974 that point there’s a lesson learned there. Um if you wanna do any type of hardware hacking 00:27:21.974,00:27:27.145 and you can’t afford to lose the unit always have a spare. Um but if you ask, ask my girlfriend 00:27:27.145,00:27:31.383 the moral of the story maybe if your significant other is a hacker don’t let them play with 00:27:31.383,00:27:36.388 your Christmas presents. So now let’s look at the software. Um no chance of magic smoke here I 00:27:40.492,00:27:46.698 hope. Uh the, I, I fire up man in the middle proxy I disable SSL validation on my phone, I 00:27:46.698,00:27:52.604 begin sniffing what traffic is being sent by the application to the back end. And during the 00:27:52.604,00:27:56.842 registration process I notice it takes my email address, sends it to a web service to check to see 00:27:56.842,00:28:01.246 if that email address is tied to an existing account. And it’s using basic authentication, 00:28:01.246,00:28:06.318 which is interesting because I haven’t created an account yet. So I don’t really know what to 00:28:06.318,00:28:12.558 do with that and I kind of file, file it away in a notepad and move on. I create my account, I 00:28:12.558,00:28:16.762 log in, and one of the first things you do, the application does when you log in, is it 00:28:16.762,00:28:22.267 calls a webservice to check who the current user is. So I just call that web server with the 00:28:22.267,00:28:27.239 credentials that I saw earlier that were used to check to see if my email address exists and 00:28:27.239,00:28:32.244 the response I get back is MyCar Admin. [laughter] Now at this point I really don’t think this 00:28:34.947,00:28:39.585 is the admin because this has to be a low privilege account with a really important sounding 00:28:39.585,00:28:44.590 title after all we all know people like this. So I create another request to start my car 00:28:46.692,00:28:51.697 using this account, I hit send and I get back two hundred OK. And about three seconds later my 00:28:53.966,00:28:58.971 car starts right up. So it turns out that the MyCar admin account was an admin account. Hardcoded 00:29:01.440,00:29:07.512 into the mobile application. But it doesn’t start there, in the previous response you may have 00:29:07.512,00:29:12.718 seen this thing called API key. Again from monitoring uh traffic form man in the middle proxy I 00:29:12.718,00:29:17.322 know you can use these API keys in place of a username and password if you use you fixed 00:29:17.322,00:29:23.762 username API and one of these API keys you can authenticate SI user. So I copy and paste this, 00:29:23.762,00:29:28.867 this string into the password string on postman sent my username to API and I hit send. 00:29:28.867,00:29:34.473 And it doesn’t work, I don’t get back a response and I don’t know really what’s going on I’m a 00:29:34.473,00:29:39.578 little confused. I share it for probably a good five minutes and it dawns on me I forgot to strip 00:29:39.578,00:29:44.583 the quotes and coma from API key and looking at the response there is a sequel error. At this 00:29:47.252,00:29:51.757 point it’s apparent that you could j- could of just used basic sql injection to bypass 00:29:51.757,00:29:57.596 the entire login process and become the admin or any user you wanted. Like this is not at all 00:29:57.596,00:30:02.601 complicated. So let’s have some fun with sql injection, I don’t think anyone’s every started a 00:30:06.204,00:30:11.643 car with sequel injection before. So let’s try that. So I kept a sequel injection that 00:30:11.643,00:30:16.214 targets my user account, skips the whole password thing, we’ll just use sequel injection for 00:30:16.214,00:30:22.120 that, hit send I get back my, my status two hundred OK but this time I was smart enough to 00:30:22.120,00:30:27.125 record a video. Now it’s a little, the video’s a little uh dark because I didn’t realize I 00:30:31.329,00:30:37.235 was going to be doing this talk at that time so um, so if this works the car should start via 00:30:37.235,00:30:42.240 sql injection. Sorry one of these times I’ll get this right. Okay where is the window. And, 00:30:46.511,00:30:51.516 it, oh you have it here, and sent. So this is in my office looking outside. You can see the 00:30:58.123,00:31:03.061 reflection of my computer screen there. And there the car is starting. Okay so there we go. 00:31:10.569,00:31:15.574 We’ve started a car with sql injection. [applause]but it really doesn’t stop there they 00:31:23.315,00:31:27.119 didn’t just have sequel injection in the login, they had sequel injection everywhere, 00:31:27.119,00:31:31.490 whether it be the URL path, query string parameters bodies, it seemed like, everywhere you 00:31:31.490,00:31:37.863 looked there was sequel injection. And looking at the error messages from the se- from 00:31:37.863,00:31:42.701 looking at the sequel error messages we can see that what we are entering as a password is 00:31:42.701,00:31:48.874 being compared directly against a column named password in the database. So what this means is 00:31:48.874,00:31:53.879 they have plaintext passwords and sequel injection. As they say, not good, very bad. Okay so 00:31:58.550,00:32:02.187 that’s enough with that sequel injection stuff, let’s see what else we can do so as, as I 00:32:02.187,00:32:07.058 showed before here’s how you remote start a car, um you just post a command to this commands 00:32:07.058,00:32:13.398 API saying your command type of engine start and you get back an integer ID representing the 00:32:13.398,00:32:19.004 command ID, you can then pull service with uh, you can then pull service to get the status 00:32:19.004,00:32:24.910 of that command. And it looks something like this and so ya know I get to thinking and I 00:32:24.910,00:32:29.414 increment and decrement my command ID and I notice I get responses back seems to be 00:32:29.414,00:32:34.052 pulling any command ID, try a couple more values and sure enough it’s pulling back any 00:32:34.052,00:32:38.623 command ID in the sys- or any command that’s ever been sent in the system. Now there’s not 00:32:38.623,00:32:43.195 really anything sensitive here so it’s not really that big of a deal but I get to thinking maybe 00:32:43.195,00:32:50.202 there’s um a direct object preference that I can use to start my car. So I, take the 00:32:50.202,00:32:56.174 start command from a legitimate user for my user account and try to call it via my second user 00:32:56.174,00:33:00.512 account that shouldn’t have access. And I get back an error message saying four oh one 00:33:00.512,00:33:06.484 unauthorized, account out of hierarchy. So maybe it won’t work. However if you look at 00:33:06.484,00:33:11.590 that API there’s actually duplicate information. The user’s email address and their 00:33:11.590,00:33:17.495 account ID are roughly corollary but specify a user and if you design API’s or rather if you 00:33:17.495,00:33:24.469 pack API’s duplicate information is a source of bugs. In this case a developer could implement 00:33:24.469,00:33:30.775 this in, these four different ways. So if we look at cases two and case three both highlighted 00:33:30.775,00:33:35.714 in red, those will result in direct highlight reference both of those don’t properly check to 00:33:35.714,00:33:40.886 see if we’re authorized to run the command so what we can do so we tried case two it didn’t 00:33:40.886,00:33:45.223 work, what about case three? To try case three we simply have to change the account ID in the 00:33:45.223,00:33:51.196 URL. Previously we were using the victims account ID let’s just use the attackers account 00:33:51.196,00:33:58.203 ID. So I sent the account ID to be the attackers account ID rather than the victims, keep 00:33:58.203,00:34:04.542 the device ID as the victims device and send the command and sure enough, two hundred OK, I 00:34:04.542,00:34:10.682 get back my command status and a couple seconds later MyCar starts right up. So what does 00:34:10.682,00:34:15.754 this mean? So via three different vectors we were able to basically do everything a 00:34:15.754,00:34:20.392 legitimate user could do. But let’s call out what that is, we can locate any car in the 00:34:20.392,00:34:26.498 service, we can identify uh the type of vehicle it is, make and model, we can unlock the car we 00:34:26.498,00:34:32.904 can start the car, um we can edit the car, we can do anything. And three, there’s 00:34:32.904,00:34:38.443 three different ways of doing this. So obviously MyCar tried to fix some of this, um in the 00:34:38.443,00:34:44.149 case of the uh, hardcoded passwords it seems they just put a reverse proxy out in front of 00:34:44.149,00:34:49.154 the application to hide the credentials they were using. Well you see there’s a problem 00:34:49.154,00:34:53.692 with this, reverse proxies aren’t magic and they don’t’ fix everything and it in this case 00:34:53.692,00:34:59.030 they kept the sequel injection in the backing service and so while I no longer have the 00:34:59.030,00:35:04.536 password I still have, had no auth- that I still with no authentication could do sql 00:35:04.536,00:35:10.241 injection via the check user. So that was interesting and, at that point I decided okay let's 00:35:10.241,00:35:14.813 see what else is here let see if, they, they left more and the device registration still seemed 00:35:14.813,00:35:20.018 to have sequel injection and both of these things still seemed to be still seemed to be 00:35:20.018,00:35:25.023 vulnerable up until about thirty-six to twenty four hours ago so um, yeah. So googling 00:35:27.325,00:35:33.264 around you may have noticed all the URLs here are M to M suite dot com. And so I, I thought I 00:35:33.264,00:35:39.437 would take google and search for M to M suite. I came up with this um site. This must be some 00:35:39.437,00:35:44.909 type of back end interact for the MyCar system. And so obviously the only thing what 00:35:44.909,00:35:49.014 you do when they see this is throw a couple single quotes in there and see what happens and 00:35:49.014,00:35:54.019 of course what happens is you get sequel injection. [applause] And this is months after the 00:36:01.860,00:36:06.398 initial disclose uh that they had a problem with sql injection. Um so if you have 00:36:06.398,00:36:12.003 sequel injection you should really fix it as soon as possible. Um, but none of this 00:36:12.003,00:36:16.908 is what I consider to be the most offensive bit of this all and that’s actually has to do 00:36:16.908,00:36:22.180 with location. So MyCar has = GPS unit it can track the location of your car and in 00:36:22.180,00:36:26.651 their application they will gladly show you your car’s current location and that’s the 00:36:26.651,00:36:31.656 only way that this gets used in the application. Now if we look at their APIs it’s not just your 00:36:34.759,00:36:40.198 cars current location. They seem to be storing a heck of a lot of information uh much more than 00:36:40.198,00:36:44.703 what is needed to keep track of your car’s current location , In the case of my account over a 00:36:44.703,00:36:50.108 span of thirteen days they have a little under two thousand data points about my vehicle’s 00:36:50.108,00:36:55.580 location. None of this was disclosed in their privacy policy. But it gets worse than 00:36:55.580,00:37:00.385 that. Maybe you can argue this was a development mistake make this is a, this is a side effect 00:37:00.385,00:37:05.323 of the way the service is implemented There’s another API where they w- analyze your data 00:37:05.323,00:37:11.429 and instead of just have a list of places you’ve been they identify top locations your 00:37:11.429,00:37:17.135 vehicle has ben, frequent places you visit. Again to my knowledge this is not disclosed in the 00:37:17.135,00:37:21.539 privacy policy I can’t find anything there that would um indicate they were going to do 00:37:21.539,00:37:26.544 this. So maybe this isn’t that surprising though because after a bunch of searching I believe I 00:37:29.914,00:37:35.353 found the parent company of MyCar and their company called Procon Analytics and I went to 00:37:35.353,00:37:39.591 their site and I went to their frequently asked questions page. And, and looked at the question 00:37:39.591,00:37:45.763 how do you secure data? And to this they said, unlike public cloud environments that battle 00:37:45.763,00:37:51.603 for priority Procon Analytics uses virtual private cloud that supports only our customers and 00:37:51.603,00:37:57.642 application with no interference from other users this dedicated highly secure environment 00:37:57.642,00:38:01.779 ensures high availability, faster deliverability of service, when you partner with 00:38:01.779,00:38:08.653 Procon Analysts you can be assured your data is secure and protected. I really don’t even 00:38:08.653,00:38:13.658 know what to say to that. [laughter] But if we head over to their Facebook page, they say 00:38:15.960,00:38:20.965 more. There they simply say, protecting vehicle data is vital. And to that I have to 00:38:24.102,00:38:29.107 say, I agree. So back to the question that, that I said at the beginning of this talk. How 00:38:31.709,00:38:36.481 does this happen? And maybe more importantly as an industry how do we stop this from happening 00:38:36.481,00:38:41.486 again? And so that’s my talk and at this point I’ll take any questions you have. [applause] 00:39:08.279,00:39:12.050 [inaudible audience question] Kay so the question is did they fix everything? At this point, I 00:39:12.050,00:39:17.422 believe everything I reported is fixed on the MyCar side with the exception of the privacy stuff I 00:39:17.422,00:39:22.427 mentioned at the end, last I checked that was all still the case. [inaudible audience 00:39:27.665,00:39:31.636 question] I don’t know, I don’t have any vectors that I know of that generate sequel error 00:39:31.636,00:39:36.641 messages though I haven’t looked too hard. [inaudible audience question] Could you come closer 00:39:43.181,00:39:48.186 so I can hear you? [inaudible audience question] Sure um so I said I could edit the car, the 00:40:00.965,00:40:04.769 question about was well you said you could edit the car could you edit the paraments in like the 00:40:04.769,00:40:10.808 ECU. Um, what I was specifically referring to there was editing the car in the MyCar service so 00:40:10.808,00:40:14.979 they keep a digital representation of your care, um and so that could have been 00:40:14.979,00:40:19.984 edited via the direct object preference sequel injection or any of the other vectors 00:40:24.255,00:40:29.260 discussed. [inaudible audience question] So the question was about do you have a push button 00:40:31.929,00:40:36.200 start system will slow you to unlock the steering wheel to get around the steering wheel lock 00:40:36.200,00:40:41.773 so my, may car has a push button and there is no steering wheel lock so I suspect if you 00:40:41.773,00:40:45.743 installed one of these in a push button car you definitely couldn’t rely on a steering 00:40:45.743,00:40:50.748 wheel lock. Cool, thank you. [applause]