Sysmon Event ID 3: Network connection
Sysmon event 3 ties each TCP/UDP connection to the process that made it: source, destination, ports and ProcessGuid. Key for C2 and lateral movement.
Overview
- Event ID
- 3
- Log / channel
- Microsoft-Windows-Sysmon/Operational
- Provider
- Microsoft-Windows-Sysmon
- Category
- network
- Enabled by default
- No
- How to enable
- Sysmon installed with network monitoring enabled (
-nswitch or a<NetworkConnect>rule in the configuration).
What event 3 logs
Sysmon event 3 records a TCP or UDP connection together with the process responsible for it. That is the piece firewall and proxy logs miss: not just that the host talked to an address, but which executable did it and under which account.
Initiated tells the direction: true means the local process opened the connection (outbound), false means it accepted one. Host names are filled by reverse DNS lookup when DnsLookup is enabled, so they may not match what the process actually resolved — use event 22 for that.
The event is disabled by default because of its volume. Good configurations include connections from script hosts, LOLBins and user-writable paths, and exclude browsers and known agents.
Fields
Every field recorded in event 3, with the values that matter for investigation.
ProcessGuidProcess that made or accepted the connection; pivot to its event 1.
ImageExecutable behind the connection.
UserAccount of the process.
ProtocolTransport protocol.
- tcp
- TCP connection.
- udp
- UDP traffic.
InitiatedDirection of the connection.
- true
- The local process initiated the connection (outbound).
- false
- The local process accepted an inbound connection.
SourceIpSource address.
SourcePortSource port.
DestinationIpDestination address.
DestinationHostnameDestination name from reverse DNS, when available. Not necessarily the name the process queried.
DestinationPortDestination port.
DestinationPortNameService name for well-known ports, e.g. https or microsoft-ds.
SourceIsIpv6true when the connection uses IPv6.
How to enable this event
Sysmon installed with network monitoring enabled (-n switch or a <NetworkConnect> rule in the configuration).
Host names depend on reverse DNS (DnsLookup configuration entry). Compare with Windows Filtering Platform event 5156 when that audit subcategory is enabled.
Detection and investigation
Typically benign
- Browsers, Office, Teams and update agents talking to cloud services on 443.
- Domain members connecting to domain controllers on 88, 389, 445 and 135.
- Management and backup agents polling their servers.
Worth investigating
- Script hosts or LOLBins (
powershell.exe,rundll32.exe,regsvr32.exe,mshta.exe,certutil.exe) making outbound connections to the internet. - Beaconing — regular connections from the same process to a rare external IP.
- Lateral movement from a workstation to other hosts on 445 (SMB), 135 (RPC/WMI), 5985/5986 (WinRM) or 3389 (RDP).
- Processes from
%TEMP%,DownloadsorProgramDataconnecting out on non-standard ports.
Investigation notes
- Pivot on ProcessGuid to event 1 to see the command line and parent of the connecting process.
- Correlate with event 22 from the same ProcessGuid to learn which domain name was resolved.
- Group by Image and DestinationIp to find rare pairs across the fleet.
- For inbound lateral movement, match the destination host's Security 4624 (LogonType 3 or 10) at the same time.