Microsoft-Windows-Sysmon › Event 3

Event ID 3 — Network connection

Provider
Microsoft-Windows-Sysmon
Channel
Operational
Level
Informational
Collection Priority
Recommended (Olaf Hartong, others)
Task
Network connection detected (rule: NetworkConnect)
Opcode
Info

Description

The network connection event logs TCP/UDP connections on the machine.

Message #

Network connection detected:
RuleName: %1
UtcTime: %2
ProcessGuid: %3
ProcessId: %4
Image: %5
User: %6
Protocol: %7
Initiated: %8
SourceIsIpv6: %9
SourceIp: %10
SourceHostname: %11
SourcePort: %12
SourcePortName: %13
DestinationIsIpv6: %14
DestinationIp: %15
DestinationHostname: %16
DestinationPort: %17
DestinationPortName: %18

Fields #

NameDescription
RuleName UnicodeString → stringCustom tag mapped to event, i.e. ATT&CK technique ID
UtcTime UnicodeString → stringTime in UTC when event was created
ProcessGuid GUID → GUIDProcess GUID of the process that made the network connection
ProcessId UInt32 → PIDProcess ID used by the OS to identify the process that made the network connection
Image UnicodeString → stringFile path of the process that made the network connection
User UnicodeString → stringName of the account who made the network connection. It usually contains domain name and user name
Protocol UnicodeString → stringProtocol being used for the network connection
Known values
0
HOPOPT
1
ICMP
2
IGMP
6
TCP
17
UDP
41
IPv6
43
IPv6-Route
44
IPv6-Frag
47
GRE
50
ESP
51
AH
58
ICMPv6
89
OSPF
103
PIM
132
SCTP
Initiated Boolean → booleanIndicates whether the process initiated the TCP connection
SourceIsIpv6 Boolean → booleanIs the source IP an IPv6
SourceIp UnicodeString → stringSource IP address that made the network connection
SourceHostname UnicodeString → stringName of the host that made the network connection
SourcePort UInt16 → unsignedShortSource port number
SourcePortName UnicodeString → stringName of the source port being used (i.e. netbios-dgm)
DestinationIsIpv6 Boolean → booleanIs the destination IP an IPv6
DestinationIp UnicodeString → stringDestination IP address
DestinationHostname UnicodeString → stringName of the host that received the network connection
DestinationPort UInt16 → unsignedShortDestination port number
DestinationPortName UnicodeString → stringName of the destination port

Example Event #

{
  "system": {
    "provider": "Microsoft-Windows-Sysmon",
    "guid": "5770385F-C22A-43E0-BF4C-06F5698FFBD9",
    "event_source_name": "",
    "event_id": 3,
    "version": 5,
    "level": 4,
    "task": 3,
    "opcode": 0,
    "keywords": 9223372036854775808,
    "time_created": "2023-11-06T02:03:45.514949+00:00",
    "event_record_id": 1437449,
    "correlation": {},
    "execution": {
      "process_id": 7064,
      "thread_id": 10068
    },
    "channel": "Microsoft-Windows-Sysmon/Operational",
    "computer": "WinDev2310Eval",
    "security": {
      "user_id": "S-1-5-18"
    }
  },
  "event_data": {
    "RuleName": "-",
    "UtcTime": "2023-11-06 02:03:43.450",
    "ProcessGuid": "E56ADA26-45B9-6548-970A-000000000D00",
    "ProcessId": 13296,
    "Image": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
    "User": "WINDEV2310EVAL\\User",
    "Protocol": "udp",
    "Initiated": true,
    "SourceIsIpv6": false,
    "SourceIp": "192.168.92.128",
    "SourceHostname": "-",
    "SourcePort": 60161,
    "SourcePortName": "-",
    "DestinationIsIpv6": false,
    "DestinationIp": "239.255.255.250",
    "DestinationHostname": "-",
    "DestinationPort": 1900,
    "DestinationPortName": "-"
  },
  "message": ""
}

Detection Patterns #

Detection Rules #

View all rules referencing this event →

Sigma # view in reference

Show 17 more (51 total)

