The windows filtering platform

About Windows Filtering Platform

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.

The WFP components

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.

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.

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.

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.

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.

Windows Filtering Platform

Purpose

Windows Filtering Platform (WFP) is a set of API and system services that provide a platform for creating network filtering applications. The WFP API allows developers to write code that interacts with the packet processing that takes place at several layers in the networking stack of the operating system. Network data can be filtered and also modified before it reaches its destination.

By providing a simpler development platform, WFP is designed to replace previous packet filtering technologies such as Transport Driver Interface (TDI) filters, Network Driver Interface Specification (NDIS) filters, and Winsock Layered Service Providers (LSP). Starting in Windows Server 2008 and Windows Vista, the firewall hook and the filter hook drivers are not available; applications that were using these drivers should use WFP instead.

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 plasma 5 mageia

Windows Filtering Platform is a development platform and not a firewall itself. The firewall application that is built into Windows Vista, Windows Server 2008, and later operating systems Windows Firewall with Advanced Security (WFAS) is implemented using WFP. Therefore, applications developed with the WFP API or the WFAS API use the common filtering arbitration logic that is built into WFP.

The WFP API consists of a user-mode API and a kernel-mode API. This section provides an overview of the entire WFP and describes in detail only the user-mode portion of the WFP API. For a detailed description of the kernel-mode WFP API, see the Windows Driver Kit online help.

Developer audience

The Windows Filtering Platform API is designed for use by programmers using C/C++ development software. Programmers should be familiar with networking concepts and design of systems using user-mode and kernel-mode components.

Run-time requirements

The Windows Filtering Platform is supported on clients running Windows Vista and later, and on servers running Windows Server 2008 and later. For information about the run-time requirements for a specific programming element, see the Requirements section of the reference page for that element.

In this section

Topic Description
What’s New in Windows Filtering Platform Information on new features and APIs in Windows Filtering Platform.
About Windows Filtering Platform An overview of Windows Filtering Platform.
Using Windows Filtering Platform Example code using the Windows Filtering Platform API.
Windows Filtering Platform API Reference Documentation for the Windows Filtering Platform functions, structures, and constants.

Additional resources

To ask questions and have discussions about using the WFP API, visit the Windows Filtering Platform Forum.

5157(F): Платформа фильтрации Windows заблокировала подключение. 5157(F): The Windows Filtering Platform has blocked a connection.

Относится к: Applies to

  • Windows 10 Windows 10
  • Windows Server 2016 Windows Server 2016

Описание события: Event Description:

Это событие создается, когда платформа фильтрации Windows блокирует подключение. This event generates when Windows Filtering Platform has blocked a connection.

Примечание. Рекомендации приведены в разделе Рекомендации по мониторингу безопасности для этого события. Note For recommendations, see Security Monitoring Recommendations for this event.

XML события: Event XML:

Необходимые роли сервера: нет. Required Server Roles: None.

Минимальная версия ОС: Windows Server 2008, Windows Vista. Minimum OS Version: Windows Server 2008, Windows Vista.

Версии события: 0. Event Versions: 0.

Описания полей: Field Descriptions:

Сведения о приложениях: Application Information:

Process ID [Type = Pointer]: hexadecimal Process ID процесса, который пытался создать подключение. Process ID [Type = Pointer]: hexadecimal Process ID of the process that attempted to create the connection. ИД процесса (PID)— это число, которое операционная система использует для идентификации активного процесса уникальным образом. Process ID (PID) is a number used by the operating system to uniquely identify an active process. Узнать значение PID для определенного процесса можно, например, в диспетчере задач (вкладка «Подробности», столбец «ИД процесса»): To see the PID for a specific process you can, for example, use Task Manager (Details tab, PID column):

Если преобразовать шестнадцатеричное значение в десятичное, можно сравнить его со значениями в диспетчере задач. If you convert the hexadecimal value to decimal, you can compare it to the values in Task Manager.

Кроме того, можно сопоставить этот ИД процесса с ИД процесса в других событиях, например в событии «4688: создан процесс» Информация о процессе\ ИД нового процесса. You can also correlate this process ID with a process ID in other events, for example, “4688: A new process has been created” Process Information\New Process ID.

Имя приложения [Type = UnicodeString]: полный путь и имя исполняемого для процесса. Application Name [Type = UnicodeString]: full path and the name of the executable for the process.

