WEBVTT

00:00.560 --> 00:07.500
So, hi, I'm Patrick Kiley, Senior Security Consultant at Rapid7, and I did some research on CAN bus and avionics.

00:09.540 --> 00:12.560
So, I'm going to skip over the avionics primer.

00:12.560 --> 00:14.140
I can go over that over there.

00:14.400 --> 00:16.320
Everyone knows kind of the components of an airplane.

00:16.320 --> 00:19.100
If you don't, I'd be happy to educate anyone that wants to.

00:19.100 --> 00:20.820
I'm just going to go into CAN bus.

00:20.820 --> 00:25.340
So, CAN bus is a shared medium.

00:25.340 --> 00:30.700
It was typically seen in transportation, so automotive.

00:31.540 --> 00:34.120
It's insecure by design.

00:34.120 --> 00:39.700
The idea is you want it to be fast, you want it to be lightweight, you want it to be resistant to interference.

00:39.820 --> 00:45.680
But once you have access to the CAN bus, you can do anything that any other device on the CAN bus can do.

00:45.680 --> 00:49.420
And I had the idea a couple years ago when I was at an aviation event.

00:49.460 --> 00:55.340
They were talking about some modern avionics they were putting in a system and how it used CAN bus.

00:55.340 --> 00:56.400
It was really easy to hook up.

00:56.400 --> 00:57.720
It only used two wires.

00:57.820 --> 00:59.980
I had already done some research in automotive.

00:59.980 --> 01:02.460
I knew the problems with automotive CAN bus.

01:02.620 --> 01:09.640
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.

01:09.640 --> 01:12.420
It's the nature of how CAN bus is created.

01:13.220 --> 01:18.360
And basically what it means is once you have physical access to the CAN bus, you can do whatever you want.

01:20.000 --> 01:26.380
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?

01:26.380 --> 01:27.840
There's very little written about it.

01:27.840 --> 01:33.920
In fact, I couldn't find any really good security documents about any of the aviation protocols.

01:33.920 --> 01:44.040
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?

01:44.040 --> 01:45.880
Let's get some security researchers involved.

01:45.880 --> 01:48.900
Let's get the community to look at the other protocols that are out there.

01:48.900 --> 01:53.860
Airing 429, 629, there's Ethernet used all over the place in aircraft.

01:54.060 --> 01:59.140
Let's get the community involved, the people that are actually attacking stuff, instead of just the engineers designing it.

01:59.140 --> 02:07.380
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.

02:07.380 --> 02:11.600
And hopefully we won't have any bad things happen on the aircraft that are out there.

02:11.920 --> 02:14.940
Yeah, there's Rob.

02:15.060 --> 02:19.680
So, jumping right in, hacking avionics via CAN bus.

02:20.080 --> 02:28.400
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.

02:28.400 --> 02:33.160
Now, the vectors that people have exploited to get into the cars, they've gone into the infotainment systems.

02:33.160 --> 02:36.220
They have Wi-Fi, Bluetooth, LTE.

02:36.720 --> 02:43.620
Well, the avionics kit that I've built actually has Bluetooth and Wi-Fi, so there's one particular access vector there.

02:43.660 --> 02:45.380
And then there's physical access.

02:45.740 --> 02:52.760
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.

02:52.760 --> 03:01.420
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.

03:01.840 --> 03:15.340
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, and then you either transmit messages to it wirelessly, or you wait for a particular event to occur.

03:15.340 --> 03:25.380
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, and then you trigger an event and bad things happen.

03:25.840 --> 03:33.380
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.

03:33.580 --> 03:40.140
Whereas, you know, the more kinetic effects are much more obvious and are going to generate a different kind of investigation.

03:40.360 --> 03:43.420
But we want to get ahead of this, and that was kind of the purpose of all this.

03:43.620 --> 03:47.880
So, we have some example CAN bus messages right here.

03:47.880 --> 03:53.480
If you see on the right, we have the arbitration ID, that's like your network address for CAN bus.

03:53.620 --> 03:59.060
And we have a preamble in hex of D4714.

03:59.720 --> 04:03.740
That identifies on this particular system I have back here, the oil pressure.

04:04.180 --> 04:09.520
And it's in little Indian, so the most significant byte is on the right instead of on the left.

04:10.980 --> 04:14.920
And as the oil pressure decreases, the value goes up.

04:14.920 --> 04:16.160
It's backwards.

04:16.380 --> 04:17.820
I had to throw this in there.

04:17.820 --> 04:22.440
So, as our oil pressure is going down, the value of the oil pressure is actually going up.

