Windows ahcache.sys/NtApphelpCacheControl Privilege Escalation

On Windows 8.1 update the system call NtApphelpCacheControl (the code is actually in ahcache.sys) allows application compatibility data to be cached for quick reuse when new processes are created. A normal user can query the cache but cannot add new cached entries as the operation is restricted to administrators. This is checked in the function AhcVerifyAdminContext. This function has a vulnerability where it doesn’t correctly check the impersonation token of the caller to determine if the user is an administrator. This is the proof of concept code.

Leave a Reply