SCHTASKS /S
EVENT 4698
TASKSCHEDULER 106
ATSVC
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Remote Scheduled Task Creation and schtasks Abuse

A scheduled task is persistence and remote execution in one object. The tell is a task registered over the network, run once and removed.

Scroll

The Task Scheduler RPC interface lets an administrator create a task on a remote host, run it immediately and delete it. schtasks /create /s, PowerShell’s ScheduledTasks module and Impacket’s atexec.py all use it. The creation event records the task XML, so you can read what it will run.

Signals at a Glance

SignalWhereATT&CK
Task created (4698) in a session that began with a type 3 logonSecurity 4698 + 4624T1053.005
Task registered (106) and started (200) with a one-time trigger and immediate runTaskScheduler/OperationalT1053.005
schtasks.exe with /s, /create and /ru SYSTEM on the command lineSysmon 1, Event 4688T1053.005
IPC$ access to the atsvc pipeSecurity 5145, Zeek smbT1021.002
Task created and deleted (4699) within secondsSecurity 4698/4699T1053.005

Proving the Task Was Remote

Event 4698 includes the creator’s logon ID. If that ID belongs to a type 3 (network) logon on the same machine, the task was not created at a console. That correlation separates remote creation from local administration far better than the task name does. Auditing note: enable Audit Other Object Access Events or 4698 will never appear.

// Sentinel (KQL) - scheduled task created from a network logon session
SecurityEvent
| where EventID == 4698
| project TaskTime=TimeGenerated, Computer, TaskName, TaskContent, SubjectUserName, SubjectLogonId
| join kind=inner (
    SecurityEvent
    | where EventID == 4624 and LogonType == 3
    | project LogonTime=TimeGenerated, Computer, TargetLogonId, SourceIp=IpAddress
) on Computer, $left.SubjectLogonId == $right.TargetLogonId
| extend RunsAsSystem = TaskContent has "S-1-5-18" or TaskContent has "SYSTEM"
| extend Immediate = TaskContent has "TimeTrigger"
| project TaskTime, Computer, TaskName, SubjectUserName, SourceIp, RunsAsSystem, Immediate
// tune/validate: patching tools create network-origin tasks; allowlist by task path and account.

In Splunk, hunt the client side. schtasks.exe with a remote target is easy to match, and attackers rarely hide the switch:

index=sysmon EventCode=1 (Image="*\\schtasks.exe" OR OriginalFileName="schtasks.exe")
  CommandLine="* /s *" OR CommandLine="* /S *" OR CommandLine="*\\\\*"
  CommandLine="*/create*"
| eval runs_as_system=if(match(CommandLine, "(?i)/ru\s+(system|\"nt authority)"), 1, 0)
| stats count values(CommandLine) as cmds by Computer, User, ParentImage, runs_as_system
| sort - runs_as_system, - count
# tune/validate: SIEM-specific quoting; test the regex against a known schtasks sample first.

Reading the Task

Vetted sources

Use the SigmaHQ scheduled-task rules, Elastic and Splunk ESCU scheduled-task content and MITRE CAR analytics for remote task creation. Atomic Red Team provides schtasks and atexec tests, and the Sysmon configurations from SwiftOnSecurity and Olaf Hartong capture process creation. Baseline your own environment: software deployment and backup agents routinely register tasks remotely.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026