Skip to content

Windows Event ID 5157: The Windows Filtering Platform has blocked a connection

Written when the Windows Filtering Platform (WFP) blocks a network connection. Paired with permit 5156, it captures denied communication.

Overview

The subcategory is Audit Filtering Platform Connection. It is generated when WFP blocks a connection (outbound/inbound). It includes the source/destination IP and port and the process involved.

How it is triggered

  • When a connection is denied by a filter condition.

Security review points

  • A blocked outbound connection can be a sign of malware being stopped while trying to reach C2. Check the blocked process and destination IP/port.
  • Note patterns such as a specific process repeatedly having outbound connections blocked, or many connection attempts to unfamiliar destinations. Together with permit 5156, build the full communication picture.

Notes for log review

  • It appears in volume. Aggregate by process, destination, and count, and narrow to outbound attempts by suspicious processes or connections to known malicious destinations.
  • Blocks due to missing rules for legitimate apps are also common (false positives). Baseline them and keep the unknown.

MITRE ATT&CK mapping

TechniqueTacticWhat this event shows
T1071 Application Layer ProtocolCommand and ControlBlocked attempts to reach C2

Mapping as of ATT&CK v19.2. To search by technique, see the ATT&CK reverse lookup.

Detection rules

SigmaHQ has 1 public detection rule that uses this event ID as a condition.

RuleTypeSeverity
Windows Filtering Platform Blocked Connection From EDR Agent BinarySigmaHigh

Rules are collected from SigmaHQ r2026-07-01 and from Azure-Sentinel as of 2026-10-09, limited to those whose conditions include this event ID. Sentinel rules are limited to those that query the SecurityEvent or WindowsEvent table. “Threat-specific” rules target a particular threat group or malware, and “needs setup” rules require values for your environment. Severity is the value each rule’s author assigned.

Key fields

FieldMeaning
ApplicationThe process that attempted the connection
Source/Destination Address / PortThe source and destination
DirectionOutbound/inbound

References