T1021.005

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.

Microsoft Sentinel / Defender
kusto
// 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
high severity high confidence

Data Sources

Process: Process Creation Network Traffic: Network Connection Creation Windows Registry: Windows Registry Key Modification

Required Tables

DeviceProcessEvents DeviceNetworkEvents DeviceRegistryEvents

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

Unlock Pro Content

Get the full detection package for T1021.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections