Windows event log · Security5159 The Windows Filtering Platform has permitted an application or service to listen on a port for incoming connections

This event is logged every time WFP prevents a client or server application binds to a port. Binding is the first step in TCP or UDP communications.

  • Security
  • 5 fields
  • Security.evtx
  • Microsoft-Windows-Security-Auditing

Notes

  • This event is logged every time WFP prevents a client or server application binds to a port. Binding is the first step in TCP or UDP communications.
  • Application Information:
  • Process ID: process ID specified when the executable started as logged in 4688
  • Application Name: the program executable on this computer's side of the packet transmission

Fields EvtxECmd extracts

5 columns in the EvtxECmd CSV

  • ExecutableInfo%Application%
    • %Application% = /Event/EventData/Data[@Name="Application"]
  • PayloadData1Source: %SourceAddress%:%SourcePort%
    • %SourceAddress% = /Event/EventData/Data[@Name="SourceAddress"]
    • %SourcePort% = /Event/EventData/Data[@Name="SourcePort"]
  • PayloadData2Protocol: %Protocol%
    • %Protocol% = /Event/EventData/Data[@Name="Protocol"]
  • PayloadData3PID: %ProcessId%
    • %ProcessId% = /Event/EventData/Data[@Name="ProcessId"]
  • PayloadData4LayerName: %LayerName%
    • %LayerName% = /Event/EventData/Data[@Name="LayerName"]

Value lookups

Codes that EvtxECmd turns into text

Protocol

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

LayerName

%%14597
Transport
%%14601
ICMP Error
%%14608
Resource Assignment
%%14609
Listen
%%14610
Receive/Accept
%%14611
Connect

Sample event

Event XML from the map file

<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>5159</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>12810</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8010000000000000</Keywords>
    <TimeCreated SystemTime="2019-04-19T07:36:55.955388300Z"/>
    <EventRecordID>44097</EventRecordID>
    <Correlation/>
    <Execution ProcessID="4" ThreadID="6480"/>
    <Channel>Security</Channel>
    <Computer>DC01.contoso.local</Computer>
    <Security/>
  </System>
  <EventData>
    <Data Name="ProcessId">7924</Data>
    <Data Name="Application">\device\harddiskvolume2\users\test\desktop\netcat\nc.exe</Data>
    <Data Name="SourceAddress">0.0.0.0</Data>
    <Data Name="SourcePort">5555</Data>
    <Data Name="Protocol">6</Data>
    <Data Name="FilterRTID">84614</Data>
    <Data Name="LayerName">%%14608</Data>
    <Data Name="LayerRTID">36</Data>
  </EventData>
</Event>

References

3 links

Source: evtx/Maps/Security_Microsoft-Windows-Security-Auditing_5159.map(opens in new tab) by Jason Ballard and contributors(opens in new tab), MIT License(opens in new tab)