Microsoft windows filtering platform

Аудит подключения платформы фильтрации Audit Filtering Platform Connection

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

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

Подключение платформы фильтрации аудита определяет, генерирует ли операционная система события аудита, если подключение разрешено или заблокировано платформой фильтрации Windows. Audit Filtering Platform Connection determines whether the operating system generates audit events when connections are allowed or blocked by the Windows Filtering Platform.

Платформа фильтрации Windows (WFP) позволяет независимым поставщикам программного обеспечения (ISVs) фильтровать и изменять пакеты TCP/IP, отслеживать или авторизовать подключения, фильтровать трафик, защищенный протоколом Интернета (IPsec) и фильтровать удаленные вызовы процедур (RPCs). Windows Filtering Platform (WFP) enables independent software vendors (ISVs) to filter and modify TCP/IP packets, monitor or authorize connections, filter Internet Protocol security (IPsec)-protected traffic, and filter remote procedure calls (RPCs).

В этом подкатегории содержатся события платформы фильтрации Windows о заблокированных и разрешенных подключениях, заблокированных и разрешенных привязках портов, заблокированных и разрешенных действиях прослушивания порта и заблокированных для приемов входящих подключений. This subcategory contains Windows Filtering Platform events about blocked and allowed connections, blocked and allowed port bindings, blocked and allowed port listening actions, and blocked to accept incoming connections applications.

Объем событий: High. Event volume: High.

Тип компьютера Computer Type Общий успех General Success Общий сбой General Failure Более сильный успех Stronger Success Более сильный сбой Stronger Failure Комментарии Comments
Контроллер домена Domain Controller Нет No Да Yes IF IF Да Yes Аудит успешности для этой подкатегории обычно создает очень большой объем событий, например одно событие для каждого подключения к системе. Success auditing for this subcategory typically generates a very high volume of events, for example, one event for every connection that was made to the system. Гораздо важнее аудит событий сбоя (например, заблокированных подключений). It is much more important to audit Failure events (blocked connections, for example). Рекомендации по использованию и анализу собранной информации см. в разделах Рекомендации по мониторингу безопасности. For recommendations for using and analyzing the collected information, see the Security Monitoring Recommendations sections.
IF . Включить аудит успешности в случае необходимости отслеживать успешные исходящие или входящие подключения к неоправданым IP-адресам на компьютерах или устройствах с высоким значением. IF — Enable Success audit in case you need to monitor successful outbound or inbound connections to and from untrusted IP addresses on high value computers or devices.
Сервер участника Member Server Нет No Да Yes IF IF Да Yes Аудит успешности для этой подкатегории обычно создает очень большой объем событий, например одно событие для каждого подключения к системе. Success auditing for this subcategory typically generates a very high volume of events, for example, one event for every connection that was made to the system. Гораздо важнее аудит событий сбоя (например, заблокированных подключений). It is much more important to audit Failure events (blocked connections, for example). Рекомендации по использованию и анализу собранной информации см. в разделах Рекомендации по мониторингу безопасности. For recommendations for using and analyzing the collected information, see the Security Monitoring Recommendations sections.
IF . Включить аудит успешности в случае необходимости отслеживать успешные исходящие или входящие подключения к неоправданым IP-адресам на компьютерах или устройствах с высоким значением. IF — Enable Success audit in case you need to monitor successful outbound or inbound connections to and from untrusted IP addresses on high value computers or devices.
Workstation Workstation Нет No Да Yes IF IF Да Yes Аудит успешности для этой подкатегории обычно создает очень большой объем событий, например одно событие для каждого подключения к системе. Success auditing for this subcategory typically generates a very high volume of events, for example, one event for every connection that was made to the system. Гораздо важнее аудит событий сбоя (например, заблокированных подключений). It is much more important to audit Failure events (blocked connections, for example). Рекомендации по использованию и анализу собранной информации см. в разделах Рекомендации по мониторингу безопасности. For recommendations for using and analyzing the collected information, see the Security Monitoring Recommendations sections.
IF . Включить аудит успешности в случае необходимости отслеживать успешные исходящие или входящие подключения к неоправданым IP-адресам на компьютерах или устройствах с высоким значением. IF — Enable Success audit in case you need to monitor successful outbound or inbound connections to and from untrusted IP addresses on high value computers or devices.

Список событий: Events List:

5031(F). Служба брандмауэра Windows заблокировала прием входящих подключений в сети. 5031(F): The Windows Firewall Service blocked an application from accepting incoming connections on the network.

