Ahh, AV sandbox/monitoring drivers (a.k.a. marketing "proactive defense") always were big joke. If you remember few years ago matousec published report about common plague in HIPS drivers (see
http://www.matousec.com/info/articles/p ... rivers.php) - drivers that implement SSDT hooking do not properly validate the parameters of the hooking functions - multiple BSoD's and even privilege escalation exploits. If you have source code of KAV you can check how this monitoring features were implemented in that time. Klif was full of silly bugs. Six years after we have more secured code (BSoD's mostly fixed) and such results
http://www.matousec.com/projects/proact ... esults.php with Comodo at top of "Pro security". The Comodo firewall, it is really strong as in this table? Nope, the cmdguard.sys is still vulnerable for attacks from user mode, so this result is 100% joke.
I did little demonstration which exploits vulnerability in cmdguard.sys driver (v5.12.55693.2551 - up-to-date version from their site). The core of this exploit is again incorrect processing of parameters sent from user mode. This time it happens inside NtOpenProcess handler, but I'm sure the same type of vulnerability exists with other comodo hooks (basically all that are operating with user mode pointers). It isn't race condition however. It does not use any kernel memory modification, does not unhook anything, it is doing just a few system calls from user mode. Probably it is possible to do invisible for comodo memory ring3 inject based on this method, didn't tried honestly :)
As payload it terminates Comodo application from user mode (even without assigning debug privilege) bypassing all Self-Defense. The size of exploit code is ridiculously small. This is amusing bug inside comodo driver. Without comodo driver Windows won't allow such system call.
For security and from ethic reasons because I believe this kind of exploit can also work with wide range of different AV/FW products (it can be fundamental flaw in security drivers just like before bad SSDT hooking) I will refrain from placing ready-to-use code or compiled modules. Excuse me for sort of off-topic.
Link to swf demo
http://www.sendspace.com/file/lifudv
password is "test" without quotes.
Best Regards,
-rin