Process

unknown

schtasks.exe

schtasks.exe is the command-line interface to the Windows Task Scheduler. It creates, runs, queries, changes, and deletes scheduled tasks, programs set to run on a trigger like a time, a logon, or system boot. Administrators use it for routine automation. Attackers use it as one of the most reliable ways to gain persistence and to run code on remote machines.

File identity

File details

Not observed.

Signing information

Not observed.

File version0

Not observed.

File size0

Not observed.

Execution context

File paths0

Not observed.

User context0

Not observed.

Integrity level0

Not observed.

Instances0

Not observed.

Session0

Not observed.

Token privileges0

Not observed.

Ancestry

Parents0

Not observed.

Children0

Not observed.

Grandparents0

Not observed.

Grandchildren0

Not observed.

Behavior

Loaded modules0

Not observed.

Named pipes0

Not observed.

Process handles0

Not observed.

Command-line patterns0

Not observed.

LOLBAS2
  • schtasks /create /sc minute /mo 1 /tn "Reverse shell" /tr "{CMD}"Execute · Create a recurring task to keep reverse shell session(s) alive
  • schtasks /create /s targetmachine /tn "MyTask" /tr "{CMD}" /sc dailyExecute · Create a remote task to run daily relative to the the time of creation

Indicators

Hashes

Not observed.

Analysis

About this process

schtasks.exe manages scheduled tasks through the Task Scheduler service. A task pairs a trigger (a time, a schedule, logon, boot, idle, or an event) with an action (a program or script) and an account to run as. The main verbs are /create, /run, /query, /change, and /delete, and with /s <host> plus credentials it manages tasks on a remote machine. The genuine binary lives at C:\Windows\System32\schtasks.exe. The tasks it creates are carried out later by the Task Scheduler, often through taskhostw.exe for DLL-based tasks.

Legitimately, schtasks is run by administrators, installers, and management tooling to set up maintenance and automation. The task it creates, the program that task runs, the account it runs as, and the trigger that fires it, all on the command line, are what give an instance meaning.

Security notes

schtasks.exe is one of the most common persistence mechanisms on Windows (T1053.005). A task bound to logon or boot, or set on a recurring schedule, re-runs the attacker's program every time the trigger fires and survives reboots, and /ru SYSTEM makes that program run with full privileges. A created task whose action is a script host, a LOLBIN, or a binary in a user-writable directory points to abuse rather than routine automation.

Pointed at a remote host, schtasks is also lateral movement (T1053.005). schtasks /create /s <target> /u <user> /p <pass> /tr ... followed by /run creates and triggers a task on another machine with supplied credentials, a well-worn remote-execution method. Remote task creation followed by an immediate run is the pattern.

Attackers also hide tasks, for example by stripping a task's security descriptor so it disappears from the Task Scheduler UI, and tuck them in obscure folders. Because schtasks is a normal administrative tool, the action, the account, the trigger, the parent, and any remote target are what separate automation from abuse. Where a created task runs DLL-based work, it surfaces at execution time under taskhostw.exe.

Anomaly signals7
  • Image path other than C:\Windows\System32\schtasks.exehigh
  • /create with /tr pointing to a script host, a LOLBIN, or a binary in a user-writable pathhigh
  • /ru SYSTEM or another privileged account on a created taskhigh
  • A remote target, /s <host> with credentialshigh
  • Parent is an Office application, a script host, or an unfamiliar processhigh
  • A task created in an unusual or hidden task foldermed
  • /create followed immediately by /runmed

Telemetry

OS prevalence0

Not observed.

Observation timeline

Not observed.

References

Subsearch

Hasbeen seen inof schtasks.exe?