VNSee
The VNC server software loads a missing DLL (dnssd.dll) from its own directory, allowing an attacker to place a malicious DLL that hooks the LogonUserW API to capture cleartext credentials and optionally bypass authentication with a hardcoded password. An attacker with local access could harvest administrator credentials and gain unauthorised access to the system.
skylightcyber.com
Published on skylightcyber.com
The VNC protocol is used by many IT administrators to remotely connect and take control of user sessions. The VNC server receiving the connection request has access to the cleartext credentials provided by the administrator.
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 the VNC server attempts to load a DLL (dnssd.dll) from its installation directory without verifying its authenticity, enabling DLL hijacking.
Impact
An attacker with local access could harvest cleartext administrator credentials and bypass authentication, potentially leading to full system compromise.
What the attacker needed
Local access to the VNC server installation directory; ability to write files to that directory
The fix
The application should load DLLs from a secure location or verify their integrity, and avoid loading missing DLLs from the current directory.
How it was found
- Identify that vncserver.exe attempts to load dnssd.dll but fails.
- Create a malicious DLL named dnssd.dll that hooks LogonUserW.
- Place the DLL in the same directory as vncserver.exe.
- The DLL loads and hooks LogonUserW to capture credentials.
- Hook FreeLibrary to prevent the DLL from being unloaded.
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 program starts, it often loads extra code from files called DLLs. If a program looks for a DLL in its own folder and doesn't find it, an attacker who can write to that folder can supply a fake DLL. This fake DLL can then intercept sensitive information like passwords.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.