My kids want me to install some KSP mods. Some mods are just Config files, but I read that others contain C# code. Does this second class of mod allow arbitrary code execution? Could an unscrupulous mod developer install a virus or spyware via a mod, or is the mod system basically an airtight sandbox?
1 Answer
In theory, yes, a mod maker could use a mod to spread malware. This is true of pretty much any 3rd party program, regardless of intent or source.
There are however a couple of safety measures you can take to minimize the risks:
- Only download mods from well-known and trusted sites: Either at Curseforge (https://www.curseforge.com/kerbal/ksp-mods), which is officially endorsed by the makers of the game, OR Spacedock (https://spacedock.info/kerbal-space-program), which was created by fans who were unhappy when Squad (the makers of Kerbal) moved to Curseforge for mods. Both of these sites are well known by the community and have their reputation at stake over their mods being safe to use.
- Make sure all programs on your PC are up to date with the latests patches and updates.
- After downloading a mod, run it through a mass scan tool like VirusTotal or MetaScan before installing it.
- (Advanced) Use Sandboxie or another software sandboxer to install the mod and run Kerbal, to protect the rest of your computer in case a mod does have malware.
-
1If you willingly install something that turns out to be a virus, keeping your PC up to date doesn't do anything. Keeping your PC up to date prevents attackers from installing viruses, it doesn't prevent users from installing viruses.– ElvaCommented Dec 10, 2018 at 9:47
-
Thanks, I think this answered my question. For what it's worth, it is possible to build a sandboxed mod system. For example, the Javascript running in your browser doesn't have access to your file system or to other tabs in your browser (barring something silly like a processor exploit). I was curious how much effort KSP had put into sandboxing their mod system... sounds like not much.– JDBCommented Dec 10, 2018 at 20:17
-
@Kevin No, but keeping your PC up to date could stop viruses from inflicting too much damage after installing them.– NzallCommented Dec 10, 2018 at 21:57
-
One additional thing I would mention is to only use mods which already have a good reputation in the community. It is far less likely that there is a hidden malware in a mod like MechJeb or Kerbal Engineer which half the community uses than from a new mod some unknown person uploaded a day ago. The admins of the mod repositories aren't infallible. I am not even sure they screen submissions before putting them online. It is possible they get tricked into accepting a malware mod. But when hundreds of thousands of people downloaded a mod, it would be unlikely that nobody ever noticed the malware.– PhilippCommented Dec 11, 2018 at 13:46
-
@Philipp - That's a pretty dangerous assumption. It's not unheard of for very popular apps/mods/etc to contain malware. The more popular a platform/game becomes, the more likely that someone will try to exploit that. The dumb criminals make their malware easy to spot. The smart ones make something useful and hide the malware within. It's a good idea to be suspicious about free software, especially if it's really good.– JDBCommented Dec 11, 2018 at 18:19