Vulnerability title: Privilege Escalation In ESET Products For Windows
|Product:||ESET Windows Products|
|Affected version:||v5.0 – 7.0 (Firewall Module Build 1183 (20140214) and earlier)|
|Fixed version:||v6 – v7 (Firewall Module Build 1212 (20140609))|
|Reported by:||Kyriakos Economou|
Versions 5.0 – 7.0 of ESET Smart Security and ESET Endpoint Security products for Windows XP OS allow a low privileged user to execute code as SYSTEM by exploiting a vulnerability in the ESET Personal Firewall NDIS filter (EpFwNdis.sys) kernel mode driver also mentioned as Personal Firewall module: Build 1183 (20140214) and prior. This is a ‘trusted value vulnerability’ that can be triggered through a specific IOCTL with a specifically crafted buffer, to force the driver to validate an improper IOCTL.
EpFwNdis.sys registers NDIS!ndisDeviceControlIrpHandler as the dispatch function for the IRP_MJ_DEVICE_CONTROL IRP function code.
Through IOCTL 0x830020CC we arrive at EpFwNdis+0x43f6 where the trusted value vulnerability is triggered:
*ba2ac41c 3b4d08 cmp ecx,dword ptr [ebp+8] <--- we can control the value at [ebp+8] from userland
Matching ECX value means that we can keep controlling the execution and force it to validate some other parameters that we send through the IOCTL input buffer.Getting the proper value can be achieved either by triggering a kernel memory leak vulnerability present in the same driver module (version agnostic), or by getting its base address and send the correct offset through the IOCTL. The magic value is stored inside the driver image itself so by knowing the base address we can calculate the RVA for it.
Finally we will arrive here:
wanarp!WanNdisReceiveComplete <--- function name in wanarp.sys
call dword ptr [wanarp!g_pfnIpRcvComplete (ba29dfb4)] <---- 0x00000000
As NULL pages can be allocated in Windows XP, we can put to 0×00000000 a trampoline to our payload and execute code with kernel privileges.
This vulnerability could allow a malicious attacker to gain Administrator privileges on a system from a user account.
The proof of concept exploit is available.
|29/05/2014||Vendor working on a fix|
|12/06/2014||Vendor supplied an expected release date for fix|
|19/06/2014||Vendor supplied a pre-release fix for testing|
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.