block SetThreadDesktop

Ideas for enhancements to the software
Post Reply
sbieuser

block SetThreadDesktop

Post by sbieuser » Sun Feb 28, 2010 9:56 pm

Anti-Keylogger Tester (AKLT) shows sandboxie doesn't block some keyloggers based on user space API. we may improve the defense with the help of sysinternals Desktops which uses a Windows desktop object for each virtual desktop.

Can sandboxie add a option to enable blocking SetThreadDesktop API to prevent sandboxed process from changing thread's desktop object and hooking into processes in another virtual desktops?

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Mon Mar 01, 2010 6:10 am

I'm not sure I understand why this is needed. Sandboxie hook supervision does not care which desktop is concerned. It checks the hooked process is running in the same sandbox or not regardless of desktop. So rather than use different desktops for isolation, you can use different sandboxes.
tzuk

sbieuser

Post by sbieuser » Mon Mar 01, 2010 7:12 am

If we execute AKLT in virtual Desktop A of sysinternals Desktops, AKLT's tests can't capture keystrokes inputed into the windows of virtual Desktop B.

But real malware may first switch to Desktop B through SetThreadDesktop(), then use the similar APIs illustrated in AKLT to capture keystrokes inputed in desktop B.

If sandboxie blocks SetThreadDesktop(), sandboxed malware won't success in this case.

sbieuser

Post by sbieuser » Mon Mar 01, 2010 8:45 pm

AKLT's tests capture keystrokes by invoking GetKeyState()/GetAsyncKeyState()/GetKeyboardState() every 10ms, no hooks are created, sandboxie can't block it.

running sandboxed malware in different virtual desktop and blocking SetThreadDesktop() is a simple way to resolve this problem. Of course, sandboxie may find a better way to defend evil behaviors similar with AKLT directly.

KIM

Post by KIM » Tue Mar 02, 2010 8:31 am

What exactly is the problem? SBIE is to run an application securely (sandboxed).
If you need specific 'anti-malware' protection then consider adding specific anti-malware software.
When a software run as Admin then it can do whatever it wants - mind it.

Just check matousec or other review sites for more specific info.

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Tue Mar 02, 2010 3:44 pm

It would be inappropriate, I think, for Sandboxie to prevent snooping on another desktop, as you suggest, while doing nothing to prevent snooping on the same desktop, which would be the much more common case.

And on the other hand, monitoring keystrokes is not always snooping. A game that uses GetKeyState() to know which keys you're holding down is not a keylogger.

My point is that anti-keylogging is a complex subject in its own right, best left to programs dedicated to combat that particular problem.

The bottom line is that I'm sorry but at this time I am not looking into adding anti-keylogger features to Sandboxie.
tzuk

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest