CVE-2014-2382 – Arbitrary Code Execution In Faronics Deep Freeze Standard and Enterprise

Vulnerability title: Arbitrary Code Execution In Faronics Deep Freeze Standard and Enterprise
CVE: CVE-2014-2382
Vendor: Faronics
Product: Deep Freeze Standard and Enterprise
Affected version: Before and including v8.10
Fixed version: N/A
Reported by: Kyriakos Economou
Details:

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, which at offset 0x08 has a pointer to a DRIVER_OBJECT structure
PUSH EDX
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 0x08. 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.

Further details at:
https://www.portcullis-security.com/security-research-and-downloads/security-advisories/cve-2014-2382/

All Rights R3v3rs3d