4
votes

We are developing an online test application for XSLT processors in ASP.NET, however, I'm a bit worried about how to limit the vulnerabilities of our system. Is it possible with .NET to sandbox a third party unmanaged or managed application? It should:

  • not be allowed to start any other process by any means or vulnerability;
  • have no access to other existing processes on the system;
  • be killed when it takes too much processing power or memory;
  • work with both managed and unmanaged external applications;
  • should not be able to access system calls

Some applications have a managed API, but that doesn't suffice because than I need to run it in the same processing space as ASP.NET with all potential risks (stack overflow, memory exceptions, buffer overflow). I'm not aware whether .NET offers sandboxing of unmanaged applications.

We currently execute the external program in a console with specific affinity and monitor this, but that doesn't feel like a right or even closely safe approach.

1
+1 That's a very broad set of requirements for a very narrow understanding of the external assembly. I would be worried too. :) I'm glad that's not my requirement. It's interesting though.rfmodulator

1 Answers

0
votes

You can execute managed code within an AppDomain which can be configured to provide some level of protection, however as soon as you allow unmanaged code to run, its pretty much got access to everything the user its running under has access to. I'm pretty sure you can prevent unmanaged/unsafe code being executed within an AppDomain though.