WinEvent Scheduled Task Created to Spawn Shell
The following analytic detects the creation of scheduled tasks designed to execute commands using native Windows shells like PowerShell, Cmd, Wscript, or Cscript. It leverages Windows Security EventCode 4698 to…
Description
The following analytic detects the creation of scheduled tasks designed to execute commands using native Windows shells like PowerShell, Cmd, Wscript, or Cscript. It leverages Windows Security EventCode 4698 to identify when such tasks are registered. This activity is significant as it may indicate an attempt to establish persistence or execute malicious commands on a system. If confirmed malicious, this could allow an attacker to maintain access, execute arbitrary code, or escalate privileges, posing a severe threat to the environment.
Detection logic
Detection requirements
- Platform
- Windows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- windows_event_log_security_4698
Known benign triggers
- False positives are possible if legitimate applications are allowed to register tasks that call a shell to be spawned. Filter as needed based on command-line or processes that are used legitimately.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| docs.microsoft.com/en-us/windows/win32/taskschd/time-trigger-example--scripting-?redirectedfrom=MSDN | 2 |
| redcanary.com/threat-detection-report/techniques/scheduled-task-job/ | 3 |
| research.checkpoint.com/2021/irans-apt34-returns-with-an-updated-arsenal/ | 3 |
| www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4698 | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- 203ef0ea-9bd8-11eb-8201-acde48001122
- Tagged by the source as
- 0bj3ctivity StealerCastle RATChina-Nexus Threat ActivityCISA AA22-257ACompromised Windows HostMedusa RansomwareRansomwareRyuk RansomwareSalt TyphoonScheduled TasksSystemBCWindows Error Reporting Service Elevation of Privilege VulnerabilityWindows Persistence TechniquesWinter VivernEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Aug 26, 2026
- Version
- 1