04:22.440 --> 04:25.880
And the reason why is because it's inverted.

04:27.740 --> 04:29.400
Anyway, fuel level.

04:29.400 --> 04:33.060
This one is actually increments normally.

04:33.180 --> 04:37.700
So, same arbitration ID, 10342200.

04:38.820 --> 04:44.360
Same first two bytes, D47, but now it's 11 instead of 14.

04:44.360 --> 04:51.120
So, 14 controls oil pressure, same controller 11 in the preamble controls fuel level.

04:51.380 --> 04:53.320
And the same thing, we can actually hack both of those.

04:53.320 --> 04:55.300
I'll give you a demonstration of this right after.

04:56.280 --> 04:57.980
So, how do we spoof messages?

04:57.980 --> 04:59.980
Normally this is where I jump into a demo.

05:00.260 --> 05:04.000
This is a particular piece of software called Vehicle Spy.

05:04.460 --> 05:09.320
Once you've actually reverse engineered the message, all you have to do is inject those messages onto the wire.

05:09.320 --> 05:14.080
And now you'll either show a higher fuel level than what you actually have, or a lower fuel level.

05:14.080 --> 05:15.160
Same thing for oil pressure.

05:15.160 --> 05:19.820
You'll actually be giving incorrect results to the instruments.

05:19.820 --> 05:21.380
And there's no real way to detect that.

05:21.380 --> 05:24.620
It'll just show a false signal.

05:25.840 --> 05:26.800
Autopilot.

05:26.800 --> 05:29.960
Something a little bit more substantial and immediate.

05:30.760 --> 05:35.540
The autopilot servos on the system back there use a different arbitration ID.

05:35.620 --> 05:43.920
And there's just one single message with three bits that DC0103 turns them on, DC0100 turns them off.

05:43.920 --> 05:47.540
And then there's a steady state message of DC0C.

05:47.540 --> 05:49.600
That just basically means nothing's changed.

05:49.800 --> 05:50.700
And that's all you need.

05:50.700 --> 05:53.300
You do that and it'll actually engage the servos.

05:53.300 --> 05:59.480
Now, any aircraft that I've seen that has an autopilot, you press one button and it's autopilot disconnected.

05:59.980 --> 06:00.860
Flashes a warning.

06:00.860 --> 06:06.340
But with this, you can continuously send these messages on the wire and that disconnect will not do anything.

06:06.340 --> 06:13.960
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.

06:14.260 --> 06:18.500
And oh, and by the way, we can actually control the amount of torque that's going to the servos as well.

06:18.500 --> 06:28.400
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.

06:29.840 --> 06:36.060
Okay, so this particular system had a really unique way of handling complex messaging.

06:36.380 --> 06:38.440
We have the AHRS.

06:38.440 --> 06:42.880
That is the instrument that indicates the aircraft attitude in flight.

06:42.880 --> 06:45.520
It's called Attitude Heading Reference System.

06:45.520 --> 06:48.020
It's basically like the old gyros.

06:48.020 --> 06:52.860
So when you're straight and level, it'll show on the glass panel that you're straight and level.

06:52.860 --> 06:57.140
You pitch up, it'll show as in the artificial horizon, it'll pitch up.

06:57.140 --> 06:58.760
There's one instrument that controls that.

06:58.760 --> 07:05.860
It also has the inputs for the airspeed, the static, and angle of attack if you decide to configure an aircraft with that.

07:06.960 --> 07:07.980
This one is different.

07:07.980 --> 07:12.140
It uses a single arbitration ID as a header, and it's easier to show you over here.

07:12.140 --> 07:20.660
So we have arbitration ID 10242000 with the 5th byte over 3C being the message size.

07:20.660 --> 07:30.700
Then another arbitration ID 10242100, and then 60 bytes of payload as a bunch of separate CAN messages.

07:30.700 --> 07:38.740
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.

07:38.740 --> 07:45.140
All the messages for heading, for altitude, for airspeed, are hidden in this message that comes on every so often.

07:45.340 --> 07:47.160
So, how would you attack this?

07:48.140 --> 07:59.840
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.

07:59.940 --> 08:06.540
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.

08:06.540 --> 08:12.500
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.

08:12.500 --> 08:16.580
The one that you've injected is the one that's actually going to display on the instrumentation.

08:16.920 --> 08:21.700
So, I'm in the process of actually having, of reverse engineering this.

08:21.700 --> 08:23.780
I've figured out what all the parts of the message are.

08:23.780 --> 08:26.880
I just have to write some custom software to inject it back out there.

