Vulnerability title: Arbitrary Code Execution In Faronics Deep Freeze Standard and Enterprise
|Product:||Deep Freeze Standard and Enterprise|
|Affected version:||Before and including v8.10|
|Reported by:||Kyriakos Economou|
The latest, and earlier, versions of Deep Freeze Standard/Enterprise allow a local attacker to execute code with Kernel privileges, without the need of loading another kernel mode driver, by exploiting a vulnerability in the DfDiskLo.sys. Unsuccessful exploit attempts will lead to system crash. The vulnerability doesn’t currently allow vertical privilege escalation since the driver by default only allows administrator accounts to perform an IOCTL request.
We have verified and successfully exploited this vulnerability in WinXP SP3 and Win 7 SP0, both 32-bit builds.
The bug is related with the way DfDiskLo.sys driver makes a call to IofCallDriver function without validating properly the parameters passed to it:
MOV ESI, DWORD [ECX+8] - ECX should point to a DEVICE_OBJECT structure, PUSH EDX which at offset 0x08 has a pointer to a DRIVER_OBJECT structure PUSH ECX CALL DWORD [ESI+EAX*4+38] - here it calls the major function based on the IRP function code, the IRP function code is stored in EAX.
When we send the IOCTL request, ECX is zero instead of pointing to a DEVICE_OBJECT structure, that is why we have to allocate the NULL page before triggering the bug.
Once the NULL page is allocated, we can write whatever we want to address 0×08. ESI will then, instead of pointing to a legitimate DRIVER_OBJECT structure, point to an arbitrary memory location that we control.
Finally, EAX holds the IRP function code, in this case IRP_MJ_DEVICE_CONTROL (0x0E).
We can control the full mathematical expression [ESI+EAX*4+38] and as such we have full control over the EIP redirection.
This vulnerability allows Arbitrary Code Execution in the Kernel that can allow disabling Signed Driver Enforcement and other attack mitigations provided by the kernel of OS.
The proof of concept exploit is available.
Ensure that administrative privileges are only given to trusted users.
|07/03/2014||Vendor requested details|
|10/03/2014||Details submitted to vendor|
|10/03/2014||Vendor requested details regarding product version|
|16/04/2014||Vendor unable to reproduce|
|16/04/2014||Vendor lowered priority of fix|
|01/10/2014||Moved to forced disclosure|
|03/11/2014||Vendor contacted regarding disclosure|
Copyright © Portcullis Computer Security Limited 2014, All rights reserved worldwide. Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.
The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user’s risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.