The windows filtering platform has permitted a connection

I noticed event ID 5156 is filling up my event logs. It logs one or two of these events literally every 2-3 seconds. Now my security logs are useless. I run SEP 11 which takes control of the windows firewall as well uses its own fire wall. I googled and found that anti-virus software can be responsible for this behavior (like macaffee) and saw how I could disable logging of this event with auditpol.

I noticed event ID 5156 is filling up my event logs. It logs one or two of these events literally every 2-3 seconds. Now my security logs are useless. I run SEP 11 which takes control of the windows firewall as well uses its own fire wall. I googled and
found that anti-virus software can be responsible for this behavior (like macaffee) and saw how I could disable logging of this event with auditpol.

My question is how can I be sure that this is my anti-virus software doing this? I can’t see anywhere in the log itself something that would link this to my antivirus product. The source address listed is always the broadcast address of my subnet and the
destination is any computer I make ANY network connection to (file servers, DCs, etc).

Here is what I am seeing:

The Windows Filtering Platform has permitted a connection.

Application Information:
	Process ID:		4
	Application Name:	System

Network Information:
	Direction:		Inbound
	Source Address:		mybroadcast.address.for.subnet
	Source Port:		137
	Destination Address:	IP.of.destination.PC
	Destination Port:		137
	Protocol:		17

Filter Information:
	Filter Run-Time ID:	0
	Layer Name:		Receive/Accept
	Layer Run-Time ID:	44

I haven’t really found to much info on event ID 5156, or at least info I can make
that much sense of. Would I ever really need this event to be logged? And why would my anti-virus software cause so many of these events?

Если у вас в журнале безопасности регистрируется довольно много сообщений с Event ID 5156, которые сообщают что

The Windows Filtering Platform has allowed a connection

и вы хотите их отключить, сделайте следующее:

  • Запустите gpedit.msc
  • Перейдите в ветку «Computer Configuration/Windows Settings/Security Settings/Local Policies/Security Options».
  • Убедитесь что у вас, в Windows 2008, включена опция:  «Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings».

После этого нужно воспользоваться командой «auditpol». Введите команду:

auditpol /set /subcategory:"Filtering Platform Connection" /success:disable /failure:enable

Если же вам хочется еще отключить и такие сообщения:

The Windows Filtering Platform blocked a packet

То выполняем команду:

auditpol /set /subcategory:"Filtering Platform Packet Drop" /failure:disable

Хотя, если честно, после жалоб «безопасника» на сообщения не несущие полезную информацию сообщения я отключаю вот так :

auditpol /set /subcategory:"Filtering Platform Connection" /success:disable /failure:disable

auditpol /set /subcategory:"Filtering Platform Packet Drop" /success:disable /failure:disable

Чтоб посмотреть синтаксис этой команды введите в командной строке:

auditpol /?

Чтоб получить список всех категорий и под категорий введите:

auditpol /list /subcategory:*

Чтоб отобразить текущую политику аудита для всех категорий и подкатегорий введите:

auditpol /get /category:*

Начиная с Windows Server 2008 R2 (серверные ОС) и Windows 7 (не серверные ОС) в политиках по адресу  «Computer Configuration/Windows Settings/Security Settings/Advanced Audit Policy Configuration» появились более тонкие настройки аудита из более чем 50-ти различных настроек политики — Advanced Security Audit Policy Settings.

Если при использовании команды auditpol выскакивает «ошибка 0x00000057 произошла: Параметр задан неверно.», то скорее всего вы используете не тот язык в названии категорий, если ОС на русском языке, то категории аудита нужно писать на русском языке.

Понравилось? =) Поделись с друзьями:

title description ms.pagetype ms.prod ms.mktglfcycl ms.sitesec ms.localizationpriority author ms.date ms.reviewer manager ms.author ms.technology ms.topic

5156(S) The Windows Filtering Platform has permitted a connection. (Windows 10)

Describes security event 5156(S) The Windows Filtering Platform has permitted a connection.

security

windows-client

deploy

library

none

vinaypamnani-msft

09/08/2021

aaroncz

vinpa

itpro-security

reference

5156(S): The Windows Filtering Platform has permitted a connection.

Event 5156 illustration

Subcategory: Audit Filtering Platform Connection

Event Description:

This event generates when Windows Filtering Platform has allowed a connection.

Note  For recommendations, see Security Monitoring Recommendations for this event.

Event XML:

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
 <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" /> 
 <EventID>5156</EventID> 
 <Version>1</Version> 
 <Level>0</Level> 
 <Task>12810</Task> 
 <Opcode>0</Opcode> 
 <Keywords>0x8020000000000000</Keywords> 
 <TimeCreated SystemTime="2015-09-22T05:24:22.622090200Z" /> 
 <EventRecordID>308129</EventRecordID> 
 <Correlation /> 
 <Execution ProcessID="4" ThreadID="3712" /> 
 <Channel>Security</Channel> 
 <Computer>DC01.contoso.local</Computer> 
 <Security /> 
 </System>
