VNC
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.
// Detect VNC-related process execution and network connections
let VncProcesses = dynamic(["vncserver", "vncviewer", "vncconfig", "vnc4server", "x0vncserver",
"tightvncserver", "tightvncviewer", "ultravnc", "uvnc", "tvnserver", "tvnviewer",
"winvnc", "winvnc4", "rfbdrv"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (VncProcesses) or InitiatingProcessFileName has_any (VncProcesses)
| extend IsVncServer = FileName has_any ("vncserver", "vnc4server", "tightvnc", "winvnc")
| extend IsVncClient = FileName has_any ("vncviewer", "tightvncviewer")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, IsVncServer, IsVncClient
| union (
// Detect VNC network connections (default port range 5900-5910)
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemotePort between (5900 .. 5910) or LocalPort between (5900 .. 5910)
| where ActionType in ("ConnectionSuccess", "ConnectionFound", "InboundConnectionAccepted")
| project Timestamp, DeviceName, InitiatingProcessFileName, RemoteIP, RemotePort, LocalPort, ActionType
)
| union (
// Detect VNC installation or service registration
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any ("VNC", "RealVNC", "TightVNC", "UltraVNC", "TigerVNC")
| project Timestamp, DeviceName, ActionType, RegistryKey, RegistryValueName, RegistryValueData, InitiatingProcessFileName
)
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT help desk staff using VNC for legitimate end-user support sessions
- System administrators using VNC to manage servers without RDP (especially Linux systems with desktop environments)
- Vendor remote support solutions running VNC as a managed remote access tool
- Development environments with VNC used to access headless Linux servers with GUI applications
- Industrial control system (ICS) environments using VNC for HMI access to SCADA systems
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.