1 00:00:00,000 --> 00:00:02,500 Hi everyone, my name is Andy. 2 00:00:02,500 --> 00:00:05,920 I'm going to present you with some offensive security testing. 3 00:00:07,460 --> 00:00:15,620 In this presentation I will briefly introduce you to the ground segment and the software that we use on it. 4 00:00:15,860 --> 00:00:32,440 I will focus on one particular software which is the mission control system and I will show you some vulnerabilities which we have found on those software applications and then give you a couple of demos on how we managed to exploit them. 5 00:00:34,180 --> 00:00:38,880 Ground segment consists of many interconnected components or elements. 6 00:00:38,880 --> 00:00:49,250 You can see on this orange part where exactly it lies in the space mission. 7 00:00:49,780 --> 00:00:51,900 It consists of different elements. 8 00:00:51,900 --> 00:01:01,360 All those elements perform different functions but they all depend on each other either by receiving input from or sending outputs to other components. 9 00:01:01,920 --> 00:01:11,020 However, most of those components they don't require any user interaction and this is what brings us to the mission control system which is the main interface. 10 00:01:12,160 --> 00:01:17,480 It is the main interface between the ground station and other components. 11 00:01:17,480 --> 00:01:34,180 It also serves as primary interface between the spacecraft controllers and the spacecraft itself which I would argue makes it the most vulnerable system in the whole ground segment. 12 00:01:34,220 --> 00:01:38,900 As you know the weakest link of every information system is humans. 13 00:01:40,140 --> 00:01:53,620 For decades the space missions were operated from dedicated mission control rooms accessible only by the spacecraft controllers. 14 00:01:54,040 --> 00:01:57,020 This however has changed recently mainly due to COVID. 15 00:01:58,980 --> 00:02:08,120 The organization started opening up and letting their users or their spacecraft operators to conduct operations remotely. 16 00:02:08,140 --> 00:02:23,170 This of course creates a new attack surface for the mission control system which is usually a very outdated software and vulnerable to typical vulnerabilities which we have on any other software that we use on a daily basis. 17 00:02:23,820 --> 00:02:26,260 So what is being done about it? 18 00:02:26,660 --> 00:02:35,240 From the space community perspective obviously we expand strategies to include security aspects. 19 00:02:35,360 --> 00:02:41,740 We impose security policies and then we also introduce security requirements to our systems. 20 00:02:42,980 --> 00:02:55,950 However I don't think it's gonna be enough at this point and as we will see later there is one very specific element that is missing into those into the actions which is the offensive security testing. 21 00:02:58,640 --> 00:03:03,680 So every organization has their own mission control system. 22 00:03:03,680 --> 00:03:12,200 They try to develop their own software because you know what as they say the space is hard right so they have to do it themselves. 23 00:03:12,920 --> 00:03:23,200 So some of that software is open source so what we have done we decided to have a look at it and see how they perform from the vulnerability standpoint. 24 00:03:24,140 --> 00:03:26,380 And here is what we have found out. 25 00:03:26,380 --> 00:03:40,700 Full disclosure all those vulnerabilities have been already disclosed using the contacting the vendor and they have been already addressed and and all of them have CVE assigned. 26 00:03:41,420 --> 00:03:50,120 So on NASA OpenMCT we have found a couple of vulnerabilities such as prototype pollution, XSS and CSRF. 27 00:03:50,720 --> 00:03:56,060 On the IMCS which is another mission control system it is one of the more established ones. 28 00:03:56,400 --> 00:04:06,380 We have found a few more vulnerabilities such as directory traversal, arbitrary file deletion, session hijacking and a few XSS vulnerabilities. 29 00:04:07,520 --> 00:04:16,980 And then on NASA AIT core we have found and NASA AIT core is like a framework to develop ground segment software by different missions. 30 00:04:16,980 --> 00:04:26,760 We have found SQL injection, a few local code executions and also realized that the encryption in the communication is completely missing. 31 00:04:27,540 --> 00:04:34,960 So as you've seen before that most of those vulnerabilities they don't have that much of an impact on the mission. 32 00:04:34,960 --> 00:04:38,100 However this is where the training of vulnerability is going to play. 33 00:04:38,840 --> 00:04:45,460 And in case of the IMCS we decided to combine a directory traversal, session hijacking and XSS. 34 00:04:45,820 --> 00:04:59,320 And that led us to quite severe sensitive information disclosure because now the attackers can when the XSS is triggered the attackers can actually retrieve any arbitrary file that is stored on the IMCS server. 35 00:05:01,020 --> 00:05:05,020 So here is a let's have a look at typical scenario. 36 00:05:05,500 --> 00:05:09,220 So this is like a very high level overview of a space mission. 37 00:05:09,220 --> 00:05:13,440 You have a space segment from right to left you have a space left you have a space segment. 38 00:05:13,740 --> 00:05:25,520 There is a ground station, there is the IMCS which is the mission control system in subject that is used by Bob to send telemetry, send telecommands and receive telemetry from spacecraft. 39 00:05:26,240 --> 00:05:31,620 We also have Alice that is working with Bob and the whole organization has a publicly facing website. 40 00:05:31,820 --> 00:05:36,420 Now we also have an attacker and that has a C2 server. 41 00:05:36,640 --> 00:05:40,900 Now as it usually goes there is a recon and phishing campaign. 42 00:05:41,380 --> 00:05:45,340 The adversaries learn about Alice from the public website. 43 00:05:45,460 --> 00:05:49,260 They decide to target her with phishing campaign. 44 00:05:50,580 --> 00:05:52,380 Alice takes the bait. 45 00:05:53,200 --> 00:06:00,320 Unfortunately she clicks on a link or opens a word document and that deploys the C2 beacon on her workstation. 46 00:06:00,360 --> 00:06:03,580 This way making her workstation compromised. 47 00:06:06,790 --> 00:06:09,390 The attackers now have access to her workstation. 48 00:06:09,390 --> 00:06:16,330 They learn about Bob from her emails and they decided to target Bob with an internal phishing campaign. 49 00:06:16,510 --> 00:06:23,570 They send him an email with some payload that would trigger the XSS and they do it as Alice. 50 00:06:25,130 --> 00:06:27,070 So Bob trusts Alice. 51 00:06:27,070 --> 00:06:30,850 He executes the payload that triggers the XSS. 52 00:06:30,890 --> 00:06:51,070 That XSS then because there is a session hijacking vulnerability and the traversal director vulnerability that triggers the... this lets the attackers to retrieve any arbitrary file on the NCS server. 53 00:06:51,550 --> 00:06:57,930 Now if Bob has access to the internet, the files can be directly retrieved and sent to attacker workstation. 54 00:06:58,210 --> 00:07:09,390 Otherwise if Bob is behind the firewall or is using VPN, we can use Alice's workstation as a proxy and then retrieve the files using the C2 beacon. 55 00:07:11,330 --> 00:07:15,830 So I have prepared a short demo how that would look like in practice. 56 00:07:18,940 --> 00:07:22,880 So what you will see here, this is the exploit we developed. 57 00:07:23,580 --> 00:07:39,700 It generates a payload that will end up being sent to the Bob and Bob will actually use that payload and because he thought that it was received from Alice, load it on the NCS and then that would trigger our exploit chain. 58 00:07:43,080 --> 00:07:51,140 So first this exploit generates the payload, which is called XMILJS and also starts the HTTP server. 59 00:07:52,060 --> 00:07:57,560 Bob is gonna load that file on the NCS server. 60 00:07:58,100 --> 00:08:02,940 Imagine that is one of the telemetry displays that Alice decided to share with him. 61 00:08:07,140 --> 00:08:14,620 So he loads the file and he decides to open it and that's all he sees. 62 00:08:14,620 --> 00:08:31,960 Now under the hoods there was an XSS triggered that would retrieve the file and then send it back because of the directed traversal and send back the content to the HTTP server that was started by the attacker. 63 00:08:33,340 --> 00:08:42,680 So here like in any example of proof of concept, you can see we got the access to etc password file content. 64 00:08:43,400 --> 00:08:50,780 So combining those vulnerabilities is actually quite easy so the whole exploit is easy. 65 00:09:07,250 --> 00:09:13,870 So next up is the vulnerability chain, the exploit chain for NASA IIT Core. 66 00:09:14,250 --> 00:09:33,050 Combining one of the local execution, a code execution and missing encryption, we managed to conduct a man-in-the-middle attack and inject our own payload into the communication string which then is triggered on the telemetry client and then is executed, 67 00:09:33,050 --> 00:09:34,950 giving us the reverse shell. 68 00:09:35,850 --> 00:09:42,530 So I'll quickly start another demo and explain what you see. 69 00:09:49,590 --> 00:10:06,410 So basically what you see here on the top left side you have telemetry client, on the left bottom side you have telemetry simulator, that is both are provided by the IIT Core. 70 00:10:06,450 --> 00:10:17,490 On the right side you have our exploit on the top and then on the bottom side on the right bottom you have the NESCAS list that is going to grab the or is going to receive the reverse shell. 71 00:10:18,530 --> 00:10:24,890 So we start the telemetry client first on the on the left side. 72 00:10:26,590 --> 00:10:32,370 Now this is what would normally be happening on the mission control or on the ground station. 73 00:10:35,650 --> 00:10:41,270 Then we start telemetry simulator which will generate some telemetry packets. 74 00:10:42,690 --> 00:10:45,190 As if they were coming down from spacecraft. 75 00:10:45,590 --> 00:10:53,950 We start our NESCAS listener and you can see on the left hand side on the left hand side we already have started receiving some telemetry from the simulator. 76 00:11:04,540 --> 00:11:20,600 Then we run our exploit that is conducting the man-in-the-middle attack and then the first frame, so we have injected our frame and the first frame, so the first frame that is sent from telemetry simulator to the ground station is caught by the man-in-the-middle attack. 77 00:11:20,600 --> 00:11:34,560 There we injected our payload which you can see down here as well and that was actually executed and it was triggered and it gave us the reverse shell to the telemetry client running on the mission control. 78 00:11:37,300 --> 00:11:40,160 So that's another proof of concept. 79 00:12:01,200 --> 00:12:02,820 Sorry about that. 80 00:12:09,330 --> 00:12:19,050 So just for reference we have this is split between static and dynamic analysis which we have done on those systems. 81 00:12:20,050 --> 00:12:38,390 It is still important to conduct static analysis because as you can see the log hanging fruits and many other vulnerabilities are found using those but static analysis will not catch everything so you have to conduct the dynamic analysis and then you have to try to conduct the exploitation phase. 82 00:12:40,050 --> 00:12:46,510 In case of SCOS2000, SCOS2000 is one of the main mission control systems developed by European Space Agency. 83 00:12:46,630 --> 00:12:51,210 We haven't done any extensive analysis on the system, any vulnerability research. 84 00:12:51,210 --> 00:13:04,650 We only run the flow finder on it and using the static code analysis you can see I'm pretty sure that at least one of those almost 2,500 buffer overflow vulnerabilities would be exploitable. 85 00:13:07,660 --> 00:13:17,400 So in conclusion, the point I'm trying to make is that the space applications are still not properly being tested from the offensive security standpoint. 86 00:13:18,540 --> 00:13:33,700 The best way is to hire a service to do it properly or you can also try to do it yourself but you have to do it and you have to include it in your frameworks and you should do it before the adversaries do it for you. 87 00:13:34,920 --> 00:13:45,880 So as I mentioned before, all that research was already published so here you can find, I guess the slides will be provided afterwards so you can have a look at the publications. 88 00:13:46,400 --> 00:13:51,320 Otherwise, if you want the links today, you can hit me up after the talk and I'll give it to you. 89 00:13:52,960 --> 00:13:54,220 And that was it. 90 00:13:54,240 --> 00:13:55,180 Thank you very much.