Try it using Invoke-Atomic

Remote Services:VNC

Description from ATT&CK

Adversaries may use Valid Accounts to remotely control machines using Virtual Network Computing (VNC). VNC is a platform-independent desktop sharing system that uses the RFB (“remote framebuffer”) protocol to enable users to remotely control another computer’s display by relaying the screen, mouse, and keyboard inputs over the network.(Citation: The Remote Framebuffer Protocol)

VNC differs from Remote Desktop Protocol as VNC is screen-sharing software rather than resource-sharing software. By default, VNC uses the system's authentication, but it can be configured to use credentials specific to VNC.(Citation: MacOS VNC software for Remote Desktop)(Citation: VNC Authentication)

Adversaries may abuse VNC to perform malicious actions as the logged-on user such as opening documents, downloading files, and running arbitrary commands. An adversary could use VNC to remotely control and monitor a system to collect data and information to pivot to other systems within the network. Specific VNC libraries/implementations have also been susceptible to brute force attacks and memory usage exploitation.(Citation: Hijacking VNC)(Citation: macOS root VNC login without authentication)(Citation: VNC Vulnerabilities)(Citation: Offensive Security VNC Authentication Check)(Citation: Attacking VNC Servers PentestLab)(Citation: Havana authentication bug)

Atomic Tests

Atomic Test #1 - Enable Apple Remote Desktop Agent

ARD leverages a blend of protocols, including VNC to send the screen and control buffers and SSH for secure file transfer. Adversaries can abuse ARD to gain remote code execution and perform lateral movement.


Supported Platforms: macos

auto_generated_guid: 8a930abe-841c-4d4f-a877-72e9fe90b9ea



Attack Commands: Run with sh! Elevation Required (e.g. root or admin)

sudo /System/Library/CoreServices/RemoteManagement/ -activate -configure -allowAccessFor -allUsers -privs -all -quiet

Cleanup Commands:

sudo /System/Library/CoreServices/RemoteManagement/ -deactivate -stop -configure -privs -none -quiet