0

Scenario: a locked-down (i.e. unmodifiable by non-admin users) Visual Studio 2013 (could be any edition from Shell to Ultimate) install should conditionally load an untrusted (all user writable) VS Extension (PTVS).

VS2013 is built atop .NET 4.5.1 and has a corresponding devenv.exe.config and security model. PTVS extensions are largely C# .NET DLLs.

My tentative thoughts - any input on how to implement / whether they're possible / potential issues appreciated:

  • only load the untrusted extension when Visual Studio finds a particular environment variable is set

    • the check would ideally be "lightweight" such as some kind of devenv.exe.config condition,

    • failing that perhaps some manner of "chaining" of a trusted/checking VSIX to the untrusted extension.

Suggesting the extension being loaded aborts sans variable isn't helpful - the whole point is that that extension isn't trusted.

(Any other manner of easily controlled environmental flag that's not persistent across a logoff/logon would be equally acceptable - e.g. I could look for a process I know only runs in untrusted scenarios - just seems harder anyway).

For the curious:

  • if the variable's set, Visual Studio is being started in an unsafe way anyway (via a writable cmd.exe script), so no additional harm from loading an unsafe extension - just trying to protect people who aren't even part of the untrusted "ecosystem" (so to speak), but use the same physical machine for Visual Studio.
2
  • "VS2013 is built atop .NET 4.5.1" - Pretty sure VS2013 shell is still largely native c/c++ COM if the VS SDK (particularly the project system) is anything to go by. Are environmental variables a wise choice for security? A regular user can set them
    – user585968
    Oct 31, 2014 at 13:44
  • @MickyDuncan: one user on our system can't affect the environment of a user logging on later, so they're adequate. We're not trying to prevent another user from being able to load an untrusted executable if they're determined, just to prevent them defaulting to having it load based on an early user's tampering. Oct 31, 2014 at 15:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.