views:

157

answers:

2

Possible Duplicates:
Detect Antivirus on Windows using C#
How to detect if a virusscanner and/or firewall is installed? (And a few other security-related Q's.)

is there a way to detect currently instaled av without searching for known processes?

+2  A: 

Yes there is. You can use WMI, I assume you are asking about Windows, to check installed instances of an anti-virus program. It is quite simple from C# and this link gives a good explanation of how to do it. It is also possible to access WMI from C++ and that is explained here. Also for anything WMI related I highly recommend the WMI Studio.

linuxuser27
Beat me by 5 seconds! :)
Mark Allen
There is one problem with WMI tho. Anybody can write there anything. This is often misused by viruses (fake AVs). So in the end you still need list of known "AVs".
Kra
@Kra Well sure, but at that point all bets are off. You really can't know for sure. You can't even reliably detect, necessarily, whether you are running in a VM. We might be in a VM right now... (j/k)
Mark Allen
+1  A: 

It depends on the AV software and the OS but it looks like you can use WMI. Here's an example on using WMI script - using WMI from C++ is outside of my knowledge, sorry.

http://blogs.msdn.com/b/alejacma/archive/2008/05/12/how-to-get-antivirus-information-with-wmi-vbscript.aspx

Mark Allen