tzuk wrote:This is too vague, but my first suggestion would be, load the driver outside the sandbox? It's not like you can load a driver on a per-process basis, a driver is something you can only load once into the system. So load it outside the sandbox. The code that uses the driver can still run in the sandbox.
In any case I have to go now so we can pick this up later on.
Let me know how to make it more concrete.
I loaded the DLL (it uses madCodeHook, you may heard of it) outside the sandbox.
When I run a program (MALWARE.EXE) not sandboxed, my DLL does not allow the deletion of files by MALWARE.EXE. (All programs may delete files except MALWARE.EXE)
When I run MALWARE.EXE sandboxed, my DLL does not take effect and files get removed from the sandbox contents folder.
I can send you the launcher for the DLL, the DLL and a MALWARE.EXE file example so you can check yourself that it´s like I say.
Anyway your method of writing a DLL that disallow file deletion and loading it through InjectDll sounds as better method.
If you explain how to make it I could write such DLL that could be used as a plugin.
This would resolve also the feature request of SJ2571.