[00:00.000 --> 00:05.920] Hi everyone, my name is Andy. I'm going to present you with some offensive security testing. [00:07.460 --> 00:13.520] In this presentation I will briefly introduce you to the ground segment and the software that we [00:13.520 --> 00:19.260] use on it. I will focus on one particular software which is the mission control system [00:20.360 --> 00:27.520] and I will show you some vulnerabilities which we have found on those software applications [00:27.520 --> 00:32.440] and then give you a couple of demos on how we managed to exploit them. [00:34.180 --> 00:37.460] Ground segment consists of many interconnected components [00:38.090 --> 00:49.250] or elements. You can see on this orange part where exactly it lies in the space mission. [00:49.780 --> 00:54.340] It consists of different elements. All those elements perform different functions [00:54.920 --> 00:59.920] but they all depend on each other either by receiving input from or sending outputs to [00:59.920 --> 01:05.080] other components. However, most of those components they don't require any user interaction [01:05.080 --> 01:11.020] and this is what brings us to the mission control system which is the main interface. [01:12.160 --> 01:19.340] It is the main interface between the ground station and other components. It also serves as [01:20.140 --> 01:27.020] primary interface between the spacecraft controllers and the spacecraft itself [01:27.740 --> 01:34.180] which I would argue makes it the most vulnerable system in the whole ground segment. [01:34.220 --> 01:38.900] As you know the weakest link of every information system is humans. [01:40.140 --> 01:46.300] For decades the space missions were operated from dedicated mission control rooms [01:47.260 --> 01:53.620] accessible only by the spacecraft controllers. [01:54.040 --> 01:57.020] This however has changed recently mainly due to COVID. [01:58.980 --> 02:04.740] The organization started opening up and letting their users or their spacecraft operators to [02:05.260 --> 02:11.640] conduct operations remotely. This of course creates a new attack surface for the mission [02:11.640 --> 02:16.920] control system which is usually a very outdated software and vulnerable to typical [02:18.520 --> 02:23.170] vulnerabilities which we have on any other software that we use on a daily basis. [02:23.820 --> 02:30.640] So what is being done about it? From the space community perspective obviously we expand [02:30.640 --> 02:39.220] strategies to include security aspects. We impose security policies and then we also introduce [02:39.220 --> 02:46.060] security requirements to our systems. However I don't think it's gonna be enough at this point [02:46.060 --> 02:51.320] and as we will see later there is one very specific element that is missing into those [02:52.520 --> 02:55.950] into the actions which is the offensive security testing. [02:58.640 --> 03:04.840] So every organization has their own mission control system. They try to develop their own [03:04.840 --> 03:11.460] software because you know what as they say the space is hard right so they have to do it [03:11.460 --> 03:18.040] themselves. So some of that software is open source so what we have done we decided to have [03:18.120 --> 03:24.920] a look at it and see how they perform from the vulnerability standpoint. And here is what [03:24.920 --> 03:29.720] we have found out. Full disclosure all those vulnerabilities have been already disclosed [03:30.280 --> 03:36.780] using the contacting the vendor and they have been already addressed and [03:38.180 --> 03:44.680] and all of them have CVE assigned. So on NASA OpenMCT we have found a couple of [03:44.680 --> 03:52.560] vulnerabilities such as prototype pollution, XSS and CSRF. On the IMCS which is another mission [03:52.560 --> 03:58.960] control system it is one of the more established ones. We have found a few more vulnerabilities [03:58.960 --> 04:05.160] such as directory traversal, arbitrary file deletion, session hijacking and a few XSS [04:05.160 --> 04:12.560] vulnerabilities. And then on NASA AIT core we have found and NASA AIT core is like a framework to [04:12.560 --> 04:19.360] develop ground segment software by different missions. We have found SQL injection, a few [04:19.360 --> 04:25.880] local code executions and also realized that the encryption in the communication is completely [04:25.880 --> 04:31.600] missing. So as you've seen before that most of those vulnerabilities they don't have that [04:32.540 --> 04:37.420] much of an impact on the mission. However this is where the training of vulnerability is going to [04:37.420 --> 04:43.420] play. And in case of the IMCS we decided to combine a directory traversal, session hijacking [04:43.980 --> 04:50.340] and XSS. And that led us to quite severe sensitive information disclosure because now [04:50.900 --> 04:55.500] the attackers can when the XSS is triggered the attackers can actually retrieve [04:55.500 --> 04:59.320] any arbitrary file that is stored on the IMCS server. [05:01.020 --> 05:07.980] So here is a let's have a look at typical scenario. So this is like a very high level [05:07.980 --> 05:11.660] overview of a space mission. You have a space segment from right to left you have a space [05:11.660 --> 05:16.400] left you have a space segment. There is a ground station, there is the IMCS which is the mission [05:16.400 --> 05:23.960] control system in subject that is used by Bob to send telemetry, send telecommands and receive [05:23.960 --> 05:29.600] telemetry from spacecraft. We also have Alice that is working with Bob and the whole organization [05:29.600 --> 05:38.060] has a publicly facing website. Now we also have an attacker and that has a C2 server. Now as it [05:38.060 --> 05:43.440] usually goes there is a recon and phishing campaign. The adversaries learn about Alice from the [05:43.440 --> 05:49.260] public website. They decide to target her with phishing campaign. [05:50.580 --> 05:56.320] Alice takes the bait. Unfortunately she clicks on a link or opens a word document [05:56.320 --> 06:03.580] and that deploys the C2 beacon on her workstation. This way making her workstation compromised. [06:06.790 --> 06:10.250] The attackers now have access to her workstation. They learn about Bob [06:11.150 --> 06:16.330] from her emails and they decided to target Bob with an internal phishing campaign. [06:16.510 --> 06:23.570] They send him an email with some payload that would trigger the XSS and they do it as Alice. [06:25.130 --> 06:32.430] So Bob trusts Alice. He executes the payload that triggers the XSS. That XSS then because [06:32.430 --> 06:38.870] there is a session hijacking vulnerability and the traversal director vulnerability [06:40.390 --> 06:51.070] that triggers the... this lets the attackers to retrieve any arbitrary file on the NCS server. [06:51.550 --> 06:56.550] Now if Bob has access to the internet, the files can be directly retrieved and sent to [06:56.550 --> 07:02.710] attacker workstation. Otherwise if Bob is behind the firewall or is using VPN, [07:03.350 --> 07:09.390] we can use Alice's workstation as a proxy and then retrieve the files using the C2 beacon. [07:11.330 --> 07:15.830] So I have prepared a short demo how that would look like in practice. [07:18.940 --> 07:26.040] So what you will see here, this is the exploit we developed. It generates a payload that will end up [07:26.640 --> 07:33.860] being sent to the Bob and Bob will actually use that payload and because he thought that [07:33.860 --> 07:39.700] it was received from Alice, load it on the NCS and then that would trigger our exploit chain. [07:43.080 --> 07:51.140] So first this exploit generates the payload, which is called XMILJS and also starts the HTTP server. [07:52.060 --> 08:00.300] Bob is gonna load that file on the NCS server. Imagine that is one of the telemetry displays [08:00.300 --> 08:11.640] that Alice decided to share with him. So he loads the file and he decides to open it [08:12.740 --> 08:20.880] and that's all he sees. Now under the hoods there was an XSS triggered that would retrieve the file [08:20.880 --> 08:26.140] and then send it back because of the directed traversal and send back the content to the [08:26.140 --> 08:31.960] HTTP server that was started by the attacker. [08:33.340 --> 08:39.980] So here like in any example of proof of concept, you can see we got the access to [08:39.980 --> 08:47.220] etc password file content. So combining those vulnerabilities is actually quite easy so [08:48.560 --> 08:50.780] the whole exploit is easy. [09:07.250 --> 09:14.810] So next up is the vulnerability chain, the exploit chain for NASA IIT Core. Combining [09:14.810 --> 09:19.370] one of the local execution, a code execution and missing encryption, we managed to [09:19.930 --> 09:26.290] conduct a man-in-the-middle attack and inject our own payload into the communication [09:27.950 --> 09:33.050] string which then is triggered on the telemetry client and then is executed, [09:33.050 --> 09:42.530] giving us the reverse shell. So I'll quickly start another demo and explain what you see. [09:49.590 --> 09:57.030] So basically what you see here on the top left side you have telemetry client, [09:57.570 --> 10:05.450] on the left bottom side you have telemetry simulator, that is both are provided by the [10:05.450 --> 10:11.310] IIT Core. On the right side you have our exploit on the top and then on the bottom side on the [10:11.310 --> 10:16.490] right bottom you have the NESCAS list that is going to grab the or is going to receive the [10:16.490 --> 10:24.890] reverse shell. So we start the telemetry client first on the on the left side. [10:26.590 --> 10:32.370] Now this is what would normally be happening on the mission control or on the ground station. [10:35.650 --> 10:41.270] Then we start telemetry simulator which will generate some telemetry packets. [10:42.690 --> 10:49.270] As if they were coming down from spacecraft. We start our NESCAS listener and you can see on the [10:49.270 --> 10:53.130] left hand side on the left hand side we already have started receiving some telemetry from the [10:53.130 --> 11:08.860] simulator. Then we run our exploit that is conducting the man-in-the-middle attack and [11:09.460 --> 11:13.900] then the first frame, so we have injected our frame and the first frame, so the first frame [11:13.900 --> 11:19.700] that is sent from telemetry simulator to the ground station is caught by the man-in-the-middle [11:19.700 --> 11:26.340] attack. There we injected our payload which you can see down here as well and that was actually [11:26.340 --> 11:32.940] executed and it was triggered and it gave us the reverse shell to the telemetry client [11:32.940 --> 12:02.820] running on the mission control. So that's another proof of concept. Sorry about that. [12:09.330 --> 12:17.410] So just for reference we have this is split between static and dynamic analysis which we [12:17.410 --> 12:23.290] have done on those systems. It is still important to conduct static analysis because as you can see [12:23.290 --> 12:27.890] the log hanging fruits and many other vulnerabilities are found using those but [12:28.410 --> 12:33.490] static analysis will not catch everything so you have to conduct the [12:33.490 --> 12:38.390] dynamic analysis and then you have to try to conduct the exploitation phase. [12:40.050 --> 12:44.450] In case of SCOS2000, SCOS2000 is one of the main mission control systems developed by [12:44.450 --> 12:50.250] European Space Agency. We haven't done any extensive analysis on the system, any vulnerability [12:50.250 --> 12:56.950] research. We only run the flow finder on it and using the static code analysis you can see [12:57.670 --> 13:03.750] I'm pretty sure that at least one of those almost 2,500 buffer overflow vulnerabilities would be [13:03.750 --> 13:13.040] exploitable. So in conclusion, the point I'm trying to make is that the space applications [13:13.040 --> 13:20.000] are still not properly being tested from the offensive security standpoint. The best way is to [13:20.540 --> 13:26.720] hire a service to do it properly or you can also try to do it yourself but you have to do it and [13:26.720 --> 13:33.700] you have to include it in your frameworks and you should do it before the adversaries do it for you. [13:34.920 --> 13:40.960] So as I mentioned before, all that research was already published so here you can find, I guess [13:40.960 --> 13:46.900] the slides will be provided afterwards so you can have a look at the publications. Otherwise, [13:46.900 --> 13:51.320] if you want the links today, you can hit me up after the talk and I'll give it to you. [13:52.960 --> 13:55.180] And that was it. Thank you very much.