Sysmon Event ID 3: Network Connection — Fields and Hunting Queries
Published
A process made or received a TCP or UDP connection — Sysmon records which executable, under which account, from which address and port to which address and port, and whether the machine initiated it.
Logged to: Microsoft-Windows-Sysmon/Operational, on the machine where it happened; filtered in a Sysmon configuration by the <NetworkConnect> element.
Microsoft's description
Event ID 3: Network connection
The network connection event logs TCP/UDP connections on the machine. It is disabled by default. Each connection is linked to a process through the ProcessId and ProcessGuid fields. The event also contains the source and destination host names IP addresses, port numbers and IPv6 status.
Source: Microsoft's Sysmon documentation
Every field of event 3
| Field | What it tells you |
|---|---|
| Image | The executable that owns the connection — the field Windows' own network logs do not have. A script host or Office application talking to the internet is the usual finding. |
| Initiated | true when this machine opened the connection (outbound), false when it accepted one (inbound). |
| DestinationIp | The remote address for an outbound connection. Check public addresses against threat intelligence and against what the process should talk to. |
| DestinationPort | The remote port. Ports a process has no business using — a browser on 4444, PowerShell on 445 — carry most of the signal. |
| DestinationHostname | A host name for the destination address, when Sysmon resolved one; empty or a reverse-DNS name, so treat it as a hint, not as the name the process asked for (event 22 has that). |
| SourceIp | The local address for an outbound connection, the remote one for an inbound connection — read it together with Initiated. |
| Protocol | tcp or udp. |
| User | The account the process runs as. |
| ProcessGuid | Joins the connection to the process creation (event 1) with the same ProcessGuid, which has the command line and parent. |
| RuleName | — |
| UtcTime | — |
| ProcessId | — |
| SourceIsIpv6 | — |
| SourceHostname | — |
| SourcePort | — |
| SourcePortName | — |
| DestinationIsIpv6 | — |
| DestinationPortName | — |
Field names and order from Sysmon's manifest (schema 4.90), checked on every build.
What it records
Microsoft’s description: the network connection event “logs TCP/UDP connections on the machine. It is disabled by default. Each connection is linked to a process through the ProcessId and ProcessGuid fields.” That link is the reason to collect it. A firewall or flow log shows that 10.0.5.23 talked to an address on port 443; Sysmon event 3 shows that it was rundll32.exe, running as a specific user, started by a specific parent.
Each event carries the process (Image, ProcessGuid, ProcessId, User), the direction (Initiated), the Protocol, and both ends: SourceIp, SourceHostname, SourcePort and SourcePortName, and the same four for the destination, plus SourceIsIpv6 and DestinationIsIpv6. Because it is off unless configured, what you have depends entirely on the <NetworkConnect> rules: some configurations log every connection, others only those from script hosts and unusual folders, others nothing.
When it matters
| Pattern | Reading |
|---|---|
Office, a script host (wscript.exe, mshta.exe) or rundll32.exe / regsvr32.exe connecting to a public address | Code fetching a payload or calling home (T1105, T1071) |
powershell.exe with outbound connections on 80 or 443 | Often a download cradle — read the command line in event 1 |
| Many connections from one process to one address at regular intervals | Beaconing from an implant |
| Common tools on uncommon ports (4444, 8080 from a binary in AppData) | A non-standard port for command and control (T1571) |
| Initiated false on SMB (445), RDP (3389) or WinRM (5985) from another workstation | Lateral movement into this host |
A process in \Temp\ or \Users\Public\ making any outbound connection | Dropped malware |
How to investigate
The Event table holds Sysmon events with their fields in EventData. Outbound connections from processes that rarely need the network:
Event
| where TimeGenerated > ago(7d)
| where Source == "Microsoft-Windows-Sysmon" and EventID == 3
| extend D = parse_xml(EventData).DataItem.EventData.Data
| mv-apply d = D on (summarize f = make_bag(bag_pack(tostring(d["@Name"]), tostring(d["#text"]))))
| extend Image = tostring(f.Image), Initiated = tostring(f.Initiated), DestinationIp = tostring(f.DestinationIp),
DestinationPort = toint(f.DestinationPort), Account = tostring(f.User)
| where Initiated == "true" and not(ipv4_is_private(DestinationIp))
| where Image has_any ("rundll32.exe", "regsvr32.exe", "mshta.exe", "wscript.exe", "cscript.exe", "winword.exe", "excel.exe", "\\AppData\\", "\\Temp\\")
| project TimeGenerated, Computer, Account, Image, DestinationIp, DestinationPort
Regular, repeated connections — a starting point for beacon hunting:
Event
| where TimeGenerated > ago(1d)
| where Source == "Microsoft-Windows-Sysmon" and EventID == 3
| extend D = parse_xml(EventData).DataItem.EventData.Data
| mv-apply d = D on (summarize f = make_bag(bag_pack(tostring(d["@Name"]), tostring(d["#text"]))))
| extend Image = tostring(f.Image), DestinationIp = tostring(f.DestinationIp), DestinationPort = toint(f.DestinationPort)
| where tostring(f.Initiated) == "true"
| summarize Connections = count(), Hours = dcount(bin(TimeGenerated, 1h)) by Computer, Image, DestinationIp, DestinationPort
| where Hours >= 12
| order by Hours desc, Connections desc
For each hit, take the ProcessGuid back to the process creation event for the command line and parent, and to the process’s DNS queries for the names it resolved. Check destination addresses with the IP blocklist checker. If a host shows no event 3 at all, read the configuration: the <NetworkConnect> section may be missing or include only a few processes.
Read a Sysmon log without a SIEM
Copy Microsoft-Windows-Sysmon%4Operational.evtx from C:\Windows\System32\winevt\Logs (or wevtutil epl Microsoft-Windows-Sysmon/Operational sysmon.evtx) and open it in the EVTX viewer: every event in a table, event 3 filterable, with the analyzer's checks for LSASS access, remote threads and suspicious command lines. Nothing is uploaded.
Related events
- Sysmon Event ID 1 Process creation
- Sysmon Event ID 22 DNSEvent (DNS query)
- Security Event ID 4624 An account was successfully logged on
Detect it
Frequently Asked Questions
- Why do I see no Sysmon Event ID 3 events?
- Microsoft's documentation says the network connection event "is disabled by default". A configuration has to ask for it with a <NetworkConnect> section; many configurations then include only selected processes or ports, so check the RuleName field and the configuration before concluding a process made no connections.
- Does Sysmon Event ID 3 show the domain name the process connected to?
- Not reliably. DestinationHostname is a name Sysmon found for the address, which can be empty or a reverse-DNS name of a shared host. The name the process actually looked up is in its DNS query events (Sysmon event 22) with the same ProcessGuid, logged just before the connection.
- How do I find beaconing in Sysmon network events?
- Group outbound connections by Image, DestinationIp and DestinationPort and look for many connections at regular intervals from a process that should not be talking to the internet, such as rundll32.exe, regsvr32.exe or a binary in a temp folder. The second query on this page counts, per process and destination, the connections and the number of hours they occurred in.
- What does Initiated false mean in event 3?
- The connection was accepted by this machine rather than opened by it. Inbound connections to unusual processes, or to administrative ports from unexpected sources, point to a listener an attacker started or to lateral movement into the host.
Find every Sysmon 3 that matters
Open a Sysmon .evtx or XML export in the free browser analyzer: LSASS access, remote thread injection, process tampering, suspicious command lines and reverse-shell ports are flagged, with the events behind each. Nothing is uploaded.
Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing
Every query on this site's reference pages, the Sigma rules and a cheat sheet in one download: the Incident Response Kit, $29 once.