8. Scheduled Tasks

Scheduled Task Privesc

  1. Enumerate scheduled tasks:
schtasks /query /fo LIST /v
  1. Check permissions of the directory of the wanted binary to replace with 'icacls'.
  2. Win!

Enumeration Queries:

Windows Tasks Exclude Directory Search Query:

schtasks /query /fo LIST /v | findstr /v /c:"system32" /c:"root"

Get-ScheduledTask | findstr /v /i /c:"\Microsoft\Windows"

One-liner to show binary paths only and exclude system32 and com handler (should work well):

schtasks /query /fo LIST /v | findstr /B /C:"Task To Run" | findstr /v /c:"root" /c:"System32" /c:"system32" /c:"COM"