Local Privilege Escalation in Lenovo UDC
The Lenovo UDC service running as SYSTEM attempted to load an OpenSSL configuration file from a directory writable by unprivileged users. An attacker could plant a malicious configuration that loads an arbitrary DLL, leading to code execution with SYSTEM privileges.
Published on blog.advact.ch
I discovered a local privilege escalation vulnerability in the UDC (Universal Device Client) service from Lenovo. The vulnerability allows a non-privileged user to get SYSTEM permissions.
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
The service loaded a configuration file from a world-writable directory without validating its origin or integrity.
What the attacker needed
Local access to a Lenovo machine with UDC installed; Ability to write to C:\ (default for unprivileged users); Reboot to trigger the service
The fix
The vulnerability was fixed by Lenovo in UDC version 23.10, which now loads openssl.cnf from a directory with restricted ACLs.
How it was found
- Use ProcMon with boot logging to capture file access by SYSTEM services.
- Filter for CreateFile events with 'not found' result from SYSTEM processes.
- Identify that UDClientService.exe tries to load openssl.cnf from a writable path.
- Create a malicious openssl.cnf that references a custom DLL.
- Place the DLL and openssl.cnf in the writable directory.
- Reboot the system to trigger the service to load the malicious configuration and DLL.
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.
A service running with high privileges (SYSTEM) looked for a configuration file in a folder that normal users can write to. By placing a crafted file there, an attacker could make the service load their own code and run it with those high privileges, taking over the computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.