SoapboxRaceWorld / GameLauncher_NFSW

An unofficial launcher for Need for Speed: World (https://launcher.worldunited.gg / https://soapboxrace.world)
GNU General Public License v3.0
424 stars 129 forks source link

Security Issue - Trusted Root CA certificate installation #276

Open d34d10cc opened 3 weeks ago

d34d10cc commented 3 weeks ago

Hello, I've noticed that the launcher installs a custom Root CA certificate onto my machine. After checking the code, it seems that this certificate is used for Authenticode verification of the validity of the signatures of automatically downloaded launcher executables.

I believe I do not need to expound the security implications of this too much to an audience of software developers, but for the sake of thoroughness, with the installation of the "Carbon Crew" CA certificate as a trusted Root CA, users of this launcher automatically become liable to having ALL their encrypted communications with any website or service eavesdropped on.

To clarify, this would require whomever possesses the private keys for the CA to sign fraudulent certificates for whatever service they want to intercept your communications with and then MITM your communications with the service. I have no evidence that either of these things have been happening or will happen and I genuinely do not want to accuse anyone of anything at this point.

However, even if this is in fact a well-intentioned bad execution of the code signature verification idea and not malicious in any way, it is still a pretty egregious security issue for the users of SBRW. For what it's worth, also consider the case wherein the private keys for the CA are stolen in some way from whomever currently has them.

I also want to note that the certificate has a highly inappropriate and unnecessarily broad list of key usage IDs included, of which I would assume that no more than two or three are necessary for the advertised function of this certificate. The complete list follows:

List ``` Server Authentication (1.3.6.1.5.5.7.3.1) Client Authentication (1.3.6.1.5.5.7.3.2) Code Signing (1.3.6.1.5.5.7.3.3) Secure Email (1.3.6.1.5.5.7.3.4) Time Stamping (1.3.6.1.5.5.7.3.8) Unknown Key Usage (1.3.6.1.4.1.311.2.1.21) Unknown Key Usage (1.3.6.1.4.1.311.2.1.22) Microsoft Trust List Signing (1.3.6.1.4.1.311.10.3.1) Unknown Key Usage (1.3.6.1.4.1.311.10.3.3) Encrypting File System (1.3.6.1.4.1.311.10.3.4) Unknown Key Usage (2.16.840.1.113730.4.1) File Recovery (1.3.6.1.4.1.311.10.3.4.1) IP security end system (1.3.6.1.5.5.7.3.5) IP security tunnel termination (1.3.6.1.5.5.7.3.6) IP security user (1.3.6.1.5.5.7.3.7) IP security IKE intermediate (1.3.6.1.5.5.8.2.2) Smart Card Logon (1.3.6.1.4.1.311.20.2.2) OCSP Signing (1.3.6.1.5.5.7.3.9) Unknown Key Usage (1.3.6.1.5.5.7.3.13) Unknown Key Usage (1.3.6.1.5.5.7.3.14) KDC Authentication (1.3.6.1.5.2.3.5) ```

Furthermore, the existence of such a "feature" has not been communicated nearly as transparently as something like this would require IMO, and a short note in the README of this repository is really not enough.

As for remediation, I understand that this kind of scheme was most likely devised in order to avoid paying for a code signing certificate from an actual CA, but if one wants to provide this kind of functionality, it seems pretty hard to avoid or else you get issues like this. Practically, I see a couple of ways forward, with the goodwill of the maintainers of the project:

Lastly, if I have fundamentally misunderstood anything in the code or in the way things are handled in general, please do let me know. I tried to verify whether the certificate perhaps serves another purpose as well; given the unique nature of SBRW, I assumed that maybe it was necessary to somehow emulate what NFSW used to do, however, that does not seem to be the case.

Even if that is true, the practice of adding a trusted Root CA in such an untransparent manner, without consulting the user, or really just in general, is a real breach of security principles and needs to be effectively communicated at the very least, with all its implications, if not immediately remedied.

d34d10cc commented 3 weeks ago

By the way, for any users of SBRW who find their way to this issue, if you want to remove the CA certificate from your OS trust store you should (Windows 10, at least):

I have done this, and I genuinely recommend everyone to do this out of an abundance of caution. Furthermore, it's important to note that when next starting the SBRW launcher it will just download and install the certificate again, so either do not use the SBRW launcher until this matter is resolved or, if you're fine with the risk, delete the certificate as soon as the launcher fully opens or after you are done playing SBRW.