Логический диск отображается в формате \device\harddiskvolume#. Logical disk is displayed in format \device\harddiskvolume#. Вы можете получить все локальные номера тома с помощью утилиты diskpart. You can get all local volume numbers by using diskpart utility. Командой для получения номеров тома с помощью diskpart является «том списка»: The command to get volume numbers using diskpart is “list volume”:

Сведения о сети: Network Information:

Направление [Type = UnicodeString]: направление заблокированного подключения. Direction [Type = UnicodeString]: direction of blocked connection.

Входящий — для входящие подключения. Inbound – for inbound connections.

Исходящие — для неограниченых подключений. Outbound – for unbound connections.

Исходный адрес [Type = UnicodeString]: локальный IP-адрес, на котором приложение получило подключение. Source Address [Type = UnicodeString]: local IP address on which application received the connection.

Адрес IPv4 IPv4 Address

Адрес IPv6 IPv6 Address

:: — все IP-адреса в формате IPv6 :: — all IP addresses in IPv6 format

0.0.0.0 — все IP-адреса в формате IPv4 0.0.0.0 — all IP addresses in IPv4 format

127.0.0.1 , ::1 — localhost 127.0.0.1 , ::1 — localhost

Исходный порт [Type = UnicodeString]: номер порта, на котором приложение получило подключение. Source Port [Type = UnicodeString]: port number on which application received the connection.

Адрес назначения [Type = UnicodeString]: IP-адрес, с которого было получено или инициировано подключение. Destination Address [Type = UnicodeString]: IP address from which connection was received or initiated.

Адрес IPv4 IPv4 Address

Адрес IPv6 IPv6 Address

:: — все IP-адреса в формате IPv6 :: — all IP addresses in IPv6 format

0.0.0.0 — все IP-адреса в формате IPv4 0.0.0.0 — all IP addresses in IPv4 format

127.0.0.1 , ::1 — localhost 127.0.0.1 , ::1 — localhost

Destination Port [Type = UnicodeString]: номер порта, который использовался с удаленной машины для инициирования подключения. Destination Port [Type = UnicodeString]: port number that was used from remote machine to initiate connection.

Протокол [Type = UInt32]: номер используемого протокола. Protocol [Type = UInt32]: number of the protocol that was used.

Обслуживание Service Номер протокола Protocol Number
Протокол сообщений управления Интернетом (ICMP) Internet Control Message Protocol (ICMP) 1 1
Протокол управления передачей (TCP) Transmission Control Protocol (TCP) 6 6
Протокол пользовательской datagram (UDP) User Datagram Protocol (UDP) 17 17
Общая инкапсуляция маршрутизации (данные PPTP по GRE) General Routing Encapsulation (PPTP data over GRE) 47 47
Загонщик проверки подлинности (AH) IPSec Authentication Header (AH) IPSec 51 51
IpSec безопасности инкапсуляции (ESP) Encapsulation Security Payload (ESP) IPSec 50 50
Протокол внешних шлюзов (EGP) Exterior Gateway Protocol (EGP) 8 8
Gateway-Gateway (GGP) Gateway-Gateway Protocol (GGP) 3 3
Протокол мониторинга хостов (HMP) Host Monitoring Protocol (HMP) 20 20
Протокол управления интернет-группой (IGMP) Internet Group Management Protocol (IGMP) 88 88
Удаленный виртуальный диск MIT (RVD) MIT Remote Virtual Disk (RVD) 66 66
OSPF Откройте кратчайший путь сначала OSPF Open Shortest Path First 89 89
Универсальный пакетный протокол PARC (PUP) PARC Universal Packet Protocol (PUP) 12 12
Надежный протокол datagram (RDP) Reliable Datagram Protocol (RDP) 27 27
Протокол бронирования (RSVP) QoS Reservation Protocol (RSVP) QoS 46 46

Сведения о фильтре: Filter Information:

Фильтр Run-Time [Type = UInt64]: уникальный фильтр, который заблокировал подключение. Filter Run-Time ID [Type = UInt64]: unique filter ID that blocked the connection.

