WFP 驱动翻译第一章-关于Windows网络流量处理平台

About Windows Filtering Platform
Article • 08/19/2020
Windows Filtering Platform (WFP) is a network traffic processing platform designed to
replace the Windows XP and Windows Server 2003 network traffic filtering interfaces.
WFP consists of a set of hooks into the network stack and a filtering engine that
coordinates network stack interactions.
Windows Filtering Platform(WFP)是一个网络流量处理平台,旨在取代Windows XP和Windows Server 2003的网络流量过滤接口。WFP由一组嵌入到网络堆栈中的钩子(hooks)和一个协调网络堆栈的交互过滤引擎组成。
The WFP components
WFP组件
Filter Engine
The core multi-layer filtering infrastructure, hosted in both kernel-mode and user-mode,
that replaces the multiple filtering modules in the Windows XP and Windows Server
2003 networking subsystem.
  • Filters network traffic at any layer in the system over any data fields that a shim can provide.
  • Implements the "Callout" filters by invoking callouts during classification.
  • Returns "Permit" or "Block" actions to the shim that invoked it for enforcement.
  • Provides arbitration between different policy sources. For example, determines
  • priority when an application is configured to secure any network traffic related to it, but the local firewall is configured to prevent application secured traffic.
过滤引擎
核心多层过滤基础设施同时托管在内核模式和用户模式中,取代了Windows XP和Windows Server 2003网络子系统中的多个过滤模块。
  • 可以在系统中的任何层上,通过由Shim提供的任何数据字段来过滤网络流量。
  • 通过在分类过程中调用Callout来实现"Callout"过滤器。
  • 向调用它("it" 指的是过滤引擎。当过滤引擎完成对网络流量的分类和处理后,它将返回"Permit"或"Block"操作给调用它的Shim)进行执行的Shim返回"Permit"或"Block"操作。
  • 在不同的策略源之间提供仲裁。例如,确定当应用程序配置为保护与其相关的任何网络流量时,但本地防火墙配置为阻止给应用程序提供了保护的流量时的优先级。
Base Filtering Engine (BFE)
A service that controls the operation of the Windows Filtering Platform. It performs the
following tasks.
  • Accepts filters and other configuration settings for the platform.
  • Reports the current state of the system, including statistics.
  • Enforces the security model for accepting configuration in the platform. For example, a local administrator can add filters but other users can only view them.
  • Plumbs configuration settings to other modules in the system. For example, IPsec negotiation polices go to IKE/AuthIP keying modules, filters go to the filter engine.

Base Filtering Engine (BFE)
一项控制Windows Filtering Platform运行的服务。它执行以下任务:

  • 接受Filters和其它为平台设置的配置。
  • 报告系统的当前状态,包括统计信息。
  • 强制执行接受平台配置的安全模型。例如,本地管理员可以添加Filters,但其他用户只能查看它们。
  • 将配置设置传递给系统中的其它模块。例如,IPsec协商策略传递给IKE/AuthIP密钥模块,filters传递给过滤引擎(以便进行网络流量的过滤和处理)。

Shims
Kernel-mode components that reside between the Network Stack and the filter engine.
Shims make the filtering decision by classifying against the filter engine. Following is a
list of available shims.
  • Application Layer Enforcement (ALE) shim.
  • Transport Layer Module shim.
  • Network Layer Module shim.
  • Internet Control Message Protocol (ICMP) Error shim.
  • Discard shim.
  • Stream shim.

Shims(大多翻译为"垫片")是位于网络堆栈和过滤引擎之间的内核模式组件。

Shims通过与过滤引擎进行分类来进行过滤决策。以下是可用的shim列表:

  • 应用层执行(Application Layer Enforcement,ALE)shim。
  • 传输层模块shim。
  • 网络层模块shim。
  • Internet控制消息协议(Internet Control Message Protocol,ICMP)错误shim。
  • 丢弃(Discard)shim。
  • 流(Stream)shim。
下面是垫片,自己画的图
Callouts
Set of functions exposed by a driver and used for specialized filtering. Besides the basic
actions of "Permit" and "Block", callouts can modify and secure inbound and outbound
network traffic. See the Windows Filtering Platform Callout Drivers topic in the Windows
Driver Kit (WDK) documentation for more information on callouts. WFP provides built-in
callouts that accomplish the following tasks.
  • Perform IPsec processing.
  • Adjust stateful filtering behavior.
  • Perform stealth mode filtering (silent drop of packets that were not requested).
  • Control TCP chimney offload.
  • Interact with the Teredo service.
The filter engine allows third-party callouts to register at each of its kernel-mode layers.

Callouts(这里不翻译是最好的,很多人都翻译为呼出,挺别扭的)是由驱动程序(你自己造轮子的或者官方的驱动)公开的一组函数,用于进行专门的过滤操作。除了基本的"允许"和"阻止"操作外,调用函数还可以修改和保护入站和出站的网络流量。你可以参考Windows Driver Kit (WDK)文档中的"Windows Filtering Platform Callout Drivers"主题,了解有关调用函数的更多信息。Windows Filtering Platform (WFP)提供了内置的调用函数,可以完成以下任务:

