What this actually is.
Technical background, root cause, and affected surface.
vncRandomBytes() in rfb/vncauth.c:119-129 seeds libc rand() with time(0)+getpid()+rand() and generates a 16-byte VNC auth challenge. The combined seed space is ~31 bits (libc rand() internal state). Note: Windows builds may use CryptGenRandom via vncEncryptBytes2.cpp — Windows-path reachability pending compile-graph verification.
- Vendor
- UltraVNC
- Product
- UltraVNC Server
- Severity
- Medium
- CVSS Score
- 4.8
- Status
- Fixed
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- CWE
- CWE-338: Use of Cryptographically Weak PRNG
From one request
to root shell.
Reproduced in a sandboxed environment. Requires only LAN or WiFi adjacency.
predict_challenge.py demonstrates deterministic challenge prediction from time-based seed. Private PoC; not released publicly.
The bug, and the fix.
// rfb/vncauth.c:119-129 vncRandomBytes(unsigned char *bytes) { srand((unsigned int) time(0) + getpid() + rand()); for (i=0; i<CHALLENGESIZE; i++) bytes[i] = (unsigned char)(rand() & 0xff); }
Root cause: Legacy cross-platform code uses libc rand() with low-entropy time-based seed. vncEncryptBytes2.cpp with CryptGenRandom was added for Windows but compile-graph verification needed to confirm this file shadows vncauth.c on shipped Windows binaries.
When does this fire?
All conditions must be true for the exploit to succeed.
VNC server sends auth challenge generated by vncRandomBytes(). 2. Attacker observes connection timestamp (passive sniff). 3. Enumerates seed space with time(0)+pid+rand(). 4. Predicts 16-byte challenge; forges valid DES-encrypted response.
What an attacker does to you.
Post-exploitation outcomes mapped to CVSS impact metrics.
Predictable VNC auth challenge. With connection timing, attacker brute-forces valid auth responses offline. Impact limited if Windows builds use CryptGenRandom (verification pending).
Fix it. In this order.
A runbook, not a checklist. Sequence matters — assume compromise before you act.
Use CryptGenRandom (Windows) or getrandom() (Unix) exclusively. Vendor fix: CryptGenRandom as primary, /dev/urandom as fallback, legacy srand path unreachable last resort.
disclose@securin.ioVendors moved in days.
Attackers in hours.
Reconstructed from vendor advisories, CISA bulletins, and Securin research records.
Timeline recorded · Disclosure coordinated by Securin
Cite, verify, go deeper.
Primary sources — NVD, CISA KEV, and machine-readable IoC feed.