module

MS15-001 Microsoft Windows NtApphelpCacheControl Improper Authorization Check

Disclosed
2014-09-30
Created
2018-05-30

Description

On Windows, 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. It reads the caller's
impersonation token using PsReferenceImpersonationToken and then does a comparison between
the user SID in the token to LocalSystem's SID. It doesn't check the impersonation level
of the token so it's possible to get an identify token on your thread from a local system
process and bypass this check.

This module currently only affects Windows 8 and Windows 8.1, and requires access to
C:\Windows\System\ComputerDefaults.exe (although this can be improved).

Authors

James Forshaw
sinn3r sinn3r@metasploit.com

Platform

Windows

Architectures

x86, x64

Module Options

To display the available options, load the module within the Metasploit console and run the commands ‘show options’ or ‘show advanced’:


msf > use exploit/windows/local/ntapphelpcachecontrol
msf exploit(ntapphelpcachecontrol) > show targets
...targets...
msf exploit(ntapphelpcachecontrol) > set TARGET < target-id >
msf exploit(ntapphelpcachecontrol) > show options
...show and set options...
msf exploit(ntapphelpcachecontrol) > exploit

Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.