Windows防火墙编程

标签 windows winapi networking driver firewall

<分区>

我在谷歌上搜索了很多次,直到我创建了这个问题,所以如果那里有一些教程,请原谅。我没有找到他们。 如何在 Windows 中编写防火墙应用程序代码?我考虑过在每个进程中使用内联 Hook 的用户模式防火墙,但问题是我无法在 Windows 7 中 Hook csrss.exe(它创建新进程)。第二件事是它不是很干净并且会肯定被检测为恶意软件。 所以我认为我应该在内核模式下将 API 作为驱动程序挂接。但是有3个问题。

  • 首先我不知道内核 API 对于 Windows socket 。
  • 其次,我在内核方面没有任何经验 模式 Hook 。
  • 第三个我不知道 这是正确的方法。

别担心,我知道这并不容易,而且我不是一个只有想法的初学者 ;)。如果有人有好的信息,请分享。 哦,我想为 x86 系统编写 ;)。

最佳答案

你需要Windows Filtering Platform (世界粮食计划署)。

With the WFP API, developers can implement firewalls, intrusion detection systems, antivirus programs, network monitoring tools, and parental controls. WFP integrates with and provides support for firewall features such as authenticated communication and dynamic firewall configuration based on applications' use of sockets API (application-based policy). WFP also provides infrastructure for IPsec policy management, change notifications, network diagnostics, and stateful filtering.

关于Windows防火墙编程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6112835/

相关文章:

c++ - WinAPI:如何确定网络何时正在识别?

windows - 如何摆脱 Windows 更新重启提示?

user-interface - Win32 图形用户界面 : resize a dialog

java - 用Java发送数据报包

java - 代理背后的 UnknownHostException

Tiny C编译器可以用于OpenCV代码编译吗?

.net - vb 2008 WriteProcessMemory() 返回 0

c++ - 如何将 Win32 合并到 SDL 项目中?

.net - 如何永久删除文件,使其无法恢复?

javascript - MYSQL查询传递变量结果0