Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Scheduled task persistence uses the operating system’s own job scheduler to re-run an attacker’s code after every reboot, hidden among the hundreds of legitimate tasks already present.

What Is Scheduled Task Persistence?
Scheduled task persistence is the use of an operating system’s built-in job scheduler to re-execute an attacker’s code automatically—at boot, at logon, on a timer, or when a particular event occurs. It is one of the most frequently observed persistence techniques in incident response, and MITRE ATT&CK splits it across T1053.005 for Windows scheduled tasks, T1053.003 for cron, and T1053.006 for systemd timers.
Its appeal is straightforward. The scheduler is a trusted system component, it runs tasks with whatever privileges the creator specifies, and a typical Windows installation already contains several hundred legitimate tasks. One more entry among them is not conspicuous.
A task can be created in several ways, and attackers pick according to how much they care about being seen:
schtasks.exe /create from a command line, which is simple and well logged.ScheduledTasks PowerShell module, or direct use of the Task Scheduler COM interface, which avoids spawning a recognisable process.C:\Windows\System32\Tasks and creating the matching registry entries under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache.Naming is part of the technique. Tasks called GoogleUpdateTaskMachineUA, OneDriveStandaloneUpdater, or something plausibly Microsoft-flavoured, placed inside the \Microsoft\Windows\ folder hierarchy, survive casual review comfortably.
Microsoft documented a notable refinement in April 2022, used by the group it tracks as Hafnium. Each task has a security descriptor stored in the SD registry value under its TaskCache\Tree key. Delete that value, and the task vanishes from both the Task Scheduler interface and the output of schtasks—but it continues to run, because the scheduler service reads the task definition from a different location.
The malware family was named Tarrask, and the lesson generalises: enumerating tasks through the normal interface is not a reliable inventory. Reading the registry keys and the XML files on disk directly is, which is why forensic tooling does exactly that.
The equivalents are cron and systemd. Cron entries may live in a user crontab, in /etc/crontab, in /etc/cron.d/, or in the hourly, daily, and weekly directories, which gives an attacker several similar-looking places to choose from. The @reboot directive provides boot persistence without a timer.
Systemd timers are increasingly preferred because they attract less attention than cron, which most administrators think to check. A timer unit paired with a service unit in /etc/systemd/system/ or in a user’s ~/.config/systemd/user/ directory achieves the same result, and systemctl list-timers is not a command most people run routinely.
Scheduled tasks produce good telemetry if it is enabled, and this is one of the higher-return detection investments available:
Microsoft-Windows-TaskScheduler/Operational log records registration with event 106 and execution with 200 and 201.TaskCache keys catches tasks created by direct manipulation, and specifically catches the deletion of an SD value, which has essentially no legitimate cause./etc/systemd/system/, plus periodic collection of systemctl list-timers output for comparison against a baseline.Triage the alerts by what the task does rather than by its name. A task whose action is powershell.exe -enc, rundll32 with an unusual export, or a binary in a user profile or temporary directory deserves attention regardless of how official it looks. Conversely, a task named after malware but running a signed vendor updater from Program Files usually is one.
Restrict who may create tasks on servers, apply least privilege so that ordinary users cannot create tasks running as SYSTEM, and baseline the scheduled tasks on your standard build so that deviations are visible. On Linux, restrict cron through cron.allow and monitor unit file directories for change.
At Privia Security, our SOC Maturation Services include building and tuning exactly these detections, which are cheap to implement and catch a technique that appears in a large share of real intrusions.
Yes. Deleting the SD registry value under the task’s TaskCache Tree key removes it from the Task Scheduler interface and from schtasks output while the task continues to run normally. Microsoft documented this as the Tarrask technique in 2022. Reliable enumeration therefore requires reading the registry keys and the task XML files on disk rather than trusting the management interface.
Event ID 4698, task creation, is the highest value because it contains the complete task XML including the command line that will run. Pair it with 4702 for modifications and with registry monitoring on the TaskCache keys to catch tasks created without the standard interface. Object access auditing must be enabled for 4698 to be generated at all.
Judge the action, not the name. Look at what command the task executes, where the binary lives, and which account it runs as. Signed executables in Program Files running as a vendor-specific account are usually genuine. Encoded PowerShell, scripts in temporary or profile directories, and anything running as SYSTEM that was created by a non-administrator warrant investigation.
It is, but systemd timers are increasingly preferred by attackers precisely because administrators think to check crontabs and rarely run systemctl list-timers. Cover both: audit the cron directories and user crontabs, monitor unit file directories for new or modified files, and collect timer listings periodically so you can compare them against a known baseline.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.