| Message |
OK, well I have to say Twisol tipped me over the edge, so to speak, when he correctly pointed out that the issue is not so much with plugins (although that is indeed a major issue), but with plugins that have to load other files.
Once we agree that a sophisticated, useful, plugin is likely to contain things like extra files, DLLs even, maybe "pre-installation" things to do (just run my Setup.exe), it is going to be hard or impossible to make it all secure.
All it takes for a malicious person to do is convince the player to install his plugin (written in, say, Perl) and click through any warnings about unsigned files.
In fact, this happens all the time. You buy a new printer, and the driver installations instructions say "you may get a warning about an unsigned driver, just say OK". People are used to it.
So I am inclined to agree now that the sandbox is an annoyance more than anything else.
How is this for a compromise? Instead of getting rid of it, we simply shift, for future releases, the default. The default would be to trust all worlds and all plugins, and allow DLLs to be loaded.
This effectively makes Lua as secure (or insecure if you like) as all the other script languages.
Now anyone who is worried about security can just switch the "trust all plugins" back to false (or more simply, not install plugins they don't trust in the first place).
In fact, because of that last idea (if you are worried, don't install plugins) this may mean the sandbox could just be blanked out, and maybe a comment put there that if you want, you can install <suggested code> from this web site.
To be honest, I think security has to be built in from the ground up. Once you have virtually unlimited script engines you can install, it is going to be a very hard task to make it totally secure, and someone that wants to will find the least secure part (and who knows what that is?) to launch their attack.
Just as an aside, World of Warcraft has a somewhat more secure scripting environment (even though it is Lua). As far as I can see they compiled Lua into the executable (rather than using a DLL, so you can't just swap to a different DLL), don't allow other script languages, don't allow things like file access (and loading DLLs), and have some system of trusted paths (to defeat bots). From what I have read, the Lua code is considered trusted until it hits the user-written portion, and then it becomes untrusted. The untrusted code has restrictions on it to make botting harder.
However none of that would work here, for one thing the client source is publicly available, and for another there would be screams of protest if we tried to get rid of all the other scripting languages, permanently. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|