Чтобы найти определенный фильтр платформы фильтрации Windows по ID, запустите следующую команду: netsh wfp show filters. To find a specific Windows Filtering Platform filter by ID, run the following command: netsh wfp show filters. В результате этой команды будет filters.xml файл. As a result of this command, the filters.xml file will be generated. Откройте этот файл и найдите определенное подстройку с требуемой фильтрацией** ****например:** Open this file and find specific substring with required filter ID ( ), for example:

Имя слоя [Тип = UnicodeString]: имя слоя принудения уровня приложений. Layer Name [Type = UnicodeString]: Application Layer Enforcement layer name.

Идентификатор Run-Time [Type = UInt64]: идентификатор уровня платформы фильтрации Windows. Layer Run-Time ID [Type = UInt64]: Windows Filtering Platform layer identifier. Чтобы найти определенный ID уровня платформы фильтрации Windows, запустите следующую команду: состояние шоу wfp netsh. To find a specific Windows Filtering Platform layer ID, run the following command: netsh wfp show state. В результате этой команды будет wfpstate.xml файл. As a result of this command, the wfpstate.xml file will be generated. Откройте этот файл и найдите определенное подстройка с требуемой iD слоя** ****например:** Open this file and find specific substring with required layer ID ( ), for example:

Рекомендации по контролю безопасности Security Monitoring Recommendations

Для 5157 (F): Платформа фильтрации Windows заблокировала подключение. For 5157(F): The Windows Filtering Platform has blocked a connection.

Если у вас есть заранее определенное приложение, которое должно использоваться для выполнения операции, о чем было овеяно этим событием, отслеживайте события с помощью приложения «Application», не равного вашему определенному приложению. If you have a predefined application that should be used to perform the operation that was reported by this event, monitor events with “Application” not equal to your defined application.

Вы можете отслеживать,**** нет ли «Приложение» в стандартной папке (например, не в System32 или Program Files) или в ограниченной папке (например, **** Временные файлы Интернета). You can monitor to see if “Application” is not in a standard folder (for example, not in System32 or Program Files) or is in a restricted folder (for example, Temporary Internet Files).

Если у вас есть заранее определенный список ограниченных подстройок или слов в именах приложений (например,«mimikatz» или** «cain.exe»), **проверьте эти подстройки в «Application». If you have a pre-defined list of restricted substrings or words in application names (for example, “mimikatz” or “cain.exe”), check for these substrings in “Application.”

Убедитесь,что «Исходный адрес» является одним из адресов, присвоенных компьютеру. Check that “Source Address” is one of the addresses assigned to the computer.

Если компьютер или устройство не должны иметь доступ к Интернету или содержат только приложения, не подключенные к Интернету, отслеживайте события 5157, в которых «Адрес назначения» является IP-адресом из Интернета (не из частных диапазонов IP). If the` computer or device should not have access to the Internet, or contains only applications that don’t connect to the Internet, monitor for 5157 events where “Destination Address” is an IP address from the Internet (not from private IP ranges).

Если вы знаете, что компьютер никогда не должен связываться или никогда не должен связываться с определенными сетевыми IP-адресами, отслеживайте эти адреса в «Адрес назначения. « If you know that the computer should never contact or should never be contacted by certain network IP addresses, monitor for these addresses in “Destination Address.

Если у вас есть допустимый список IP-адресов, с которые компьютер или устройство должны связаться или с ними связаться, отслеживайте IP-адреса в «Адрес назначения», которые не находятся в списке допустимого. If you have an allow list of IP addresses that the computer or device is expected to contact or to be contacted by, monitor for IP addresses in “Destination Address” that are not in the allow list.

Если необходимо отслеживать все входящие подключения к определенному локальному порту, отслеживайте события 5157 с помощью этого «Source Port. « If you need to monitor all inbound connections to a specific local port, monitor for 5157 events with that “Source Port.

Монитор для всех подключений с «номеромпротокола», который не является типичным для этого устройства или компьютера, например, ничего, кроме 1, 6 или 17. Monitor for all connections with a “Protocol Number” that is not typical for this device or computer, for example, anything other than 1, 6, or 17.

Если связь компьютера с «адресомназначения» всегда должна использовать определенный «Портназначения»,«монитор для любого другого «Порта назначения». If the computer’s communication with “Destination Address” should always use a specific “Destination Port, monitor for any other “Destination Port.”

Читайте также:  Как mac os lion загрузить
Оцените статью