What attackers do. Attackers create or modify Windows scheduled tasks to run malicious code at startup, at logon or on a timer, locally or on remote hosts. This serves Execution, Persistence and Privilege Escalation.
How to defend. Restrict who can create scheduled tasks, particularly remotely, and collect task creation and modification events from the security and task scheduler logs. Baseline the tasks normally present on your systems. Endpoint detection should flag tasks that run scripts or binaries from user-writable locations.
Signs to look for. Look for new tasks with random or system-like names, tasks running interpreters or encoded commands, tasks created remotely, and hidden tasks. A common gap is software that creates many legitimate tasks, hiding new malicious ones in the noise.