T1021.005 Google Chronicle · YARA-L

Detect VNC in Google Chronicle

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/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule detect_vnc_remote_access_t1021_005 {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects VNC process execution, TCP connections on ports 5900-5910, and VNC registry key creation — MITRE ATT&CK T1021.005 (Remote Services: VNC)"
    mitre_attack_tactic = "Lateral Movement"
    mitre_attack_technique = "T1021.005"
    severity = "HIGH"
    priority = "HIGH"
    created = "2024-01-01"
    version = "1.0"

  events:
    (
      (
        $e.metadata.event_type = "PROCESS_LAUNCH"
        and re.regex($e.target.process.file.full_path,
          `(?i)(vncserver|vncviewer|vncconfig|vnc4server|x0vncserver|tightvncserver|tightvncviewer|ultravnc|uvnc_service|tvnserver|tvnviewer|winvnc|winvnc4|rfbdrv)\.exe`)
      )
      or
      (
        $e.metadata.event_type = "PROCESS_LAUNCH"
        and re.regex($e.principal.process.file.full_path,
          `(?i)(vncserver|vncviewer|uvnc_service|tvnserver|winvnc|rfbdrv)\.exe`)
      )
      or
      (
        $e.metadata.event_type = "NETWORK_CONNECTION"
        and $e.target.port >= 5900
        and $e.target.port <= 5910
        and $e.network.ip_protocol = "TCP"
      )
      or
      (
        $e.metadata.event_type = "REGISTRY_CREATION"
        and re.regex($e.target.registry.registry_key,
          `(?i)(RealVNC|TightVNC|UltraVNC|TigerVNC|WinVNC|RFBDRV)`)
      )
      or
      (
        $e.metadata.event_type = "REGISTRY_MODIFICATION"
        and re.regex($e.target.registry.registry_key,
          `(?i)(RealVNC|TightVNC|UltraVNC|TigerVNC|WinVNC|RFBDRV)`)
      )
    )

  condition:
    $e
}
high severity high confidence

Chronicle YARA-L 2.0 rule detecting VNC-related activity via UDM event types: PROCESS_LAUNCH (target and principal process path matching known VNC binaries), NETWORK_CONNECTION (outbound or inbound TCP on ports 5900-5910), REGISTRY_CREATION and REGISTRY_MODIFICATION (registry key paths containing known VNC software vendor names). Covers RealVNC, TightVNC, UltraVNC, TigerVNC, WinVNC, and the RFBDRV kernel driver used by UltraVNC.

Data Sources

Google Chronicle UDM (Unified Data Model) event streamWindows endpoint telemetry forwarded via Chronicle forwarder or BindplaneEDR solutions (CrowdStrike, Carbon Black, SentinelOne) ingested into Chronicle via partner parsers

Required Tables

UDM Events — event_type: PROCESS_LAUNCHUDM Events — event_type: NETWORK_CONNECTIONUDM Events — event_type: REGISTRY_CREATIONUDM Events — event_type: REGISTRY_MODIFICATION

False Positives & Tuning

  • Authorised IT operations using RealVNC or TightVNC with a documented approval record for managed remote desktop access — add principal.hostname values for known support jump hosts to a reference list and suppress
  • Software deployment and provisioning pipelines (e.g., Packer, Ansible, Chef) that install VNC server components into golden AMIs or base images as part of a standard build process — expected from known CI/CD infrastructure IPs
  • Authorised red team or penetration testing engagements running VNC for operator access to compromised hosts — suppress based on engagement IP ranges and time windows documented in the change management system
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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