Rapid7 Vulnerability & Exploit Database

Microsoft Windows ALPC Task Scheduler Local Privilege Elevation

Back to Search

Microsoft Windows ALPC Task Scheduler Local Privilege Elevation

Disclosed
08/27/2018
Created
03/19/2019

Description

On vulnerable versions of Windows the alpc endpoint method SchRpcSetSecurity implemented by the task scheduler service can be used to write arbitrary DACLs to `.job` files located in `c:\windows\tasks` because the scheduler does not use impersonation when checking this location. Since users can create files in the `c:\windows\tasks` folder, a hardlink can be created to a file the user has read access to. After creating a hardlink, the vulnerability can be triggered to set the DACL on the linked file. WARNING: The PrintConfig.dll (%windir%\system32\driverstor\filerepository\prnms003*) on the target host will be overwritten when the exploit runs. This module has been tested against Windows 10 Pro x64.

Author(s)

  • SandboxEscaper
  • bwatters-r7
  • asoto-r7
  • Jacob Robles

Platform

Windows

Development

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/alpc_taskscheduler
msf exploit(alpc_taskscheduler) > show targets
    ...targets...
msf exploit(alpc_taskscheduler) > set TARGET < target-id >
msf exploit(alpc_taskscheduler) > show options
    ...show and set options...
msf exploit(alpc_taskscheduler) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;