Splunk # view in reference

  • Detect Regasm with Network Connection source: The following analytic detects the execution of regasm.exe establishing a network connection to a public IP address, excluding private IP ranges. This detection leverages Sysmon EventID 3 logs to identify such behavior. This activity is significant as regasm.exe is a legitimate Microsoft-signed binary that can be exploited to bypass application control mechanisms. If confirmed malicious, this behavior could indicate an adversary's attempt to establish a remote Command and Control (C2) channel, potentially leading to privilege escalation and further malicious actions within the environment.
  • Detect Regsvcs with Network Connection source: The following analytic identifies instances of Regsvcs.exe establishing a network connection to a public IP address, excluding private IP ranges. This detection leverages Sysmon EventID 3 logs to monitor network connections initiated by Regsvcs.exe. This activity is significant as Regsvcs.exe, a legitimate Microsoft-signed binary, can be exploited to bypass application control mechanisms and establish remote Command and Control (C2) channels. If confirmed malicious, this behavior could allow an attacker to escalate privileges, persist in the environment, and exfiltrate sensitive data. Immediate investigation and remediation are recommended.
  • LOLBAS With Network Traffic source: The following analytic identifies the use of Living Off the Land Binaries and Scripts (LOLBAS) with network traffic. It leverages data from the Network Traffic data model to detect when native Windows binaries, often abused by adversaries, initiate network connections. This activity is significant as LOLBAS are frequently used to download malicious payloads, enabling lateral movement, command-and-control, or data exfiltration. If confirmed malicious, this behavior could allow attackers to execute arbitrary code, escalate privileges, or maintain persistence within the environment, posing a severe threat to organizational security.
Show 6 more (9 total)
  • Network Traffic to Active Directory Web Services Protocol source: The following analytic identifies network traffic directed to the Active Directory Web Services Protocol (ADWS) on port 9389. It leverages network traffic logs, focusing on source and destination IP addresses, application names, and destination ports. This activity is significant as ADWS is used to manage Active Directory, and unauthorized access could indicate malicious intent. If confirmed malicious, an attacker could manipulate Active Directory, potentially leading to privilege escalation, unauthorized access, or persistent control over the environment.
  • Windows Detect Network Scanner Behavior source: The following analytic detects when an application is used to connect a large number of unique ports/targets within a short time frame. Network enumeration may be used by adversaries as a method of discovery, lateral movement, or remote execution. This analytic may require significant tuning depending on the organization and applications being actively used, highly recommended to pre-populate the filter macro prior to activation.
  • Windows File Transfer Protocol In Non-Common Process Path source: The following analytic detects FTP connections initiated by processes located in non-standard installation paths on Windows systems. It leverages Sysmon EventCode 3 to identify network connections where the process image path does not match common directories like "Program Files" or "Windows\System32". This activity is significant as FTP is often used by adversaries and malware, such as AgentTesla, for Command and Control (C2) communications to exfiltrate stolen data. If confirmed malicious, this could lead to unauthorized data transfer, exposing sensitive information and compromising the integrity of the affected host.
  • Windows Mail Protocol In Non-Common Process Path source: The following analytic detects a Windows application establishing an SMTP connection from a non-common installation path. It leverages Sysmon EventCode 3 to identify processes not typically associated with email clients (e.g., Thunderbird, Outlook) making SMTP connections. This activity is significant as adversaries, including malware like AgentTesla, use such connections for Command and Control (C2) communication to exfiltrate stolen data. If confirmed malicious, this behavior could lead to unauthorized data exfiltration, including sensitive information like desktop screenshots, browser data, and system details, compromising the affected host.
  • Windows Suspect Process With Authentication Traffic source: The following analytic detects executables running from public or temporary locations that are communicating over Windows domain authentication ports/protocols such as LDAP (389), LDAPS (636), and Kerberos (88). It leverages network traffic data to identify processes originating from user-controlled directories. This activity is significant because legitimate applications rarely run from these locations and attempt domain authentication, making it a potential indicator of compromise. If confirmed malicious, attackers could leverage this to access domain resources, potentially leading to further exploitation and lateral movement within the network.
  • Windows Remote Desktop Network Bruteforce Attempt source: The following analytic identifies potential Remote Desktop Protocol (RDP) brute force attacks by monitoring network traffic for RDP application activity. This query detects potential RDP brute force attacks by identifying source IPs that have made more than 10 connection attempts to the same RDP port on a host within a one-hour window. The results are presented in a table that includes the source and destination IPs, destination port, number of attempts, and the times of the first and last connection attempts, helping to prioritize IPs based on the intensity of activity.

Kusto Query Language # view in reference

  • Zinc Actor IOCs files - October 2022 source high: 'Identifies a match across filename and commandline IOC's related to an actor tracked by Microsoft as Zinc. Reference: https://www.microsoft.com/security/blog/2022/09/29/zinc-weaponizing-open-source-software/'

References #