start	end	text
560	7500	So, hi, I'm Patrick Kiley, Senior Security Consultant at Rapid7, and I did some research on CAN bus and avionics.
9540	14140	So, I'm going to skip over the avionics primer. I can go over that over there.
14400	19100	Everyone knows kind of the components of an airplane. If you don't, I'd be happy to educate anyone that wants to.
19100	20820	I'm just going to go into CAN bus.
20820	30700	So, CAN bus is a shared medium. It was typically seen in transportation, so automotive.
31540	39700	It's insecure by design. The idea is you want it to be fast, you want it to be lightweight, you want it to be resistant to interference.
39820	45680	But once you have access to the CAN bus, you can do anything that any other device on the CAN bus can do.
45680	49420	And I had the idea a couple years ago when I was at an aviation event.
49460	55340	They were talking about some modern avionics they were putting in a system and how it used CAN bus.
55340	57720	It was really easy to hook up. It only used two wires.
57820	62460	I had already done some research in automotive. I knew the problems with automotive CAN bus.
62620	69640	And I said, I have a pretty good idea that this is going to be subject to the same vulnerabilities that exist in CAN bus itself.
69640	72420	It's the nature of how CAN bus is created.
73220	78360	And basically what it means is once you have physical access to the CAN bus, you can do whatever you want.
80000	86380	Incidentally, the other thing when I was doing the research, I was like, okay, has anyone done any research on CAN bus in avionics with regards to security?
86380	93920	There's very little written about it. In fact, I couldn't find any really good security documents about any of the aviation protocols.
93920	104040	So another thing that we wanted to come up with and show is that if this exists in this medium, what about the other protocols?
104040	108900	Let's get some security researchers involved. Let's get the community to look at the other protocols that are out there.
108900	113860	Airing 429, 629, there's Ethernet used all over the place in aircraft.
114060	119140	Let's get the community involved, the people that are actually attacking stuff, instead of just the engineers designing it.
119140	127380	So we can have the engineers design it, we can have our types, the hackers, do bad things, and then the engineers will be able to go back and make the systems more secure.
127380	131600	And hopefully we won't have any bad things happen on the aircraft that are out there.
131920	134940	Yeah, there's Rob.
135060	139680	So, jumping right in, hacking avionics via CAN bus.
140080	148400	So, yes, you have to have direct physical access to the CAN bus, or you have to compromise the device that's on the CAN bus.
148400	153160	Now, the vectors that people have exploited to get into the cars, they've gone into the infotainment systems.
153160	156220	They have Wi-Fi, Bluetooth, LTE.
156720	163620	Well, the avionics kit that I've built actually has Bluetooth and Wi-Fi, so there's one particular access vector there.
163660	165380	And then there's physical access.
165740	172760	The whole point is physical access should not be our only control, because if that's your only control, that's a single line of defense, it's not defense in depth.
172760	181420	And we want something that's flying in the sky to have more than just one physical control around the bus that's controlling everything in the aircraft.
181840	189100	So the idea is you get something small like a Raspberry Pi or a car loop that has some telemetry interface, you attach it to the bus,
189100	195340	and then you either transmit messages to it wirelessly, or you wait for a particular event to occur.
195340	202180	So you're already on the bus, you can read data, you wait until you're at a particular altitude or a particular airspeed or over a particular location,
202180	205380	and then you trigger an event and bad things happen.
205840	213380	You know, if a bad guy were going to do something really horrible on an aircraft, I would think that this type of attack would be very difficult to detect.
213580	220140	Whereas, you know, the more kinetic effects are much more obvious and are going to generate a different kind of investigation.
220360	223420	But we want to get ahead of this, and that was kind of the purpose of all this.
223620	227880	So, we have some example CAN bus messages right here.
227880	233480	If you see on the right, we have the arbitration ID, that's like your network address for CAN bus.
233620	239060	And we have a preamble in hex of D4714.
239720	243740	That identifies on this particular system I have back here, the oil pressure.
244180	249520	And it's in little Indian, so the most significant byte is on the right instead of on the left.
250980	254920	And as the oil pressure decreases, the value goes up.
254920	257820	It's backwards. I had to throw this in there.
257820	262440	So, as our oil pressure is going down, the value of the oil pressure is actually going up.
262440	265880	And the reason why is because it's inverted.
267740	273060	Anyway, fuel level. This one is actually increments normally.
273180	277700	So, same arbitration ID, 10342200.
278820	284360	Same first two bytes, D47, but now it's 11 instead of 14.
284360	291120	So, 14 controls oil pressure, same controller 11 in the preamble controls fuel level.
291380	295300	And the same thing, we can actually hack both of those. I'll give you a demonstration of this right after.
296280	299980	So, how do we spoof messages? Normally this is where I jump into a demo.
300260	304000	This is a particular piece of software called Vehicle Spy.
304460	309320	Once you've actually reverse engineered the message, all you have to do is inject those messages onto the wire.
309320	314080	And now you'll either show a higher fuel level than what you actually have, or a lower fuel level.
314080	319820	Same thing for oil pressure. You'll actually be giving incorrect results to the instruments.
319820	324620	And there's no real way to detect that. It'll just show a false signal.
325840	329960	Autopilot. Something a little bit more substantial and immediate.
330760	335540	The autopilot servos on the system back there use a different arbitration ID.
335620	343920	And there's just one single message with three bits that DC0103 turns them on, DC0100 turns them off.
343920	349600	And then there's a steady state message of DC0C. That just basically means nothing's changed.
349800	353300	And that's all you need. You do that and it'll actually engage the servos.
353300	359480	Now, any aircraft that I've seen that has an autopilot, you press one button and it's autopilot disconnected.
359980	366340	Flashes a warning. But with this, you can continuously send these messages on the wire and that disconnect will not do anything.
366340	373960	You'd actually have to physically pull the breaker that's connected to the autopilot and sit there and try and manually fight the servos.
374260	378500	And oh, and by the way, we can actually control the amount of torque that's going to the servos as well.
378500	388400	That's also sent over the CAN bus and could potentially make it, depending on how the particular aircraft is designed, make it very, very difficult to try and overcome.
389840	396060	Okay, so this particular system had a really unique way of handling complex messaging.
396380	402880	We have the AHRS. That is the instrument that indicates the aircraft attitude in flight.
402880	408020	It's called Attitude Heading Reference System. It's basically like the old gyros.
408020	412860	So when you're straight and level, it'll show on the glass panel that you're straight and level.
412860	417140	You pitch up, it'll show as in the artificial horizon, it'll pitch up.
417140	425860	There's one instrument that controls that. It also has the inputs for the airspeed, the static, and angle of attack if you decide to configure an aircraft with that.
426960	432140	This one is different. It uses a single arbitration ID as a header, and it's easier to show you over here.
432140	440660	So we have arbitration ID 10242000 with the 5th byte over 3C being the message size.
440660	450700	Then another arbitration ID 10242100, and then 60 bytes of payload as a bunch of separate CAN messages.
450700	458740	This is very non-standard for CAN, but the point is, even though there's some obfuscation here, I was able to figure it out and reverse engineer it.
458740	465140	All the messages for heading, for altitude, for airspeed, are hidden in this message that comes on every so often.
465340	467160	So, how would you attack this?
468140	479840	You read the header in, store the message size variable, read the subsequent data frames in as an array, modify the bytes that you're going to change, and dump it immediately back out onto the wire.
479940	486540	The nature of CAN bus in any type of telemetry system is the last message in is the most relevant and is the one that will be displayed.
486540	492500	So, if you're beating the actual instrument with messages on the wire, you're going to be, it's going to be your value.
492500	496580	The one that you've injected is the one that's actually going to display on the instrumentation.
496920	501700	So, I'm in the process of actually having, of reverse engineering this.
501700	506880	I've figured out what all the parts of the message are. I just have to write some custom software to inject it back out there.
507620	511160	Um, and this type of attack is the really dangerous one.
511160	517420	If you're talking about someone who's an IMC and you don't have, you know, a backup instrument that you're immediately referencing and noticing,
517420	520240	you could be flying at a different altitude than what you actually think you are.
520240	522340	You could be pointing at a different attitude than you are.
522400	526020	Um, and it really makes the attack scenarios pretty scary.
527260	529940	Um, so, set of recommendations.
530660	533320	Don't rely solely on physical controls.
533480	537160	Um, this, just, you introduce a single point of failure here.
537160	542760	Um, there's a secure CAN bus specification that's out there.
542760	544720	It's, it's pretty new in the automotive industry.
544780	548700	But, since autonomous vehicles are becoming a thing, it's, it's getting a little bit more traction.
548960	552340	In avionics, this is what we should have, uh, defaulted from, from the standard.
552340	555680	It's, uh, specification of secure onward communication.
555680	563040	It's not a perfect protocol, but it makes the attacks that I presented here orders of magnitude more difficult for an attacker to pull off.
563040	565600	Because now you have crypto involved.
565820	567640	You have authentication of the payloads.
567640	574760	If a device receives a message that doesn't have the proper, um, authentication token with it, it's not actually going to do anything.
575040	578080	Um, and then, implement a security gateway.
578080	580440	That's already present on cars today.
580480	585940	Separate your attack surface area, your Wi-Fi, your Bluetooth, your LTE, from your CAN bus.
585940	588760	And have a security, separate security device in between those two.
588760	591140	On a vehicle, that's called a security gateway.
591140	597480	It's already designed to operate real time, so the car is not affected by this being in the mix.
597680	600740	And then, separate your, your functions of CAN bus.
600820	604860	Um, put your autopilot on a separate bus from your engine controls.
604880	607480	You know, your engine controls are in something that's more accessible.
607520	610820	It's easy to, you know, open up an engine compartment and tamper it and get into that.
610820	614940	Whereas your autopilot, it's, it's more difficult to get at those servos or anything else.
614940	618260	And those are two separate functions that are entirely different.
618260	621440	And so, if you separate those, you've got them on separate buses.
621440	627020	And overall, you have more to attack to actually conduct a successful attack against a system like this.
627500	631080	Okay. Thank you. I know that was really brief. We only had 15 minutes here.
631080	634460	So, uh, at this point, I'm gonna go to questions. Anyone have any questions?
641310	643510	Um, the stuff I talked about here.
643510	652370	So, implement a system. So, kind of the whole point of this is CAN bus, it doesn't appear to be widely adopted yet.
652370	654790	It's, it's in the system that I have built out there.
654790	657830	There are some other systems, because we looked at two separate manufacturers.
657830	659910	They both suffer from the same issues.
659910	661890	Don't rely solely on those controls.
661890	664870	Put some additional security controls on your CAN bus.
665670	666610	Migrate to this.
666610	669970	The existing hardware is supposed to support SECOC.
670390	673530	Um, and implement a security gateway.
673530	676370	That's something that can be retrofitted into existing systems.
676430	679090	You have your devices that actually have Wi-Fi and cellular.
679090	683750	And you can migrate those from the flight critical components of the system.
685190	687370	Okay? Any other questions?
688490	689250	Alright, thank you.
689250	692050	For those who want to join me, I'll be right behind you with the avionics.
692050	693890	And I'll actually demonstrate some of these techniques.
694930	695690	Okay.
696130	696890	Applause.
