TurlaBoy wrote:Calling syscalls directly(using sysenter/syscall) is the most efective way to bypass any sandbox implementations in ring3(useless pieces of crap), both PsSetCreateThreadNotifyRoutine/ObRegisterCallbacks can be bypassed by poisoning a single variable into kernel .data this means 2 things, first, 99.9% of malware seen in wild are coded by noobs that does tons of crap, second, if you have a brain you can bypass pretty much everything with a very litlle efford because security solutions are made by more noobs that only do pieces of shit codeActually a lot of usermode sandboxes such as sandboxie and chrome do the opposite of what you might think. Instead of using the hooks to stop certain operations, they use it to allow.
The sandboxed process is created with minimum integrity (no write access to other processes, registry, or disk, except for special areas such as %appdata%\LocalLow and HKEY_CURRENT_USER\Software\LowRegistry),
The sandboxed process inherits a named-pipe or similar from the parent process (Which is normal integrity or higher).
Inside the sandboxed process, all native functions are hooked.
When a native function is called, the hook formats the data and passes it to parent process on the named pipe.
The parent process takes the data from the named pipe and filters it, before executing the actual call.
Removal or bypassing of hooks in the sandboxes process would actually mean you can do absolutely nothing except write to %appdata%\LocalLow and HKEY_CURRENT_USER\Software\LowRegistry. Most user mode sandboxes now use this technique, although in the XP days before the Windows integrity mechanism you could just bypass sandbox by evading hooks.