Detect VNC in Sumo Logic CSE
Adversaries may use Valid Accounts to remotely control machines using Virtual Network Computing (VNC). VNC uses the Remote Framebuffer (RFB) protocol to relay screen, mouse, and keyboard inputs over the network. Unlike RDP, VNC provides screen-sharing rather than resource-sharing, making it useful for interactive control. Threat actors including Gamaredon Group, FIN7, and APT groups have used VNC tools including UltraVNC, TightVNC, TigerVNC, and RealVNC for lateral movement and remote access. VNC communicates on TCP port 5900+ by default and can be used with or without password authentication, with some implementations historically vulnerable to authentication bypasses.
MITRE ATT&CK
- Tactic
- Lateral Movement
- Technique
- T1021 Remote Services
- Sub-technique
- T1021.005 VNC
- Canonical reference
- https://attack.mitre.org/techniques/T1021/005/
Sumo Detection Query
(_sourceCategory=*windows* OR _sourceCategory=*sysmon* OR _sourceCategory=*endpoint*)
(EventID=1 OR EventID=3 OR EventID=7045 OR EventID=4697)
| kvform nodrop
| where (
(
EventID = "1"
AND (
Image matches "*\\vncserver.exe" OR Image matches "*\\vncviewer.exe"
OR Image matches "*\\tvnserver.exe" OR Image matches "*\\tvnviewer.exe"
OR Image matches "*\\winvnc.exe" OR Image matches "*\\winvnc4.exe"
OR Image matches "*\\uvnc_service.exe" OR Image matches "*\\ultravnc.exe"
OR Image matches "*\\rfbdrv.exe" OR Image matches "*\\x0vncserver*"
)
)
OR (
EventID = "3"
AND toInt(DestinationPort) >= 5900
AND toInt(DestinationPort) <= 5910
)
OR (
EventID in ("7045", "4697")
AND (
toLowerCase(ServiceName) matches "*vnc*"
OR toLowerCase(ServiceName) matches "*rfbdrv*"
OR toLowerCase(ServiceName) matches "*uvnc*"
)
)
)
| eval AlertType = if(EventID = "1", "VNC_ProcessExecution",
if(EventID = "3", "VNC_NetworkConnection", "VNC_ServiceInstall"))
| eval IsVncServer = if(Image matches "*\\vncserver*" OR Image matches "*\\tvnserver*"
OR Image matches "*\\winvnc*" OR Image matches "*\\uvnc_service*", "true", "false")
| eval IsVncClient = if(Image matches "*\\vncviewer*" OR Image matches "*\\tvnviewer*", "true", "false")
| fields _messageTime, Computer, User, Image, CommandLine, ParentImage,
DestinationIp, DestinationPort, ServiceName, ServiceFileName, AlertType, IsVncServer, IsVncClient
| sort by _messageTime desc Detects VNC process execution, TCP connections on ports 5900-5910, and VNC service installation using Sumo Logic key-value parsing against Windows Sysmon (EventID 1, 3) and Windows Security/System (EventID 7045, 4697) log data. Parses Sysmon field pairs from event messages including Image, CommandLine, ParentImage, DestinationPort, DestinationIp, ServiceName, and ServiceFileName. Enriches results with IsVncServer and IsVncClient classifications.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate IT remote support operations using VNC-based tools approved by the organisation (e.g., managed service providers with authorised RMM stacks that include VNC components) — correlate with a known-good asset allowlist
- Virtual machine hypervisor management consoles (e.g., QEMU/KVM virt-manager, Proxmox noVNC) communicating on VNC ports exclusively on internal RFC-1918 addresses with well-known source processes
- Network monitoring and asset management platforms (e.g., Nessus, Qualys, Rapid7) generating TCP connection events to port 5900 during discovery scans — identify by scanner source IP exclusion lists
Other platforms for T1021.005
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Install TightVNC Server as Windows Service
Expected signal: Sysmon Event ID 1: tvnserver.exe with -install flag. Windows Security Event ID 7045: new service tvnservice created. Registry key created at HKLM\SOFTWARE\TightVNC. Sysmon Event ID 12 (registry key create) for TightVNC registry entries.
- Test 2VNC Connection to Remote Host via vncviewer
Expected signal: Sysmon Event ID 1: tvnviewer.exe process creation with target IP. Sysmon Event ID 3: outbound TCP connection to 127.0.0.1:5900. Windows firewall log entry for port 5900 connection.
- Test 3Configure UltraVNC with No Authentication (Backdoor Setup)
Expected signal: Sysmon Event ID 13 (Registry Value Set) for HKLM\SOFTWARE\UltraVNC\Password and SecurityIdentifier. Security Event ID 4657 (registry value modified). Parent process visible as cmd.exe.
- Test 4Start VNC Server on Non-Standard Port
Expected signal: Linux auditd EXECVE for vncserver with -rfbport 5901 and -SecurityTypes None. Network socket opened on port 5901. Process creation for Xvnc child process.
References (7)
- https://attack.mitre.org/techniques/T1021/005/
- https://www.tightvnc.com/
- https://www.realvnc.com/en/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1021.005/T1021.005.md
- https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/shuckworm-ukraine-gamaredon
- https://www.crowdstrike.com/blog/carbon-spider-embraces-big-game-hunting/
- https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
Unlock Pro Content
Get the full detection package for T1021.005 including response playbook, investigation guide, and atomic red team tests.