Event ID 5157: The Windows Filtering Platform has blocked a connection
The Windows Filtering Platform has blocked a connection.
- Channel
- Security
- Logged by default
- No
- Written on
- Any host
- Volume
- High
- Audit subcategory
- Filtering Platform Connection
- Needs a SACL
- No
To have this event
- Enable Filtering Platform Connection:
auditpol /set /subcategory:"Filtering Platform Connection" /success:enable /failure:enable
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| Application | Full path to the application |
| ProcessID | Process ID of the application |
| Direction | Direction (Inbound/Outbound) |
| SourceAddress | Source IP address |
| SourcePort | Source port |
| DestAddress | Destination IP address |
| DestPort | Destination port |
| Protocol | Protocol number |
| FilterRTID | Filter runtime ID that blocked the connection |
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Security' -FilterXPath "*[System[(EventID=5157)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Common questions
- What does Windows event ID 5157 mean?
- The Windows Filtering Platform has blocked a connection. It is written to the Windows Security log (Security).
- Is event 5157 logged by default?
- No. It must be enabled before it is recorded. It is controlled by the "Filtering Platform Connection" Advanced Audit Policy subcategory (Object Access).
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderThe Windows Filtering Platform has blocked a connection. Needs the "Filtering Platform Connection" audit subcategory. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.