sandboxing

"Watch Dog" or sandbox system in c#

I have a function that I want to allow to run for a given length of time and then, if it hasn't quit on it's own, abort. What is the best way to do this? The best I have thought of would be to run it in another thread, wait with a timeout for it to die and then use Thread.Abort() to kill it (this might not work if the function has the w...

.NET - Lower Application Privileges

I would like to know how to programmatically lower my application's privileges. So, let's say someone with admin privileges runs my program, I would like my program to still run under a normal user's environment or with less privileges that I don't need. Also, could you explain what is restricted in the lower trust environment? Edit: ...

Sandboxing plugins with Managed Extensibility Framework

I'm working on an application where third party developers will be able to write plugins. I've been looking a little at Managed Extensibility Framework and it seems the right way to go. One thing though, I want to prevent plugins from accessing the rest of the application freely (calling singletons etc) but would want to restrict to to ...

C++: Any way to 'jail function'?

Well, it's a kind of a web server. I load .dll(.a) files and use them as program modules. I recursively go through directories and put '_main' functors from these libraries into std::map under name, which is membered in special '.m' files. The main directory has few directories for each host. The problem is that I need to prevent usa...

err adding sandbox webpart

i have sandbox user code service running in MMC and in CA as well. It gets deployed from vs 2010 without any errors.Still when I try to add a sandboxed web part I get error message like " The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request." I am using windows 7 pro...

What is the best method to dynamically sandbox inline JavaScript?

I have a WordPress plugin that loads pages with AJAX and to ensure compatibility with other plugins and "widgets." As of right now I use the following code to evaluate all inline JS that is inside the content blocks to be updated: function do_JS(e){ var Reg = '(?:<script.*?>)((\n|.)*?)(?:</script>)'; var match = ne...

What is a good way to "sandbox" Ruby 1.8.6 and 1.9.1?

Nowadays I hope to have 2 Ruby versions on the same machine, because some gems are good for 1.8.6 only and at the same time, 1.9.1 is fast and it is to try out with Rails 2.3. Is there a good way to sandbox the two versions? I installed 1.9.1 onto C:\ruby and 1.8.6 onto C:\ruby1.8.6, and change inside of C:\ruby1.8.6\bin copy ruby.exe...

Anyway to create a php sandbox for a user to develop in?

A user on my site and I are going to be developing a new web app. Id like to create a folder that we can work in without the fear that he could read outside that folder potentially reading config files etc. Is there a way to create a sandboxed area that would prevent the user from including outside that folder - while still keeping the ...

Sandboxing web services with Python

I'm building an integration test for a web application that has multiple interdependent services. All of them depend on a shared resource in order to run correctly. I'd like to make sure that the data in the system is sane when its live so I'm leveraging a live service. I'm using Python to build it and this is my idea on how to sandbox t...

What is the safest way to run an executable on Linux?

I am trying to run a program compiled from C code from an unknown source. I want to make sure that the program does not harm my system in anyway. Like for instance, the program might have soemthing like system("rm -rf /") in the source, which is un-detectable, unless the code is thoroughly examined. I thought of the following 2 ways ...