Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / WINDOWS / PERSISTENCE

Scheduled Task

This note documents detection patterns related to Scheduled Task Persistence within Windows environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4698Scheduled task createdCriticalPrimary detection point. Review task name, author, action command, trigger type, creator SID, and XML body.
Security4702Scheduled task updatedCriticalAttackers often modify legitimate tasks.
Security4699Scheduled task deletedHighUseful for cleanup timeline.
Microsoft-Windows-TaskScheduler/Operational106Task registeredCriticalStrong confirmation of task creation.
Microsoft-Windows-TaskScheduler/Operational200Action executedCriticalConfirms payload execution.
Sysmon1Process creationCriticalHunt schtasks.exe, powershell.exe, cmd.exe.
Security4688Process creationHighCommand-line visibility.

Indirect Indicators

  • Hidden task names mimicking Microsoft tasks
  • High-frequency triggers
  • Payload in AppData / Temp
  • Encoded PowerShell in task action
  • Remote RPC task creation

Common Tools

  • schtasks.exe
  • PowerShell Register-ScheduledTask
  • SharpPersist
  • Cobalt Strike
  • Empire
  • Impacket atexec.py

Relevant Artifacts

  • Security 4698 / 4702 / 4699
  • Task Scheduler Operational log
  • C:\Windows\System32\Tasks
  • Registry TaskCache
  • Prefetch SCHTASKS.EXE
  • PowerShell 4104

MITRE ATT&CK References

  • T1053.005 Scheduled Task

Decision Tree

  1. Was task created?
  2. What process created it?
  3. What action executes?
  4. Hidden or modified legitimate task?
  5. Did payload run?

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4698

Sigma

title: Scheduled Task Persistence Creation
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4698
  condition: selection

Mitigation & Hardening

  • Alert on 4698 / 4702
  • Baseline legitimate tasks
  • Restrict task creation rights
  • Enable PowerShell logging