Hello everybody. So welcome to our presentation on radio frequency attacks on the aviation's last line of defense against media collisions. It will be a talk on the attacks on the traffic collision avoiding system in aviation, the so-called TCAS. So my name is Vincent Lenders. I'm a cyber security researcher for more than 20 years focusing on the security of wireless networks and I'm also the director of the cyber defense campus in Switzerland. I'll be giving this talk together with Giacomo. I'm Giacomo. I'm a third year PhD student from Italy, the University of Genoa and I work also on radio security, opionics and maritime systems as well. So the air traffic control is a key infrastructure for safe air travel today. With more than 30 million flights per year worldwide, the air traffic management is now a very complex thing. So air traffic control helps organizing and optimizing the air traffic flow. It provides situational awareness to ground controllers and also support to pilots. And a very important feature of the air traffic control is to prevent mid-air collisions. So if we look at air traffic control, there are mainly there are different procedures and technologies for this and there are mainly three technologies that I would like to introduce and are important for air traffic control. They are all three based on MoDES. MoDES is a data frame format similar to the internet as IP that allows for wireless communication between aircraft and ground station. So the first technology is secondary surveillance radar called SSR. The second one is ADS-B and then the third one that will be the main focus of this presentation is the traffic collisions avoiding system. So let me start with secondary surveillance radar. This is the oldest technology. It's based on ground stations on radar. So the radars they interrogate aircraft using this MoDES format protocol on an uplink, on the 1030 megahertz uplink, and then the aircraft they respond on a downlink on 1090 megahertz, the MoDES downlink. So these messages are very small in contrast to IP packets which can be like 1500 bytes. This message is very small 56 or 112 bits. But they can entail a lot of information such as the velocity, altitude and the heading and so on of the aircraft. So this is how this is working. This is a kind of an old technology. It's also mandatory and used in all in all airspaces around the world. Now we have the automatic dependent surveillance broadcast. It's more recent. It has been mandated by the last years in various airspaces and this is also based on MoDES. But instead of having the radars interrogating the aircraft, we have the aircraft determining their own position using GNSS, using for example GPS. And when they know their own location, they broadcast this information over MoDES to surrounding aircraft and also to ground stations. So this is more precise than secondary radar. Much more precise. GPS gives you a few meters accuracy compared to a few hundred meters for secondary radar. So it's it's welcome to also decrease the separation between the aircraft because of the higher precision. Now we come to the focus of this talk which is the traffic alert and collision avoiding system. It's a protocol between the aircraft. So basically it's a distance ranging protocol based on request replies. Also on the 1,030 megahertz uplink and on the 1,090 megahertz downlink there are the responses. So there are a few interrogations and replies that happen to basically determine how if a collision is going on and how to avoid this collision. This is a very important system because it's the last line of defense against media collisions. If the other systems have failed like secondary radar or ADSP and it was not possible to keep the separation, this one kicks in and will make sure that there are no collisions. So why is this important? Well it's kind of obvious. It's all about human life. If there is a aircraft collision this will lead to a catastrophic event. We had in the 70s for example crashes going on also in the 80s with many deaths. And this is why in 1987 there was then this introduction of the TCAS system and it's now mandatory in many airspaces. It depends on the size of the aircraft and also the number of passengers you have. But then if you are an aircraft that has a certain size and a certain number of passengers, you will be required to have a TCAS system in the aircraft to avoid collisions. Now TCAS has three main core functions. One is surveillance, the other one is traffic advisory and in the most recent version of the traffic collision avoiding system you have also resolution advisories. I will go into the detail of these three functions. So here on the picture on the right we have a typical TCAS display showing the surrounding aircraft. So this is the surveillance information that you have. The aircraft periodically announce themselves and you will see this on this display. Now when an aircraft is found there will be interrogations to get the range for example, to get the altitude and the capabilities of the surrounding aircraft. This is all information that will then appear on this display. And if the system realized there may be a collision going on that might happen, then there will be some traffic advisory, some TA that is sent to the cockpit as an alarm, alarming the pilot that there may be a collision. And if this persists after some point then there will be a resolution advisory and this is basically to indicate and give a command to the pilot to basically do something. And in TCAS 2 there are two options basically to resolve the conflict. TCAS 2 foresees that one aircraft should climb and the other one should descend and this should then prevent the collision. So this is the key function of TCAS 2. Now let's talk about the security of TCAS and obviously we're not the first to think about this problem but the situation is somehow worrying and yet to our perspective also a little bit unconvincing so far. So there has been some warnings, there has been some risk assessments, many of them people, publications analyzing the risks, the cyber security risks and the risks of attacks against TCAS here. I'm mentioning a couple of those papers, one we have written ourselves in the past. So these are warning signs. There are also people and including ourselves that have done some simulations to better understand how pilots would react to TCAS attacks and also what are the conditions under which TCAS attacks may work and what are the limitations of these attacks. For example, we did some work also inviting pilots in a simulator and exposed them to attacks and showed how they reacted to those attacks. And then we had also some work to better understand in simulations the theoretical limitations of these attacks and what are the conditions that are favorable to an attacker. But these are all simulations. Then more recently there has been an attempt to analyze experimentally the impact of attacks on TCAS and these are these two papers from research. One is a PhD student working on it, building a test bed and with a TCAS equipment to analyze how the systems would react. But our motivation for this work that we'll be presenting is that despite this prior art, there are still no convincing experimental and scientific evidence that these TCAS attacks may work. Actually they may trigger, for example, resolution advisories using commercial and certified hardware. So there was also so far no established methodology how to test attacks and to see how systems will react in a scientific way. And if these attacks are feasible, we would like to also better understand what are the capabilities needed for an actor. So we would like to understand what are the requirements to actually need it to be able to launch those attacks. So this was the basic motivation of our work that now Giacomo will be presenting next. So I needed to descend because you know, I needed to climb under Vincent. So yeah. Okay, so now the fun stuff begins. So I'll start by addressing your point. So it's a protocol from 1987. So it's collaborative, it's in clear, there is no encryption, no PKI, no whatever. So it's insecure. We already know that. Let's skip over that. So the first attack that you're going to see, it's inducing a TA. It's a very simple thing. You just need to implement the 1.8 thousand pages of standards required to do so. And you can find that all of these standards in these three key bullet points, which means in order to get a TA, you need to be an aircraft. So you need to broadcast your presence, you need to reply to interrogation properly to say that you are at the correct altitude and in the correct position. And which is our third point, being in the correct position. So correct range, correct altitude with a consistent identity. The second attack that you will see is about triggering a resolution advisory. So a resolution advisory happens after a traffic advisory. So you first need the first one and then you start a negotiation. So you tell the other aircraft, I perceive you as dangerous, please do something. And how you can choose? Well, there is one conflict resolution algorithm that is used, which is the aircraft with the lowest address always wins. So you as an attacker can find out the address of the other aircraft and always pick whenever the other aircraft is going to climb or descend. Then the first attack is instead not involving an aircraft, but instead a ground station. So how TICAS works is basically it picks up a size that it will protect. So how much time in the future it will look, depending on the altitude, on the currently selected altitude. This is called sensitivity and it goes in levels. So the higher you are, the bigger this area is. Well, if you land in Las Vegas, where you have two runways close together, you might actually end up in a situation when you point towards another aircraft. So what they did was they allowed ground station to tell the aircraft to reduce their sensitivity. Well, guess what? You can send this command to any aircraft in the air to disable their TICAS with no authentication. So this is fun. You can disable the anti-collision of whatever you want. Fun in my understanding of the word, by the way. So why did everyone fail? So an interrogation cycle, so one interaction of the protocols goes like so. You send something and then the other aircraft replies. So this is very standard, but the range that is estimated. So the relative position is done by taking this time of flight. So the time it took to respond and subtracting 128 microseconds, that's 10 to the power of minus six. It's a comically short time. Your scheduler of your operating system is running 1000 times slower than this. So this has acted for a long time as a security feature because, let's say, low skilled attackers could not manage to have this kind of latency to perform all of the steps of the protocol. Actually, I'm lying to you, but I'm telling you so it doesn't count. It actually is not 128. It's a little bit less because it's not with respect to the start of the packet. It's a little bit later on. So you need to receive, understand what has been said, send the correct thing out at the current time and reply. Not only that, this happens over two different frequency channels. So you need to handle coherency and you need to be always in the same spot because if you need to do six interactions in a row to get acquired, you always need to reply consistently and at the same time. So it's a difficult thing. So the first problem that we had is that a ticket system is not exactly a Docker container. You can just put an environment variable telling him where the database is and it runs. So we had to build a test bed beforehand. So this one is our architecture. So the first ingredient is of course, a tickets unit, which is what you're testing. And you also need to connect it to a control panel and a traffic display unit, which what we've sent was showing to you some antennas and not only that, an headset because the traffic alerts are going to come out of it. Then you put an attacker into there. So two antennas, an SDR, a computer driving it. And because we are scientists, you also need to put something to measure what is going on. So we have a camera that takes a look at the traffic display. You have an avionic bus simulator that makes the tickets believe that it's flying because otherwise it will not transmit. And then since tampering with the anti-collision system of aircraft, it's, let's say, unpolite. You need to put everything inside of a cage so that you don't get into jail while doing so. Well, I was out because they are from the minister of defense, but they wouldn't risk anything. So this is, as you can see, our testbed. I'm not very good at cable management, as you can see, but it was this clusterfuck of cables, basically. This is what you can get out of this. And also our data gathering process was this very sophisticated setup with a webcam placed on a monitor that acted as a stand. So we got this. So as you can see, this is OpenCV. So this can be turned as a dual-use talk about machine learning and pattern recognition very easily. So we were recognizing where the aircraft was tracked and what distance was commanded and everything else. So technicalities. And speaking about technicalities, so it's trivial to send some radio protocol, at least people have said to us many times. So let's talk about what you need to do, actually. So you have two TCAS that interact. So they send something on one frequency at two megabits per second, and they respond on another frequency at one megabit per second. So when we started this, basically three of these interactions were not available in real time. So two megabits is a lot for a software defined radio implementation. And there were no implementations doing any of these protocols. So the first thing we needed to do was, well, first we tested that our testbed worked, because if you need to attack something, you need to understand if you mounted it correctly, yeah, it works. Then we started by building a decoder that, with respect for instance, if you're down 1090 or whatever, it could run very, very fast. Then we brought a transmit chain and we got it certified by a RAM tester so that we got our stamp. And now you might be wondering, so you have a RAM tester, a device that does everything, and you're building that yourself. Well, yes, you need $400,000 to buy one. And also the more difficult part of the protocol are just not implemented into there because you don't need it. So you can just send dead beef to an aircraft, but you will not attack it. I guarantee to you. There was also this other thing. So can't you just act time and reply random shit all over the airspace? Well, you can't because aircraft transmit things at random in order to not pollute the airspace. And also you need to have silence around our response to get the other receiver to pick it up. So you cannot just float the air. So we explored two ideas. The first one was doing this in hardware. It's a lot less expensive otherwise, but you need smart people to do it, and I'm not. So we started with software-defined radio because you can just buy something, you can put some random PhD guy, and it's going also to get cheaper over time. And so the idea was, can we do this with less than $10,000? Of course, you need a place to do this and do all of the weird stuff like tracking, putting down, I don't know, a Swiss jet or something. So the first thing we tried was trying with Linux Realtime. And we got 190 microseconds just to reply to a single pulse. So not enough. So we needed to do a bunch of stuff. So you take a workstation, you remove power saving because who cares about it? You remove hyper-threading, you disable many of the cores, you remove the GPU, sorry for all of the machine learners in the audience. And then since we are at a security conference, you disable all of the security protections because those are slow, all of the mitigations and whatever, we don't care. Then you build basically your own Linux, you pin the OS on one core, you pin the application on some other cores, and you remove all of the power saving features, so you run busy polling. And then you compile everything as if it was your Gen 2 custom Linux distribution, so extreme flags, optimized for architecture, profile guided, all that jazz. And then since you are a software engineer, you overcomplicate things. So where do you start to overcomplicate things? So you start from the reception because you need to find out if the victim aircraft has interrogated you. The way is you need to build some kind of intelligent preamble detector, so going back and forth through your transforms, and then you bring up and you understand why you studied mathematics, so you bring up all of this random shit about symmetries in the furrier domain and back and forth transforms. Then you actually do not need to receive all of the bits that are being sent to you. At one point you just decode enough bits and you understand what is being asked you, so you build a finite state machine and you start replying earlier, so you reduce latency. I need those nanoseconds. And then of course everything stays into a cache because you don't have the time to modulate anything, so you just need a lookup table and save everything into RAM. Then you need to get good at programming. You need to read all of that Intel manual of 1.3 thousand pages, also that one, full of VMUL PD or other single instruction, multiple data instruction. You remove any mutex because those take 100 nanoseconds to run and it's unacceptable. You remove all memory allocations and you rewrite the allocator of your program in because why not? And then you add some threads into the mix to overcomplicate things even more. So now after two months you ended up with 40 microseconds more than you started with. Wow. So what kind of results you can get from that? You can trigger RTA. Oh wow, it works. So as you can see you can put an aircraft directly on the nose at the same altitude, so this will be pretty spooky if I were a pilot. And you can also get an array, so you can distinguish it because it's red instead of yellow. I'd like to point out that even though it's written no GPS position, this is in no way related to GPS spoofing attacks or whatever. Also TCAS doesn't need GPS. And then for the TCAS deactivation, what you will see on the aircraft is that it starts in resolution advisory mode, then something happens and it turns back to traffic advisory only mode. And this happens, you cannot reset it back to where it started unless you unplug and replug the TCAS unit, which is very uncomfortable to do. You can't get into an avionics bay while you're flying. And we wanted to verify it, so how can you do that? You fake being a tower and you please tell me the sensitivity level you're operating at and it's going to tell you that it decreased, so it works. Then we tried to induce a collision avoidance maneuver for 30 minutes and it worked. Then the TCAS unit shut off because it didn't expect flying information with someone directly in the front of your nose for 30 minutes, so it's reliable. And the thing that we got is that the amount of money that you require is actually quite close to our target. You also need one Italian PhD student that eats canned vegetables for a while, but you can manage. It's important. Vegetables are important. So about the sensitivity level attack, I can just tell you that it works. I don't have any graph to show you, it's just going to be a line to works. And instead, our system managed to reply within 0.2 microseconds, which for something built in software is smart. And also the jitter, so the delay in between two different interrogations stayed within this limit set by the standard. Of course, it's a lot worse than real hardware, but it's very good. And so this is the most important slide, which is the success rate. So the level of success at one point goes to around 98%. So you know that we're not bullshitting you. If you see our NERF talk where they get 100%, they're lying. So you know that we aren't. And so we get this advantage of around 30 plus microseconds. And why would you care to reply before the 128 microseconds? Well, if you are an attacker and you are on the ground and you want to place an aircraft at distance zero, so directly on the nose of another aircraft, you need to reply a little bit earlier and let the speed of light do its work. So why do you want to do that? Because some distances automatically trigger a TA or an array. And with the canned vegetables from before, you can manage to do this right now with hardware that you can buy at a distance of 4.2 kilometers. So if you are within that distance, you can do that. If you buy your own quantum computer, the magical unicorn world thingy that does it in zero nanoseconds, you can put this up to this theoretical limit. And so we wanted also to find out if you can do that to an airliner, because that's what everyone wants to perform, chaos. And so you can do that for an airline and flying at 950 kilometers per hour with a probability of 80%, which is worrying. So let's talk about limitations. Let's be straightforward. So you just need to be heard power-wise, but you need to buy a power amplifier, which we didn't have, but it's RF, so I guess it works. And also you need a way to find out if you want to appear in a very precise position, the attitude of the victim you're attacking. But as you may know, you can listen for ADS-B and understand this position. Done. I conclude. So we now know what kind of hardware we need. We know what kind of things you need to buy. We built a testbed for this, and we succeeded basically because we recognized that general SDRs framework are not enough latency-wise to perform this kind of stuff. Also, like, Dump1090 is focused on decoding very, very well everything that is coming up, but not very, very fast. And also we focused on trivial technicalities, like building our own memory allocator and whatnot. So actually the TARA is very difficult to pull off. Instead, the RADOS is extremely dangerous. And also we have a problem because workstation will get faster over time, so this capability will increase. So it's a systemic problem about a very delicate topic. So we had to disclose this in a very complex environment. We have disclosed it basically to manufacturers and a bunch of authorities, both national and international, that have acknowledged. So manufacturers basically said, yeah, it's a problem in the standard. Yeah, we're going to do something about it. And as it stands at the moment, there is no way to fix any of these attacks. But after some kind of work, now we know that something has to be done and something will happen because they are already working on new iterations of collision avoidance standards. Also, it's a field where it's very important, the safety of everything. So it's going to happen somehow. So if you want to know more, we have a scientific paper coming up using security. So join us and fill in. If you can't wait, you can just ask me and I will hand over to you a PDF. If you are not smart on a USB key, otherwise via email. So that was it. Hope you liked it.