- <EventData>
 <Data Name="ProcessID">4556</Data> 
 <Data Name="Application">\device\harddiskvolume2\documents\listener.exe</Data> 
 <Data Name="Direction">%%14592</Data> 
 <Data Name="SourceAddress">10.0.0.10</Data> 
 <Data Name="SourcePort">3333</Data> 
 <Data Name="DestAddress">10.0.0.100</Data> 
 <Data Name="DestPort">49278</Data> 
 <Data Name="Protocol">6</Data> 
 <Data Name="FilterRTID">70201</Data> 
 <Data Name="LayerName">%%14610</Data> 
 <Data Name="LayerRTID">44</Data> 
 <Data Name="RemoteUserID">S-1-0-0</Data> 
 <Data Name="RemoteMachineID">S-1-0-0</Data> 
 </EventData>
 </Event>

Required Server Roles: None.

Minimum OS Version: Windows Server 2008, Windows Vista.

Event Versions: 0.

Field Descriptions:

Application Information:

  • Process ID [Type = Pointer]: hexadecimal Process ID of the process that received the connection. Process ID (PID) is a number used by the operating system to uniquely identify an active process. To see the PID for a specific process you can, for example, use Task Manager (Details tab, PID column):

    Task manager illustration

    If you convert the hexadecimal value to decimal, you can compare it to the values in Task Manager.

    You can also correlate this process ID with a process ID in other events, for example, “4688: A new process has been created” Process InformationNew Process ID.

  • Application Name [Type = UnicodeString]: full path and the name of the executable for the process.

    Logical disk is displayed in format deviceharddiskvolume#. You can get all local volume numbers by using diskpart utility. The command to get volume numbers using diskpart is “list volume”:

DiskPart illustration

Network Information:

  • Direction [Type = UnicodeString]: direction of allowed connection.

    • Inbound – for inbound connections.

    • Outbound – for unbound connections.

  • Source Address [Type = UnicodeString]: IP address from which the connection was initiated.

    • IPv4 Address

    • IPv6 Address

    • :: — all IP addresses in IPv6 format

    • 0.0.0.0 — all IP addresses in IPv4 format

    • 127.0.0.1, ::1 — localhost

  • Source Port [Type = UnicodeString]: port number from which the connection was initiated.

  • Destination Address [Type = UnicodeString]: IP address where the connection was received.

    • IPv4 Address

    • IPv6 Address

    • :: — all IP addresses in IPv6 format

    • 0.0.0.0 — all IP addresses in IPv4 format

    • 127.0.0.1, ::1 — localhost

  • Destination Port [Type = UnicodeString]: port number where the connection was received.

  • Protocol [Type = UInt32]: number of the protocol that was used.

Service Protocol Number
Internet Control Message Protocol (ICMP) 1
Transmission Control Protocol (TCP) 6
User Datagram Protocol (UDP) 17
General Routing Encapsulation (PPTP data over GRE) 47
Authentication Header (AH) IPSec 51
Encapsulation Security Payload (ESP) IPSec 50
Exterior Gateway Protocol (EGP) 8
Gateway-Gateway Protocol (GGP) 3
Host Monitoring Protocol (HMP) 20
Internet Group Management Protocol (IGMP) 88
MIT Remote Virtual Disk (RVD) 66
OSPF Open Shortest Path First 89
PARC Universal Packet Protocol (PUP) 12
Reliable Datagram Protocol (RDP) 27
Reservation Protocol (RSVP) QoS 46

Filter Information:

  • Filter Run-Time ID [Type = UInt64]: unique filter ID that allowed the connection.

    To find a specific Windows Filtering Platform filter by ID, run the following command: netsh wfp show filters. As a result of this command, the filters.xml file will be generated. Open this file and find specific substring with required filter ID (<filterId>), for example:

Filters.xml file illustration

  • Layer Name [Type = UnicodeString]: Application Layer Enforcement layer name.

  • Layer Run-Time ID [Type = UInt64]: Windows Filtering Platform layer identifier. To find a specific Windows Filtering Platform layer ID, run the following command: netsh wfp show state. As a result of this command, the wfpstate.xml file will be generated. Open this file and find specific substring with required layer ID (<layerId>), for example:

Wfpstate xml illustration

Security Monitoring Recommendations

