UltraVNC < 1.8.1.2- Unsafe CreateProcess Call Enables Arbitrary E
UltraVNC's service start/stop process searches for executables in world-writable locations such as C:\Program.exe and C:\Program Files\uvnc.exe, allowing an attacker who can place a file there to have it executed as SYSTEM. The report also notes that disabling user impersonation in the file transfer feature lets any authenticated VNC user upload and run such an executable as SYSTEM.
In UltraVNC < 1.8.1.2, place an arbitrary executable at C:\Program.exe or C:\Program Files\uvnc.exe and restart UltraVNC to run these files as SYSTEM. These executables do not natively exist, but UltraVNC references them during each service start/stop.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely an unquoted or unsafe CreateProcess call that searches for executables in writable directories, combined with a file transfer feature that allows uploading to those directories when user impersonation is disabled.
Impact
An attacker with VNC access and user impersonation disabled could execute arbitrary code as SYSTEM, leading to full system compromise.
What the attacker needed
UltraVNC Server installed as a service; User impersonation disabled; Valid VNC password; Ability to upload files via file transfer
The fix
The issue was fixed in UltraVNC [redacted] by restricting the LoadLibrary search path, and users should keep user impersonation enabled.
How it was found
- Install UltraVNC Server [redacted] or older and register it as a system service.
- Set a VNC password and disable user impersonation in the Input/FT settings.
- Authenticate to a non-admin session using the VNC password.
- Use the file transfer function to upload an arbitrary executable to C:\Program Files\.
- Stop and start the UltraVNC service or reboot the system.
- The uploaded executable runs as SYSTEM, creating a new local administrator account.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a Windows service starts, it sometimes looks for a program in a folder that normal users can write to. If an attacker puts a malicious program with the expected name in that folder, the service runs it with high privileges (SYSTEM). The report also warns that turning off a safety setting called user impersonation lets any VNC user upload and run files as SYSTEM.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.