08:27.620 --> 08:31.160
Um, and this type of attack is the really dangerous one.

08:31.160 --> 08:40.240
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, you could be flying at a different altitude than what you actually think you are.

08:40.240 --> 08:42.340
You could be pointing at a different attitude than you are.

08:42.400 --> 08:46.020
Um, and it really makes the attack scenarios pretty scary.

08:47.260 --> 08:49.940
Um, so, set of recommendations.

08:50.660 --> 08:53.320
Don't rely solely on physical controls.

08:53.480 --> 08:57.160
Um, this, just, you introduce a single point of failure here.

08:57.160 --> 09:02.760
Um, there's a secure CAN bus specification that's out there.

09:02.760 --> 09:04.720
It's, it's pretty new in the automotive industry.

09:04.780 --> 09:08.700
But, since autonomous vehicles are becoming a thing, it's, it's getting a little bit more traction.

09:08.960 --> 09:12.340
In avionics, this is what we should have, uh, defaulted from, from the standard.

09:12.340 --> 09:15.680
It's, uh, specification of secure onward communication.

09:15.680 --> 09:23.040
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.

09:23.040 --> 09:25.600
Because now you have crypto involved.

09:25.820 --> 09:27.640
You have authentication of the payloads.

09:27.640 --> 09:34.760
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.

09:35.040 --> 09:38.080
Um, and then, implement a security gateway.

09:38.080 --> 09:40.440
That's already present on cars today.

09:40.480 --> 09:45.940
Separate your attack surface area, your Wi-Fi, your Bluetooth, your LTE, from your CAN bus.

09:45.940 --> 09:48.760
And have a security, separate security device in between those two.

09:48.760 --> 09:51.140
On a vehicle, that's called a security gateway.

09:51.140 --> 09:57.480
It's already designed to operate real time, so the car is not affected by this being in the mix.

09:57.680 --> 10:00.740
And then, separate your, your functions of CAN bus.

10:00.820 --> 10:04.860
Um, put your autopilot on a separate bus from your engine controls.

10:04.880 --> 10:07.480
You know, your engine controls are in something that's more accessible.

10:07.520 --> 10:10.820
It's easy to, you know, open up an engine compartment and tamper it and get into that.

10:10.820 --> 10:14.940
Whereas your autopilot, it's, it's more difficult to get at those servos or anything else.

10:14.940 --> 10:18.260
And those are two separate functions that are entirely different.

10:18.260 --> 10:21.440
And so, if you separate those, you've got them on separate buses.

10:21.440 --> 10:27.020
And overall, you have more to attack to actually conduct a successful attack against a system like this.

10:27.500 --> 10:28.020
Okay.

10:28.020 --> 10:28.460
Thank you.

10:28.460 --> 10:29.580
I know that was really brief.

10:29.580 --> 10:31.080
We only had 15 minutes here.

10:31.080 --> 10:33.160
So, uh, at this point, I'm gonna go to questions.

10:33.160 --> 10:34.460
Anyone have any questions?

10:41.310 --> 10:43.510
Um, the stuff I talked about here.

10:43.510 --> 10:45.790
So, implement a system.

10:45.790 --> 10:52.370
So, kind of the whole point of this is CAN bus, it doesn't appear to be widely adopted yet.

10:52.370 --> 10:54.790
It's, it's in the system that I have built out there.

10:54.790 --> 10:57.830
There are some other systems, because we looked at two separate manufacturers.

10:57.830 --> 10:59.910
They both suffer from the same issues.

10:59.910 --> 11:01.890
Don't rely solely on those controls.

11:01.890 --> 11:04.870
Put some additional security controls on your CAN bus.

11:05.670 --> 11:06.610
Migrate to this.

11:06.610 --> 11:09.970
The existing hardware is supposed to support SECOC.

11:10.390 --> 11:13.530
Um, and implement a security gateway.

11:13.530 --> 11:16.370
That's something that can be retrofitted into existing systems.

11:16.430 --> 11:19.090
You have your devices that actually have Wi-Fi and cellular.

11:19.090 --> 11:23.750
And you can migrate those from the flight critical components of the system.

11:25.190 --> 11:25.950
Okay?

11:26.190 --> 11:27.370
Any other questions?

11:28.490 --> 11:29.250
Alright, thank you.

11:29.250 --> 11:32.050
For those who want to join me, I'll be right behind you with the avionics.

11:32.050 --> 11:33.890
And I'll actually demonstrate some of these techniques.

11:34.930 --> 11:35.690
Okay.

11:36.130 --> 11:36.890
Applause.

