如何检测是否安装了病毒扫描程序和/或防火墙?(以及其他一些与安全相关的问题.) [英] How to detect if a virusscanner and/or firewall is installed? (And a few other security-related Q's.)

查看:40
本文介绍了如何检测是否安装了病毒扫描程序和/或防火墙?(以及其他一些与安全相关的问题.)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我正在努力确保它在安全的环境中运行.首先,我检查 Windows 是否正版,这使得用户更有可能保持最新状态.如果没有,我只是弹出一条消息警告用户可能存在风险,因为他仍然需要验证 Windows.

I have an application and I'm trying to make sure it's running in a secure environment. First of all, I check if Windows is genuine, which makes it more likely that the user keeps it up-to-date. If not, I just pop up a message warning the user there's a possible risk because he still needs to validate Windows.

现在,我想做更多.我还想检查用户是否安装了病毒扫描程序.我不在乎哪一个,只要他安装了一个.然后同样用于检查是否安装了防火墙.如果可能的话,我想检查用户上次更新他的 Windows/扫描仪/防火墙的时间,以确保它不是太旧.所以:

Now, I want to do a bit more. I also want to check if the user has installed a virusscanner. I don't care which one, as long as he has installed one. Then the same for checking if a firewall is installed. And if possible, I want to check when the user updated his Windows/Scanner/Firewall the last time just to make sure it's not too old. So:

1) 如何检查是否安装了病毒扫描程序?
2) 如何确定virusscanner 何时更新?
3) 如何检测virusscanner 何时进行了最后一次全系统检查?
4) 如何检测防火墙是否已安装并处于活动状态?
5) 如何查看 Windows 何时收到最新更新?

1) How do I check if a virusscanner is installed?
2) How do I determine when the virusscanner was updated?
3) How to detect when the virusscanner did it's last full-system check?
4) How do I detect if a firewall is installed and active?
5) How do I check when Windows received it's most recent update?

基本上,当我的应用程序启动时,我想显示一个带有警告的屏幕(每天一次),以防万一这些事情出现问题.这是因为我的应用程序处理用户从其客户收集的各种敏感信息.(其中包括银行账号、护照身份证号码、NAW+DOB、收入等等.)基本上,如果系统有问题,用户必须确认他知道这些问题.如果他在知道他的系统可能不安全的情况下继续操作,我的应用程序可能会承担责任......


还有语言?基本上 C++ 或 Delphi 用于 WIN32 示例和 C# 用于 .NET 示例..NET/Windows API/.NET 而不是语言.

Basically, when my application starts I want to display a screen with warnings (just once per day) just in case any of these things have a problem. This because my application works with all kinds of sensitive information that the user collects from his clients. (Which includes bank account numbers, ID numbers of passports, NAW+DOB, income and a lot more.) Basically, if the system has a problem, the user must confirm that he's aware of these problems. It takes the possible liability away from my application if he continues while knowing his system is possibly insecure...


And language? Basically C++ or Delphi for WIN32 examples and C# for .NET examples. It's more about .NET/Windows API/.NET than language.

推荐答案

我认为您可以通过 WMI

像这样:

ManagementObjectSearcher wmiData = new ManagementObjectSearcher(@"root\SecurityCenter", "SELECT * FROM AntiVirusProduct");
ManagementObjectCollection data = wmiData.Get();

foreach (ManagementObject virusChecker in data)
{
    // This is the virus checkers name.
    String virusCheckerName = virusChecker["displayName"];
}

[你没有提到什么语言,所以上面的例子是用C#写的,但WMI几乎可以用任何东西来做]

WMI 参考 应该对您有所帮助找到其他人.(1、2、3 和 4 我很确定可以通过 WMI 获得.5 我不太确定,但我认为应该是)

The WMI reference should help you find the others. (1, 2, 3, and 4 I'm pretty certain are available through WMI. 5 I'm not so certain about, but I think it probably should be)

您可能会发现 WMI Code Creator 有助于测试和确定您需要使用的查询/对象.还有 ScriptomaticWMI 管理工具可能有用.

You'll probably find WMI Code Creator helpful for testing and figuring out what queries/objects you need to use. Also Scriptomatic and WMI Admin tools might be useful.

这篇关于如何检测是否安装了病毒扫描程序和/或防火墙?(以及其他一些与安全相关的问题.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