5150(-): Платформа фильтрации Windows заблокировала пакет. 5150(-): The Windows Filtering Platform blocked a packet.

5151(-): Более строгий фильтр платформы фильтрации Windows заблокировал пакет. 5151(-): A more restrictive Windows Filtering Platform filter has blocked a packet.

5154(S). Платформа фильтрации Windows разрешила приложению или службе прослушивать в порту для входящих подключений. 5154(S): The Windows Filtering Platform has permitted an application or service to listen on a port for incoming connections.

5155(F): Платформа фильтрации Windows заблокировала прослушивание приложения или службы в порту для входящих подключений. 5155(F): The Windows Filtering Platform has blocked an application or service from listening on a port for incoming connections.

5156(S): Платформа фильтрации Windows разрешила подключение. 5156(S): The Windows Filtering Platform has permitted a connection.

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

5158(S). Платформа фильтрации Windows разрешила привязку к локальному порту. 5158(S): The Windows Filtering Platform has permitted a bind to a local port.

5159(F): Платформа фильтрации Windows заблокировала привязку к локальному порту. 5159(F): The Windows Filtering Platform has blocked a bind to a local port.

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 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.

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.

Избавляемся от DNS Leak в Windows 10 — свой userspace WFP-фильтр в виде OpenVPN-плагина

Как вы уже можете знать, резолвер DNS в Windows 10 отправляет DNS-запросы на все интерфейсы параллельно, что часто бывает либо просто неудобно, когда используется так называемый Split Tunneling и DNS внутри VPN-туннеля отдает внутренние адреса для внутренних ресурсов, а Windows не может понять, что к чему, либо и вовсе создает угрозу безопасности, как в случае утечки DNS через публичный Wi-Fi.

Решить проблему можно разными способами, например, временно добавив правила firewall для блокировки 53 порта на всех интерфейсах, кроме интерфейса VPN, либо установить на всех интерфейсах, кроме VPN, DNS в 127.0.0.1.

Однако, эти способы вносят изменения, выдерживающие перезагрузку, поэтому, если во время работы VPN у вас случайно отключили электричество или VPN-демон просто упал, вы останетесь с неработающим интернетом. Ничего хорошего в этом нет.

Однако есть способ лучше, который вносит только временные изменения и не оставит пользователя без интернета.

Windows Filtering Platform

Начиная с Windows Vista, на замену устаревшим технологиям обработки трафика вроде NDIS, TDI и LSP приходит WFP — современная, легкая и удобная технология, которая работает как в режиме ядра, так и в пользовательском режиме. Современные версии Брандмауэра Windows как раз используют WFP, как и все сторонние файрволлы и антивирусы с возможностью проверки трафика.

Драйвер режима ядра может просматривать, модифицировать и логировать пакеты и просто поток данных, а userspace-фильтры могут пропускать, отбрасывать, задерживать или направлять трафик в ядерный драйвер, основываясь на информации из Ethernet-фрейма или IP-пакета и их заголовков, а также (на уровне ALE) интерфейса источника и назначения, ID процесса, полный путь к exe, и некоторой другой.

WFP-фильтр может добавлять постоянные фильтры, которые выживают после перезагрузки, даже если ПО, установившее их, не было больше запущено, временные фильтры, которые сохраняются после завершения программы, но не после перезагрузки, и сессионные, которые действуют только тогда, когда программа, создавшая их, все еще исполняется.

Фильтра пользовательского режима с сессионными фильтрами вполне достаточно для наших задач, а нам нужно:

  • Запретить все исходящие пакеты от всех интерфейсов на порт 53 по UDP/TCP и IPv4/IPv6
  • Разрешить любой трафик с TAP-интерфейса (-ов) OpenVPN

Все это вылилось в плагин для OpenVPN, однако исходный код может быть собран и как обычный исполняемый файл:
github.com/ValdikSS/openvpn-fix-dns-leak-plugin

Чтобы использовать данный плагин, скачайте .dll-файлы из репозитория, положите их в папку config рядом с конфигурационным файлом, и добавьте в него строку:
для 32-битной системы и 32-битной версии OpenVPN, или
соответственно для 64-битной системы с 64-битным OpenVPN.

Теперь можно не бояться использовать VPN на Windows 10 через публичный Wi-Fi.

UPD: В OpenVPN 2.3.9 появилась опция для блокирования сторонних DNS: block-outside-dns . Используйте ее, а не плагин.

Читайте также:  Иконки для windows ipack пакеты
Оцените статью