I have a project that loads 3rd party modules (in the form of DLLs) and allows them to execute arbitrary code. The application loading the modules requires elevated privileges as so too will the modules.
The modules are all made in house for this project, so the risk is relatively low at the moment. However, in the future there might be outside modules needing to be loaded.
The modules don't have any need to modify, access, or do anything with any of the drives, so I would like to be able to disable any form of I/O in the modules. I haven't figure out any way to do this, or even where to start.
The dependency injection is from MEF, specifically using the Prism design patterns.