start	end	text
1100	5080	Hey, hello world. It's your boy Brent, back with another talk on hacking cars.
5500	7720	Last time we talked about how we automate the hack.
7720	11520	This time we're going to talk about how to stop the hack automatically.
11760	18660	So without further ado, this does not reflect any opinions of the government, the military,
18660	21860	and any photos or cited papers that are shown in the talk.
21860	24700	Those, of course, belong to their original copyright holder.
25180	27020	And so let's talk about the threat.
27020	32800	All right, so if we spoof the acceleration brakes and the parking assist to control the steering,
32800	39200	we can get into a pretty dramatic situation where, let's say, a cyber criminal starts a three-way call with a mother.
39600	44100	Their teenager is in the car. They say, Mom, the car won't slow down.
44340	47740	And all of a sudden there's a new strange voice, maybe a computer-automated voice,
47740	54100	that says you have three minutes to send me $10,000 using the link in the text message I just sent you.
54100	58140	If you don't comply, I will crash this car at 110 miles per hour.
58460	63920	The attacker disconnects, leaving the scared mother on the line with their teenager,
63920	67420	who's about to possibly die from this exploit.
67760	70220	This is not necessarily a fictional scenario.
70780	74640	Surely you've probably heard of Chris Miller and Balasek's hack of the Jeep.
74800	76700	So this is already something that's happened.
76700	80400	And as cars get more and more automated, more and more connected to the Internet,
80400	82600	this is a threat that will continue to happen.
82600	85060	So how do we stop it? Let's use offense.
85060	91000	Offense is the best defense. We can specifically do bit smashing to stop the attacker in their tracks.
91020	95900	What it turns out is actually if you look at it, these control protocols that are in cars,
95900	100480	while they may seem super insecure, with a very small and inexpensive change,
100480	102580	we can achieve almost perfect security.
102580	106140	I'll get into that. I understand it's a very bold claim to make,
106140	111560	but it's pretty surprising how elegant and well this defense method would work.
111560	115800	So it will stop your denial of service, which is typically thought to be unstoppable.
115800	119160	In these control network situations, it will stop spoofing.
119440	123280	And this will work for a lot of the control networks that are multicast,
123280	128900	which means one sender sends a message and nearly all or all of the other devices on the network
128900	130500	will receive that message.
130680	134820	And the ones that it's not intended for will simply ignore it while it's on the wire.
135200	140540	One other nice benefit of this, particularly for cars, is you no longer need an intrusion detection.
140540	144620	It works out that the way that this defense is implemented,
144620	150940	you achieve effectively perfect intrusion detection without any sort of complicated machine learning or AI.
150940	152400	It just works.
152640	155060	All right, so what is bit smashing, first of all?
155060	162020	Let's say agency on the network wants to send a payload of hex A, and they're the fraud.
162020	166240	They're the attacker trying to send some malicious data on the network.
166240	173500	Now they're sharing a physical wire with all of the other nodes in the vehicle or in the multicast control network.
173700	177060	So B is our valiant hero who wants to stop this attack.
177080	179260	So B wants to stop C in their tracks.
179260	183740	What B will do is while the voltage is still going up and down on the wire,
183740	186520	as C tries to transmit their message,
186520	190980	B in real time can stop that transmission while it's in progress
191480	195340	by putting extra voltage on the wire that C is not expecting.
195340	200160	And what this will do is essentially smash the logic that C is trying to send,
200160	202660	and B will take over the communication on the bus.
202700	206280	C will stop talking, and then the attack is stopped.
206360	210520	So as you can see here on the left, C is sending 01010,
210520	215980	and by B sending that extra logical one, that extra amount of voltage at a certain time segment,
215980	218580	they effectively stop C in their tracks.
218820	220060	So that's bit smashing.
220420	222420	Now, I'm not the chef here, okay?
222420	227760	Last time we talked, the previous talk called Reverse Engineering, 17 Cars in Under 10 Minutes.
228220	230680	In that, I was a chef and your waiter.
230720	232360	In here, I'm not the chef.
232460	236100	This, I did not come up with the solution, and it's actually pretty well documented.
236260	239900	In particular, this article you see in the green on the top right,
239900	245660	that 2017 academic proof of concept, which was in the IEEE Vehicle Magazine.
245800	249440	I encourage you to grab a copy if you get a chance. Check it out.
249440	254880	It's a very clear explanation of how the process works beyond what I'm talking about here.
254880	259320	And then also, they show you the hardware they used to actually implement this proof of concept.
259320	266220	That way, you can try this out yourself and tinker around without having to burn any sort of custom hardware.
268340	273240	One part of this security that is not perfect is we're not getting confidentiality.
273240	274900	Okay, this is still a control network.
274900	279480	We're still basically talking in an open room where each person is a member of that room.
279480	282900	And when they project their voice, no matter how loud you want to talk,
282900	285660	you're not going to stop the fact that that other person is talking.
285660	287260	Everyone else will still hear them.
287920	292580	So you're not going to get confidentiality in an open room talking to other folks.
292580	295680	But what we do get is integrity and availability.
296120	300640	So integrity, am I sure who sent this message? Is the person I think it is?
300640	303320	And then, is this the message that they originally intended to send me?
303320	306660	Has it been modified? There's no man-in-the-middle business going on.
306880	309600	And then for availability, that's your denial of service.
309600	314660	Can I talk in the network when I want to talk on it? And is it behaving how it's designed?
316040	320360	All right, so to give a little bit more context, we are not talking about general use networks.
320360	326040	And here, I mean like the internet, Wi-Fi, anything where you can add or remove endpoints
326040	331940	and adjust the structure and the number of participants in the network dynamically.
331940	335360	And you don't need to make any adjustments. It just naturally works out.
335440	337440	That's not what we're talking about here.
338860	343000	We actually gain a lot of benefit by not having this because here in the general use network,
343000	347380	there's no way of necessarily knowing how many participants are on the network.
347380	354200	So when you see new data go on the network, it's unclear whether they are a legitimate user and member of the network or not.
354200	360160	Additionally, there's tons of metadata for keeping track of which messages are where, who owns what,
360160	367260	and spoofing that metadata is just one more attack vector to make it even more confusing to know the origin of a message.
367680	369400	Here, we're talking about control networks.
369400	373800	Okay, so medical electronics, vehicles, obviously in this case, CarHack Village,
373800	377600	but planes, trains, automobiles, factory floors, you name it.
377600	381300	So control networks, you're not trying to add or remove hosts very often.
381300	386860	You pretty much know the machines and components that you want to communicate, and that's a fairly fixed number.
387000	391060	Maybe you might add one or two every couple years, and you can document that.
391060	392720	It's a very deliberate process.
392960	394660	And you also lose metadata.
394920	399460	And so in this case, it actually goes for a benefit here because now there's even less information.
399720	401260	The attacker has a spoof.
401260	407080	They basically have to talk in the wide open, and there's not a lot of extra information that they can lie about.
407080	410500	They simply say, I'm this person, and send their information.
410960	416600	And if there's already someone that says, hey, that's my name, so who are you?
416600	420620	It becomes very clear and evident that that person is not who they say they are.
420620	422920	That node is not legitimate.
423920	425880	So what does this look like in practice?
425880	430000	If A wants to send some information, they send it over the bus.
430100	432900	Again, this is multicast, so everyone gets a copy.
432900	436720	And if you look at this wiring harness from a vehicle, it might look something like this,
436720	441520	where it originates at one point of that wire, and then it gets sent out to multiple other endpoints.
442080	447020	Now, granted, in vehicles, there's a lot of things like gateways, which effectively create collision domains,
447020	453120	or if this term is more familiar to you, subnets, even though it's not strictly subnetting.
453480	457820	So sometimes these gateways, you don't necessarily see the entire bus on the vehicle.
457860	459660	We'll get to that, but that's not a problem.
459660	462460	As a matter of fact, it actually goes for a benefit even more.
463180	465040	So what is the problem?
465240	471620	So because I have this multicast nature, and let's say I've got my instrument cluster talking to some other piece of information,
471620	473800	I may also have a telemedics unit.
473840	481280	I may have an entertainment system that has a SIM card in it, where I pay for Wi-Fi connection to my vehicle.
481280	486220	That way, I have in-vehicle Wi-Fi. I can update my maps, whatever reason you want to be connected.
486220	491960	Or for example, the Tesla business model, which is instead of having to recall vehicles,
491960	495580	and it's a very expensive and time-consuming process, I can do a lot of things,
495580	502720	over-the-air software updates to change the behavior of the car, in which case a data connection is mandatory to do that.
503280	506780	So again, we've got some sort of internet connectivity to the vehicle.
506960	514060	Now these systems, which were designed to be pretty insecure, there's no cryptology, there's nothing, really no authentication,
514060	518500	but it used to be air-gapped, so it was okay, now it's no longer air-gapped.
518500	521000	Now we've got attackers that can reach these networks.
521060	523540	So let's assume the attacker has done so.
523560	528400	One way or another, they've gotten onto our control network, and they can modify our brakes,
528400	531480	they can turn off our accelerator, they can turn off whatever,
531480	536260	possibly even take control if we have that power steering module, and we're in a lot of trouble.
536260	538160	So we want to stop that from happening.
538160	542240	One thing the attacker can choose to do with a pretty dangerous attack,
542240	549920	simply pick a high-priority message identifier that no one else is using, and just spam that as quickly as they possibly can.
549920	557060	Essentially, you turn off all communications, and now you've got no steering, no acceleration, no brakes, you're just dead in the water.
557340	564780	So if you look at the Wired article, for when Miller and Balasek did the GPAC, they probably did something similar to this.
564780	568960	The other situation is a little bit more nuanced.
569100	576120	You've got a specific packet you want to send to a specific location to fool that part of the network,
576120	578760	and you simply just say, I'm this person.
579060	585440	And right now, the way it goes, even if B can see this happening, Module B here, there's really nothing they can do about it.
585440	592640	They just have to grin and bear it that someone else is using their ID that they know should not be used by anyone else,
592640	594320	and the attack simply happens.
594320	599800	B can try to send messages all they want, but now you just get into basically dossing the network all over again
600320	604940	when you get into a fight of the legitimate B versus the attacker acting like their B.
605120	608520	So we want to stop denial of service, and we want to stop spoofing.
608980	613240	So here's the solution. We're going to bit smash those communications.
613420	620640	So again, bit smashing is adding that extra voltage on the wire, physical layer, in order to stop that communication or take it over.
622060	625880	We're going to focus on cars here, obviously, because it's CarHack Village.
626060	631300	But again, this is a fairly generic process, but here we've got the machine and its logic.
631300	633940	So in this case, the actual physical brake caliper.
634000	641820	There's going to be some internal wiring and control there to actually squeeze onto the disc brake and slow the car down.
641820	643880	That's part of the machine logic.
644660	648860	The vast majority of the cost of that component is that machine and the logic.
649420	651940	Touching that is what's called a CAN controller.
651940	661660	That's a piece of little chip and or software within the bigger logical board that actually implements the controller area network protocol.
661700	667800	So what order do I send things, how do I interpret messages, how do I synchronize with the network clock, etc.
668080	671940	And then separate and distinct from that, once more, is the CAN transceiver.
671940	680280	And that's the piece that actually implements the layer one electrical engineering to talk on the wire.
680280	684940	So how do I actually make a waveform and create voltage on the wire to communicate.
685220	691360	So in either case, I can leave alone all the design that I'm doing for my main machine,
691360	698360	and I could just modify that commercial off-the-shelf product, that CAN controller, or the CAN transceiver, or both.
698360	703800	If I modify one of those to implement bit smashing, then the manufacturer really doesn't have to care.
703800	707740	They can just buy that product off the shelf, attach it to their existing product.
707740	711600	There's really nothing else that they have to do, and you get the security.
711720	720480	So it's extremely low cost. These CAN controllers and transceivers, we're talking less than a dollar most of the time, if not pennies, to do this.
720480	732160	And if we assume that that costs quadruples, to add the bit smashing capability, we're talking about $0.20 versus $0.80 to get a completely secure solution.
732660	742180	One way of thinking of this, if you have any background in security, is this is doing intrusion detection and prevention using a decentralized access control list.
742180	748080	So if every endpoint knows what their name is, and they'll bit smash anyone else that tries to use that name,
748080	755240	essentially you get an access control list, that way stopping any sort of traffic does not pass that check.
756060	762160	Alright, so here I am, B, our hero, once more, good boy, and he's watching the bus.
762160	769360	And I'm watching the attacker send some information, and the way I know he's an attacker is I'm watching him send bits on the bus over time,
769360	778100	and I'm processing this in real time, I see that, hey, you just used my ID, that's not okay, I'm the only one that gets to use that ID on this bus.
778260	784840	So now I've got a long time, relatively speaking, to react and actually bit smash.
784840	799540	There's about up to 80 or so, possibly even more, clock cycles, or bus cycles, should I say, of the clock going, clock increments, to have an opportunity to bit smash.
799540	808760	So even if it takes a little bit of processing to actually decide, okay, yep, they used my ID, I'm going to use this clock cycle to figure out, yep, I definitely want to bit smash.
808760	821100	And then in here, either the CRC or the data, I can just start holding the voltage high, I will bit smash that transmission, all of the members of the network will throw out that message,
821100	826720	and they will even store it in memory, they won't even transmit it up to that higher component that they're supporting.
826720	834220	It will stop at that CAN controller. So one time I just want to emphasize, if we're trying to, say, spoof or attack that brake,
834220	847920	the brake won't even realize an attack is happening, because it will stop at that controller chip, or logic, and it won't even make it to the part of the control unit that's actually working the brake.
847920	849620	It won't even realize it's happening.
851280	859220	Alright, so the way that would look, the telematics unit, if we say that's the source of the attack, tries to send a message, before it even makes it to A,
859680	867800	control module B, our hero, says, two B's? No way, not two B's, there can only be one, okay, I'm the only B.
868780	881960	We get this out of benefit, okay, with CAN in particular, anytime that an error occurs while you're trying to transmit, by the way controllers are supposed to be implemented to meet the CAN standard,
881960	888480	if a fault happens while I'm trying to talk, I essentially get a hit against an internal counter that I have.
888480	897820	We'll call that a fail state counter, saying something went wrong, possibly me, maybe I'm defective, and I'm going to keep track, or I'm going to try again.
898020	907320	Well, as B continues to bit smash me when I use its ID, eventually I'm going to exceed that threshold, and I'm going to go into what's called a fail silent state,
907320	912940	which essentially means that I will continue to listen to the network, but I will not send messages.
912940	921880	And so if you're the attacker, and you're trying to communicate with this car through the internet, and you've got some traffic, and you're seeing the traffic go,
921880	929340	even better is not only do I stop that attacker from physically being able to transmit on the bus, but the attacker may not even realize that they're stopped,
929340	937000	because they're still seeing the traffic come in, and they cannot necessarily get acknowledgments that their transmission was successful or not,
937000	942260	depending on the logic between the machine and the controller that it's attached to.
942500	949960	So the controller may or may not actually communicate that it's gone into a fail safe state, because it's failed, it's just not doing anything.
950360	957980	So not only do we stop the attacks, whether that's denial of service or spoofing, but we've essentially done a DOS attack against the attacker's node,
957980	960600	and turned them off for some period of time.
961380	968420	A couple assumptions to actually make this happen. So each endpoint needs to have a unique ID on this multicast network.
968420	973180	So if you have multiple possible people using the same ID, then that's a problem.
973220	978720	Because now it's unclear, if I see that ID on the network, should I bit smash it or not?
978720	981940	So every endpoint needs to have a unique ID.
982860	988760	Gateways, okay, so if I have everything in my engine compartment, for example, going into a single gateway,
988760	994760	and then that gateway talks to other parts of the vehicle, like brakes or something like that, or your tachometer,
996380	1005320	that essentially creates two different parts of the CAN bus, and nodes on either section may or may not be able to see traffic from each other.
1005380	1007740	So now you've got back into the same situation.
1007740	1014520	Well, if this node over on this section of the network is supposed to bit smash these IDs being generated on another section,
1014520	1024760	but the gateway isn't forwarding that, it's not being a transparent, basically a bus, instead of a switch, then how do I stop that?
1024760	1026980	Well, you just reverse the logic.
1026980	1034600	So if endpoint logic is, I'm going to allow all traffic except my ID, if I see my ID, I'm going to bit smash it,
1034600	1036740	you flip-flop that logic for gateways.
1036740	1042220	I'm only going to allow this set of IDs, and I'm going to bit smash anything that doesn't make sense.
1042220	1050520	And that access control list, if you want to call it that, can be specific for each section of the network that it's physically connected to.
1050940	1056120	What that allows you to do is, going back to the denial-of-service attack example,
1056120	1063940	with CAN, I could just pick the highest priority arbitration ID possible, according to the protocol,
1063940	1069200	and more than likely there's not going to be a device on the network that's using that arbID,
1069200	1073620	so if the gateways weren't implementing this, then they would just be able to DOS the network.
1073780	1077600	But by having these gateways, looking to say, I know what arbID should exist,
1077600	1081820	and you're using something that's outside of that list, I'm going to bit smash you,
1081820	1085660	and then again we go into, alright, now we've turned off the attacker's CAN controller,
1085660	1090380	they can no longer talk, it's not a problem, and the message is never finished anyways,
1090380	1095700	so the overhead imposed on the bus is really not that bad.
1096360	1103780	And then finally, one talk, if you watch a lot of the talks that Miller and Balasek gave a couple years ago,
1103780	1114420	is a lot of these ECUs, the nodes on a vehicle, will accept reprogramming commands while driving at freeway speeds.
1114420	1119580	There's really no logic to check, should I be allowing a reprogram to happen or not?
1119580	1121320	They just simply accept it.
1121320	1128580	So one small tweak that would need to happen, either in the CAN controller or possibly that more expensive component piece,
1128580	1135240	is to add just a little bit of extra on that state machine to say, hey, I'm getting the signal,
1135240	1140840	or I'm seeing that we're not in park, so I'm not going to allow a reprogram to happen,
1140840	1143500	you need to put the vehicle in park before that happens.
1144180	1151860	And then finally, we've got to make sure that the controllers are just not rewritable chips.
1151860	1156660	So that imposes some recall issues if one of these transceivers starts bugging out.
1156660	1158640	You will need to go back to the shop.
1158640	1164640	But this basically makes it impossible, just like we wouldn't want to reprogram the logic for the larger component,
1164640	1169020	if we have these very powerful bit-smashing controllers or transceivers,
1169020	1175220	we do not want to open up the opportunity for those to get reprogrammed and then used to just hold the bus high,
1175220	1177620	and then there's really nothing anyone can do about it.
1177620	1182800	You're just putting voltage on the wire, and there's no workaround for that.
1182800	1188700	So we don't want it to be rewritable, but we do want them to continue to comply with that fail silent state.
1188740	1192960	All CAN controllers should comply with that, if they're compliant with the CAN protocol.
1192960	1199540	And then again, other multicast protocols typically have similar fail states.
1199980	1206940	But I'm not going to speak that I know for sure for every possible multicast ICS protocol.
1208400	1213420	Thanks so much. Just again, references, if you want to look into this deeper,
1213420	1218800	please check out the IEEE Vehicle Technology Magazine from 2017.
1218800	1221460	Go ahead and grab a copy off of IEEE Explorer.
1221460	1228120	And these guys did a pretty good job of really breaking it down and showing photos of how they created a working version of this
1228120	1233080	without any sort of special hardware or production manufacturing capability.
1237360	1240360	All right, with that, I'll open it up to questions. Thank you.