- 执行IPsec处理。
- 调整有状态过滤行为。(这里应该是指网络连接的状态,基于网络连接的状态进行过滤决策)
- 执行隐形模式过滤(对未经请求的数据包进行静默丢弃)。
- 控制TCP chimney offload.。
Overview of TCP Chimney Offload | Microsoft Learn
- 与Teredo服务进行交互。

过滤引擎允许第三方callout函数在其每个内核模式下的层注册。这样,第三方驱动程序可以插入自定义的过滤逻辑来处理网络流量。

Teredo是一种IPv6过渡技术,旨在帮助IPv4网络上的主机与IPv6网络进行通信。由于IPv4地址空间有限,随着IPv4地址耗尽的增加,推广IPv6成为一项重要任务。然而,在过渡期间,许多网络仍然是基于IPv4的,这就需要一种机制来实现IPv4和IPv6之间的互通。

Teredo服务提供了一种在IPv4网络上运行IPv6的方法。它允许IPv6主机通过IPv4网络访问IPv6资源,并提供了IPv6地址的分配和转换功能。Teredo通过在IPv4数据包中封装IPv6数据包来实现这一点,并使用UDP协议在IPv4和IPv6之间进行通信。

Teredo服务使用了一个Teredo服务器和一个Teredo客户端。Teredo客户端是运行在支持Teredo的主机上的软件,它将IPv6数据包封装为IPv4数据包,并将其发送到Teredo服务器,然后通过IPv4网络发送到目标IPv6主机。Teredo服务器是位于IPv4和IPv6网络之间的服务器,它负责转换和路由Teredo数据包。

需要注意的是,Teredo服务可能会引入一些网络延迟和性能损失,并且在某些网络环境下可能会受到阻碍。因此,当IPv6直接可用时,最好使用原生的IPv6连接,而不是依赖于Teredo服务。

Application Programming Interface
A set of data types and functions available to the developers to build and manage
network filtering applications. These data types and functions are grouped into multiple
API sets .

Application Programming Interface(API)是一组可供开发人员使用的数据类型和函数,用于构建和管理网络过滤应用程序。这些数据类型和函数被分组为多个API集。

WFP Features
  • Provides a packet filtering infrastructure where independent software vendors (ISVs) can plug-in specialized filtering modules.
  • Works with both IPv4 and IPv6.
  • Allows for data filtering, modification, and re-injection.
  • Performs both packet and stream processing.
  • Allows packet filtering to be enabled per application, per user, and per connection in addition to per network interface or per port.
  • Provides boot-time security until Base Filtering Engine (BFE) can start.
  • Enables stateful connection filtering.
  • Handles both pre and post IPsec-encrypted data.
  • Allows integration of IPsec and firewall filtering policies.
  • Provides a policy management infrastructure to determine when specific filters should be activated. This includes mediating conflicting requirements from multiple filters provided by different vendors.
  • Handles most packet reassembly and state tracking.
  • Includes a generic user notification system that informs subscribers of changes to the filtering system.
  • Implements enumeration functions that report on the state of the system.
  • Uses net events to record IPsec errors and packet drops.
  • Supports a Network Diagnostics Framework (NDF) helper class.
  • Supports the Secure Socket extensions to the Winsock API, which allow network applications to secure their traffic by configuring WFP.
  • At Application Layer Enforcement (ALE) layers, minimally impacts network performance by processing only the first packet in a connection.
  • Integrates hardware offload where kernel-mode callout modules can use hardware to perform specific packet inspection.

WFP特性:

- 提供包过滤基础设施,独立软件供应商(isv)可以在其中插入专门的过滤模块。
- 支持IPv4和IPv6。
- 允许对数据进行过滤、修改和重新注入。
- 执行数据包和流处理。
- 除了每个网络接口或端口之外,还允许每个应用程序、每个用户和每个连接启用包过滤。
- 提供引导时安全性,直到BFE可以启动。AI翻译的是:在BFE启动之前,提供启动时安全性。
- 支持有状态连接过滤。
- 处理IPsec加密前后的数据。
- 允许集成IPsec和防火墙过滤策略。
- 提供策略管理基础设施,确定何时激活特定的过滤器。这包括调解来自不同供应商提供的多个过滤器之间的冲突要求。
- 处理大多数数据包重组和状态跟踪。
- 包括一个通用的用户通知系统,通知订阅者有关过滤系统的更改。
- 实现枚举函数,报告系统的状态。
- 使用网络事件记录IPsec错误和数据包丢弃。
- 支持网络诊断框架(Network Diagnostics Framework,NDF)的辅助类。
- 支持Winsock API的安全套接字扩展,这个扩展允许网络应用程序通过配置WFP来保护其流量。
- 在应用层执行(Application Layer Enforcement,ALE)层中,通过仅处理连接的第一个数据包,最小化对网络性能的影响。
- 集成hardware offloadhardware offload是一个 内核模式下的callout模块可以使用硬件进行特定数据包检查的地方。(这里有点生硬,感觉不翻译才是最好的)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值