1 00:00:00,000 --> 00:00:06,260 Hi everyone, thanks for joining our talk about the vulnerability research we've been doing on space systems. 2 00:00:07,340 --> 00:00:09,960 So just a quick introduction of the team. 3 00:00:09,960 --> 00:00:13,520 My name is Milenko, I'm currently leading the team at VisionSpace. 4 00:00:13,520 --> 00:00:15,600 On stage today with me is Andy. 5 00:00:15,760 --> 00:00:26,920 My name is Andrzej, I've been working for VisionSpace since a couple of years now and prior to that I used to work at the European Space Operations Center for a little bit over a decade. 6 00:00:27,540 --> 00:00:30,780 Also in the room, Ricardo on the first row. 7 00:00:31,700 --> 00:00:34,300 And unfortunately, Ayman had to already go. 8 00:00:34,320 --> 00:00:47,620 So yeah, why are we talking about space systems and why do we think it has an impact on the wider society and not just on us in the space industry? 9 00:00:47,620 --> 00:00:55,280 And what we see is that there is a huge number of satellites being launched currently and the attack surface is exploding. 10 00:00:55,280 --> 00:00:56,520 It's huge. 11 00:00:56,660 --> 00:01:10,320 So there is not just a couple of satellites as it used to be in the 80s when only government was building satellites, but commercial providers like SpaceX, OneWeb are pumping out more and more satellites into orbit. 12 00:01:10,700 --> 00:01:16,020 And next to that, what we see is that also the defense industry is catching up again. 13 00:01:16,020 --> 00:01:25,280 So after the Cold War, there was a bit of a cool down in the launches for like telecommunications, for example, for the military. 14 00:01:25,280 --> 00:01:28,340 But nowadays this is always increasing. 15 00:01:28,360 --> 00:01:34,740 And in addition to that, most of the constellations that are currently being launched have some dual use potential. 16 00:01:34,740 --> 00:01:38,240 Like we see that with Starlink used in the front lines in Ukraine, for example. 17 00:01:38,240 --> 00:01:44,520 And there's like military contracts also in the US, but also with OneWeb internationally. 18 00:01:44,520 --> 00:01:52,680 There's a huge incentive for APTs and governments actually to look into attacking these systems. 19 00:01:52,760 --> 00:01:55,880 And we think that they are not prepared for that. 20 00:01:57,560 --> 00:02:03,340 Just for everyone who's not from the space industry, just to give you a little bit of background how our space system works. 21 00:02:03,340 --> 00:02:10,240 So we have very basically a satellite or multiple satellites and we call this the space segment. 22 00:02:10,380 --> 00:02:18,260 Then we have the ground segment, which is on the ground and all the infrastructure here on the terrestrial side, which is supporting the space mission. 23 00:02:18,380 --> 00:02:30,260 So for example, a mission control center, which has operators in it, the fibers, which are going to the ground stations or at least lines that you might have, the ground station infrastructure itself, science centers, et cetera. 24 00:02:30,260 --> 00:02:36,040 There's a huge number of IT assets and OT technology, which are supporting a mission. 25 00:02:36,640 --> 00:02:37,800 And then we have the user segment. 26 00:02:37,800 --> 00:02:40,760 And this is where we saw a lot of the previous research being done. 27 00:02:40,760 --> 00:02:48,020 So user equipment that you can actually hold in your hand, that you can buy like a starling dish that you can tear apart and look what it's inside. 28 00:02:48,500 --> 00:02:52,740 And where we saw a bit, the gap was actually on the other two segments. 29 00:02:52,740 --> 00:03:07,340 So a lot of people in the past decades were doing research on how to intercept communication, how to play with the modems, but not so much on how to actually control a spacecraft or what you can do. 30 00:03:07,340 --> 00:03:18,820 If you can actually send data directly to the spacecraft, if you can maybe bypass authentication, if you can mess with the memory, how the safety systems that were built in affect security. 31 00:03:20,560 --> 00:03:24,240 So an example, a science mission, how this usually is structured. 32 00:03:24,240 --> 00:03:27,640 So you have one or multiple spacecrafts doing their thing. 33 00:03:27,640 --> 00:03:32,160 You have an RF link to a network of ground stations, usually not just one. 34 00:03:32,640 --> 00:03:39,760 And then you have a mission control center that can be just a room that can also be a building or multiple sites with redundancy. 35 00:03:41,560 --> 00:03:45,040 And then you have something like a science data center, sometimes multiple. 36 00:03:45,040 --> 00:03:51,440 And these are post-processing the data that is coming from the spacecraft to serve it to the end user. 37 00:03:51,440 --> 00:03:55,460 So scientists in this example, of course, the telecommunications mission looks different. 38 00:03:55,460 --> 00:03:57,340 So this is just an example. 39 00:03:58,060 --> 00:04:03,700 And then you have an operator or multiple operators, usually a team who are controlling the spacecraft. 40 00:04:03,700 --> 00:04:06,160 So they are taking care of the health of the spacecraft. 41 00:04:06,160 --> 00:04:07,740 Is it in a good state? 42 00:04:07,840 --> 00:04:09,500 Are the batteries okay? 43 00:04:09,500 --> 00:04:11,480 Do we need to do something about the orbit? 44 00:04:11,480 --> 00:04:13,000 Do we need to plan some maneuvers? 45 00:04:13,000 --> 00:04:15,680 Is there some space debris incoming or whatever? 46 00:04:16,180 --> 00:04:20,720 And especially since COVID, there is not longer this perimeter-based defense. 47 00:04:20,720 --> 00:04:28,600 So now you also have operators using a VPN to connect to control the spacecraft from home, for example, or just remotely. 48 00:04:28,600 --> 00:04:30,380 So teams are working remotely. 49 00:04:30,400 --> 00:04:31,580 Things are moving to the cloud. 50 00:04:31,580 --> 00:04:39,620 You can now book on AWS, but also on Azure, you can actually book ground station passes directly and get it into the data center. 51 00:04:39,620 --> 00:04:47,040 So there's a lot of shift in how the infrastructure is working, but the software that is used inside there hasn't changed much. 52 00:04:47,040 --> 00:05:01,140 So if you have a big mission, the software that is used to control the actual spacecraft, so the human machine interface that the operator uses to control the spacecraft is likely built on decades of experience and code base. 53 00:05:01,600 --> 00:05:04,280 So we looked into open source versions of this. 54 00:05:04,280 --> 00:05:14,620 So there's, for example, YAMCS, which is used by dozens of missions, especially smaller missions, but also being planned to use on lunar rovers and the European robotic arm on the ISS. 55 00:05:14,860 --> 00:05:23,580 We have NASA's OpenMCT, which is used for the Mars rovers, for example, and we have OpenSea3 Cosmos, which is also gaining popularity. 56 00:05:25,380 --> 00:05:27,520 And then you have onboard software. 57 00:05:27,560 --> 00:05:30,360 So some spacecraft have a very tailored onboard software. 58 00:05:30,360 --> 00:05:32,000 That's not something we looked into. 59 00:05:32,000 --> 00:05:38,840 We looked into software that is reused across missions so that dozens of missions are actually affected if there is something in that. 60 00:05:38,900 --> 00:05:42,080 And the best example for that is NASA's CoreFlight system. 61 00:05:42,160 --> 00:05:49,760 So this is used, I think this is built on above 20 years of legacy, actually, this system and used in dozens of missions. 62 00:05:49,760 --> 00:05:53,840 There's also like payloads on the James Webb Space Telescope, which are running this software. 63 00:05:55,120 --> 00:05:57,040 Then we looked into fPRIME. 64 00:05:57,040 --> 00:06:06,600 So this is also from NASA and this was developed originally for the Mars Helicopter Ingenuity and AIT Core, which is reused to run experiments on the ISS. 65 00:06:08,300 --> 00:06:12,680 So traditionally, what disabling a satellite would mean is actually launching a rocket at it. 66 00:06:12,680 --> 00:06:18,720 So the 80s approach, I would say, is actually you get your fighter jet up and shoot a rocket at it. 67 00:06:18,780 --> 00:06:26,880 But what we found is that actually you might have a much easier time if you exploit the vulnerabilities in the ground segment or in the spacecraft system. 68 00:06:27,540 --> 00:06:29,280 So now comes the fun part. 69 00:06:29,540 --> 00:06:31,660 I hand over to Andy for some live demos. 70 00:06:31,900 --> 00:06:42,660 Okay, so what you're going to see now are a couple of demos showing different type of vulnerabilities, different attack vectors and also different ways of exploiting them. 71 00:06:43,620 --> 00:06:46,580 We're going to start with mission control system. 72 00:06:46,580 --> 00:06:54,040 For this particular case, or in this particular case, we're going to use OpenC3 mission control system. 73 00:06:55,960 --> 00:07:00,200 The system is vulnerable to a number of different issues. 74 00:07:00,200 --> 00:07:02,520 It has a number of different issues. 75 00:07:02,620 --> 00:07:06,380 Some of them are easier or more difficult to exploit. 76 00:07:06,400 --> 00:07:13,560 And one of them is an XSS, which you will see in a second should give us an RCE to the system that is actually controlling the spacecraft. 77 00:07:14,540 --> 00:07:26,380 So in order to pull this off, we are going to generate a URL, which we'll then try to finish a user with for a given mission. 78 00:07:26,380 --> 00:07:29,480 And then we'll take over control of the system. 79 00:07:47,590 --> 00:07:50,930 Okay, so I'm going to start the OpenC3 system. 80 00:07:57,000 --> 00:08:01,220 It is one of the more established mission control systems. 81 00:08:03,220 --> 00:08:06,080 Space industry is going to take a second to load. 82 00:08:08,460 --> 00:08:15,140 It goes with a bunch of typical functionalities you might find on any other mission control system. 83 00:08:16,080 --> 00:08:20,820 Some of like, for instance, telemetry processing and displaying. 84 00:08:20,820 --> 00:08:25,640 You also have commanding capabilities where you can actually send telecommands to spacecraft. 85 00:08:26,680 --> 00:08:34,380 And OpenC3 also has a script runner where you can customize your functionality with Ruby and I think Python, it was. 86 00:08:35,220 --> 00:08:42,160 And as I mentioned before, this system is vulnerable among other issues also to an XSS. 87 00:08:42,240 --> 00:08:49,600 To exploit this vulnerability, there are a number of calls that payload we generate has to make. 88 00:08:49,600 --> 00:09:02,220 One of them is first is to steal the session tokens in order to, which we then use to deploy the malicious script on the system and then eventually we trigger the script. 89 00:09:04,360 --> 00:09:14,060 So to make it easier for us, we created a Python script to generate the URL, which we then use to fish our victim. 90 00:09:14,940 --> 00:09:18,120 And then we also, we are going to start the listener. 91 00:09:19,280 --> 00:09:25,840 So let's say I'm a spacecraft controller and I fall for the phishing campaign. 92 00:09:26,620 --> 00:09:28,460 I clicked on the link. 93 00:09:28,960 --> 00:09:31,040 So from my perspective, nothing really happens. 94 00:09:31,040 --> 00:09:34,880 I still have access to my mission control system and all its functionality. 95 00:09:36,320 --> 00:09:43,420 But the adversaries have access to my, to the whole system that is de facto controlling the spacecraft. 96 00:09:48,310 --> 00:09:48,830 Okay. 97 00:09:48,830 --> 00:09:51,690 So that's, that was one demo. 98 00:09:52,210 --> 00:09:57,330 I'm going to quickly stop it so that I have resources to conduct the next one. 99 00:10:08,160 --> 00:10:08,780 Okay. 100 00:10:08,780 --> 00:10:11,360 So, and the next demo is a little bit different. 101 00:10:11,360 --> 00:10:17,220 We are not targeting the ground segments, the ground segment and the mission control system. 102 00:10:17,220 --> 00:10:19,480 We are targeting the spacecraft itself. 103 00:10:20,120 --> 00:10:30,260 So imagine that you are a nation state and you have access to a ground segment in your country and mission control. 104 00:10:30,260 --> 00:10:34,460 So let's also assume that you are in the visibility of the spacecraft. 105 00:10:34,460 --> 00:10:36,840 So we actually can send some data to spacecraft. 106 00:10:37,520 --> 00:10:47,820 And then the last assumption is that the spacecraft is running an older version of NASA core flight system, which is vulnerable. 107 00:10:48,040 --> 00:11:02,920 Again, quite a few vulnerabilities, but one of the particular weakness we're going to use is on the memory management module in order to get an RCE at spacecraft directly on the spacecraft platform. 108 00:11:04,680 --> 00:11:14,250 So again, I will start the core flight system simulation and a listener. 109 00:11:15,160 --> 00:11:19,580 This one is a little bit more complex in the exploitation. 110 00:11:19,580 --> 00:11:32,340 As mentioned before, memory management module of the core flight system is weak when it comes to... So in principle, the module should let you write and read memory in the memory. 111 00:11:33,020 --> 00:11:48,060 It doesn't impose any restrictions on which parts of the memory address you can actually write, which means that you can read or write memory not only to the memory of that module, but the entire process of core flight system. 112 00:11:48,440 --> 00:11:57,720 And because CFS is running on a Linux type operating system, well, you can imagine there's a lot we can actually do with this type of vulnerability. 113 00:11:57,980 --> 00:12:12,660 What we are going to do in this case, we're going to tap into global offset table, grab a couple of addresses of functions we want to execute, or the function which is executed next, and then another one which we want to replace it with. 114 00:12:13,840 --> 00:12:16,120 And we just let it run. 115 00:12:16,120 --> 00:12:21,780 And that will actually execute the function which we want to execute instead of the one that is in the software. 116 00:12:24,180 --> 00:12:28,180 So I'll run the simulation now. 117 00:12:28,180 --> 00:12:34,980 So the simulation is running, I'll run the exploit now, and then I will walk you through the steps. 118 00:12:35,060 --> 00:12:45,840 So in our particular case, we are interested, because of the research we did, we know that when you send a command, one of the next functions that is called is the memCHR. 119 00:12:45,840 --> 00:12:50,140 So we are replacing that function with the system. 120 00:12:50,740 --> 00:13:05,820 And then we're finding the addresses, then we place those addresses or swap those addresses on the global offset table, so that the next instruction that is going to be executed instead of memCHR, it's going to be the system one. 121 00:13:05,960 --> 00:13:09,380 Now what you see now is the telemetry coming down from the spacecraft. 122 00:13:09,700 --> 00:13:16,020 So there is a constant communication between the ground segment and the spacecraft because we have to leak those memory addresses. 123 00:13:16,760 --> 00:13:18,540 And okay, it has completed. 124 00:13:18,540 --> 00:13:25,560 So we can see that we have leaked the memCHR from the global offset table from the spacecraft platform. 125 00:13:25,700 --> 00:13:38,480 And then we have overwritten that function with the address of the system function of the spacecraft by sending telecommand, which we then used to pass our payload. 126 00:13:38,480 --> 00:13:51,580 And just for the sake of demonstration, it was executed and we got the reverser back from a system on which the CFS is running, which in our case is a spacecraft. 127 00:13:56,570 --> 00:14:00,650 So that concludes the demo. 128 00:14:13,160 --> 00:14:16,780 Okay, demo bots were good to us today. 129 00:14:17,040 --> 00:14:21,820 So this is the list of software that we actually looked into. 130 00:14:22,080 --> 00:14:24,020 So we just showed two of them. 131 00:14:24,340 --> 00:14:29,740 And as you might see, just some of the vulnerabilities that we actually discovered over the past years. 132 00:14:29,740 --> 00:14:33,640 So we started 2023, I think, was the first disclosures. 133 00:14:33,640 --> 00:14:35,860 And yeah, the list is going on. 134 00:14:36,880 --> 00:14:39,340 And this is not because this is bad software. 135 00:14:39,340 --> 00:14:43,960 This software was running operationally for years without major problems. 136 00:14:43,960 --> 00:14:45,120 It's being maintained. 137 00:14:45,120 --> 00:14:46,320 We reported these things. 138 00:14:46,320 --> 00:14:47,560 They were fixed within weeks. 139 00:14:47,560 --> 00:14:51,180 Usually, the maintainer teams were very nice and responsive. 140 00:14:52,020 --> 00:14:56,300 But no one was actually telling them to write secure software, it seems. 141 00:14:56,500 --> 00:15:00,080 So this seems to be more of an issue. 142 00:15:02,020 --> 00:15:18,540 So one of the concerning things is that not that we just found some XSS, which is like not the worst, but that in most of the systems, we either found a higher critical vulnerability, which could lead to code execution or, for example, arbitrary file deletion in YAMCS, 143 00:15:18,540 --> 00:15:20,420 where you could just wipe the disk. 144 00:15:22,400 --> 00:15:26,680 So sure enough, we published some things and got some attention. 145 00:15:27,320 --> 00:15:29,760 So some others jumped in. 146 00:15:29,760 --> 00:15:36,240 So it's always a bit painful when you publish something and then a couple of months later, you'll see that someone else found more. 147 00:15:38,640 --> 00:15:44,700 So this was actually quite a nice follow-up research that was done, I think by a French researcher. 148 00:15:45,120 --> 00:15:56,340 And they found actually ways to bypass in one of the plugins for NASA's core flight system, which is supposed to provide encryption and authentication ways to bypass it. 149 00:15:56,340 --> 00:16:02,800 So we already found some ways to mess with it, but he actually found some ways to bypass it. 150 00:16:04,680 --> 00:16:09,100 And even later, more people started looking into it. 151 00:16:09,100 --> 00:16:15,020 And there was much more, which we didn't even check, like we were checking the code, we're not running a memory checks. 152 00:16:15,300 --> 00:16:23,520 But yeah, someone I think was firing up Valgrind and was finding much more things, which were also pretty severe in that software. 153 00:16:25,880 --> 00:16:35,840 And so what we think is like, there is a bit of, in the space industry, a bit lack of awareness on the developer's side, but also on the management side, what is important there. 154 00:16:36,140 --> 00:16:41,120 And it's difficult to implement this late. 155 00:16:41,520 --> 00:16:51,160 So some of the functions, for example, like memory access or something, that needs to be something that needs to be discussed at the very beginning, if you want to have that level of access or not. 156 00:16:51,300 --> 00:16:56,540 And if you have an existing mission, which has this level of access, it's very hard to secure it. 157 00:16:56,540 --> 00:17:07,220 And if this is something that is relevant to your security, or like has a dual use characteristic, then maybe some hard decisions should be taken on how to use that mission. 158 00:17:07,500 --> 00:17:12,560 So we think that while space is hard, space security doesn't need to be hard. 159 00:17:14,840 --> 00:17:16,460 Just a final touch. 160 00:17:16,460 --> 00:17:18,560 So we're currently running a space CTF. 161 00:17:18,560 --> 00:17:24,700 So if you liked what you saw here, you might also enjoy our aerospace village, StarPone CTF. 162 00:17:24,700 --> 00:17:25,900 Thank you.