Hi everyone, my name is Andy. I'm going to present you with some offensive security testing. In this presentation I will briefly introduce you to the ground segment and the software that we use on it. 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. Ground segment consists of many interconnected components or elements. You can see on this orange part where exactly it lies in the space mission. It consists of different elements. All those elements perform different functions but they all depend on each other either by receiving input from or sending outputs to other components. 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. It is the main interface between the ground station and other components. 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. As you know the weakest link of every information system is humans. For decades the space missions were operated from dedicated mission control rooms accessible only by the spacecraft controllers. This however has changed recently mainly due to COVID. The organization started opening up and letting their users or their spacecraft operators to conduct operations remotely. 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. So what is being done about it? From the space community perspective obviously we expand strategies to include security aspects. We impose security policies and then we also introduce security requirements to our systems. 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. So every organization has their own mission control system. 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. 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. And here is what we have found out. 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. So on NASA OpenMCT we have found a couple of vulnerabilities such as prototype pollution, XSS and CSRF. On the IMCS which is another mission control system it is one of the more established ones. We have found a few more vulnerabilities such as directory traversal, arbitrary file deletion, session hijacking and a few XSS vulnerabilities. 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. We have found SQL injection, a few local code executions and also realized that the encryption in the communication is completely missing. So as you've seen before that most of those vulnerabilities they don't have that much of an impact on the mission. However this is where the training of vulnerability is going to play. And in case of the IMCS we decided to combine a directory traversal, session hijacking and XSS. 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. So here is a let's have a look at typical scenario. So this is like a very high level overview of a space mission. You have a space segment from right to left you have a space left you have a space segment. 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. We also have Alice that is working with Bob and the whole organization has a publicly facing website. Now we also have an attacker and that has a C2 server. Now as it usually goes there is a recon and phishing campaign. The adversaries learn about Alice from the public website. They decide to target her with phishing campaign. Alice takes the bait. Unfortunately she clicks on a link or opens a word document and that deploys the C2 beacon on her workstation. This way making her workstation compromised. The attackers now have access to her workstation. They learn about Bob from her emails and they decided to target Bob with an internal phishing campaign. They send him an email with some payload that would trigger the XSS and they do it as Alice. So Bob trusts Alice. He executes the payload that triggers the XSS. 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. Now if Bob has access to the internet, the files can be directly retrieved and sent to attacker workstation. 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. So I have prepared a short demo how that would look like in practice. So what you will see here, this is the exploit we developed. 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. So first this exploit generates the payload, which is called XMILJS and also starts the HTTP server. Bob is gonna load that file on the NCS server. Imagine that is one of the telemetry displays that Alice decided to share with him. So he loads the file and he decides to open it and that's all he sees. 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. So here like in any example of proof of concept, you can see we got the access to etc password file content. So combining those vulnerabilities is actually quite easy so the whole exploit is easy. So next up is the vulnerability chain, the exploit chain for NASA IIT Core. 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, giving us the reverse shell. So I'll quickly start another demo and explain what you see. 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. 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. So we start the telemetry client first on the on the left side. Now this is what would normally be happening on the mission control or on the ground station. Then we start telemetry simulator which will generate some telemetry packets. As if they were coming down from spacecraft. 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. 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. 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. So that's another proof of concept. Sorry about that. So just for reference we have this is split between static and dynamic analysis which we have done on those systems. 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. In case of SCOS2000, SCOS2000 is one of the main mission control systems developed by European Space Agency. We haven't done any extensive analysis on the system, any vulnerability research. 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. 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. 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. 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. Otherwise, if you want the links today, you can hit me up after the talk and I'll give it to you. And that was it. Thank you very much.