A vulnerability in Microsoft Windows Task Scheduler can be exploited to gain escalated privileges.
Elevated SYSTEM privileges can be gained by exploiting an error in the Microsoft Windows task scheduler. The error occurs while handling the ALPC calls related to the “SchRpcSetSecurity()” function.
In the handling of ALPC calls, the Microsoft Windows task scheduler contains a vulnerability which can permit a local user to gain System privileges, without needing authentication.
The public exploit code works on 64-bit Windows 10 and Windows Server 2016 systems. The publicly-available exploit source code can be modified to make it compatible to other systems.
_SchRpcSetSecurity, a part of the task scheduler ALPC endpoint, allows us to set an arbitrary DACL. It will Set the security of a file in c:\windows\tasks. Even a Guest can write here without impersonating. Before the task scheduler writes the DACL we can create a hard link to any file we have read access over. This will result in an arbitrary DACL write. This PoC will overwrite a printer related dll and use it as a hijacking vector. This is just one of the many options to abuse this.
The error in the Task Scheduler is that the API function SchRpcSetSecurity fails to check permissions, allowing even a guest to call it and set file permissions on anything.The vulnerability was discovered by SandboxEscaper and needs prior code execution to exploit.
Exploit currently only works on 64-bit OSes (likely Win 10 and Server 2016).
There is currently no practical solution to address the vulnerability. Therefore, extra vigilance is required in monitoring a network user’s behavior. Network traffic analytics should be used to detect unusual behavior from traffic going across the network.