For 5156(S): The Windows Filtering Platform has permitted a connection.

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

  • You can monitor to see if “Application” isn’t in a standard folder (for example, not in System32 or Program Files) or is in a restricted folder (for example, Temporary Internet Files).

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

  • If the computer or device shouldn’t have access to the Internet, or contains only applications that don’t connect to the Internet, monitor for 5156 events where “Destination Address” is an IP address from the Internet (not from private IP ranges).

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

  • If you’ve an allowlist 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 aren’t in the allowlist.

  • If you need to monitor all inbound connections to a specific local port, monitor for 5156 events with that “Source Port.

  • Monitor for all connections with a “Protocol Number” that isn’t 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.”

This event documents each time WFP allows a program to connect to another process (on the same or a remote computer) on a TCP or UDP port.

The above example is of WFP allowing the DNS Server service to connect to the DNS client on the same computer.

Application Information:

Description Fields in
5156

Application Information:

  •  Process ID:  %1
  •  Application Name: %2

Network Information:

  •  Direction:  %3
  •  Source Address:  %4
  •  Source Port:  %5
  •  Destination Address: %6
  •  Destination Port:  %7
  •  Protocol:  %8

Filter Information:

  •  Filter Run-Time ID: %9
  •  Layer Name:  %10
  •  Layer Run-Time ID: %11

Examples of 5156

The Windows Filtering Platform has allowed a connection.

Application Information:

   Process ID:  1752
   Application Name: deviceharddiskvolume1windowssystem32dns.exe

Network Information:

   Direction:  Inbound
   Source Address:  10.45.45.103
   Source Port:  53
   Destination Address: 10.45.45.103
   Destination Port:  50146
   Protocol:  17

Filter Information:

   Filter Run-Time ID: 5
   Layer Name:  Receive/Accept
   Layer Run-Time ID: 44

Top 10 Windows Security Events to Monitor

Free Tool for Windows Event Collection

 I have seen more number of  logs with the Event ID 5156 while working with File System Auditing where this event is being repeatedly logged on my server 2008 R2 machine.

See the event in this picture

Event 5156 Repeated log

After I have analyzed for the reason of Event ID 5156 is being repeatedly logged,  found the below solutions to stop the Event ID 5156 from being logged continuously 

Event ID 5156 should occur if the Success or Failure audit was enabled for Filtering Platform Connection in Advanced Audit Policy Configuration setting which is available from Windows 2008 R2 and later versions.

Category: Object Access

Subcategory: Filtering Platform Connection

You will get the following Event IDs if  the Filtering Platform Connection is enabled. 

5031 – The Windows Firewall Service blocked an application from accepting incoming connections on the network.
   5154 – The Windows Filtering Platform has permitted an application or service to listen on a port for incoming connections.
   5155 – The Windows Filtering Platform has blocked an application or service from listening on a port for incoming connections.
   5156 – The Windows Filtering Platform has allowed a connection
   5157 – The Windows Filtering Platform has blocked a connection
   5158 – The Windows Filtering Platform has permitted a bind to a local port.
   5159 -The Windows Filtering Platform has blocked a bind to a local port.

We should disable the audit policy setting Filtering Platform Connection in Advanced Audit Policy Configuration to stop this event. We can do it in the following ways.

Possible Solution: 1- using Auditpol exe

    If you would like to get rid of this Filtering Platform Connection event 5156 then you need to run the following commands in an elevated command prompt (Run As Administrator):

    Auditpol /set /subcategory:”Filtering Platform Connection” /Success:disable



Then update gpo by this command

    gpupdate /force

Possible Solution: 2 – using Local Security Policy

    You can also disable Filtering Platform Connection in Advanced Audit Policy Configuration of Local Security Policy.

    1. Press the key Windows + R

    2. Type command secpol.msc, click OK

    3. Then go to the node Advanced Audit Policy Configuration->Object Access.

    4. Check the audit setting Audit Filtering Platform Connection If it is configured as Success, you can   revert it Not Configured and Apply the setting.

Possible Solution: 3 – using Group Policy Object

    If the setting is inherited from any other GPO to Local Security Policy,You need to edit the specific GPO which is configured with the setting Audit Filtering Platform Connection. You can find the GPO by running Resultant Set of Policy. 

   1. Press the key Windows + R 

   2. Type command rsop.msc, click OK.

   3. Now you can the below result window. Then go to the node Computer Configuration ->Windows Settings ->Local Polices-> Audit Policy.

   4. Now, you can see the Source GPO of the setting Audit Object Access which is the root Setting for Audit Filtering Platform Connection.

    5. Then you can edit the Audit Filtering Platform Connection of corresponding GPO by running GPMC.msc command through Run window or command window.

    Note:You need run the command GPUpdate /force after every changes to apply group policy to system immediately.

Morgan

Software Developer

Понравилась статья? Поделить с друзьями:
  • The windows filtering platform has blocked a connection
  • The windows family of operating systems
  • The windows component message queuing is missing
  • The windows club ultimate windows tweaker
  • The windows clean every two weeks составить предложение