{"id":"363eccc0-279a-4ccf-a3ab-24c2e63b11fb","title":"Powershell Create Scheduled Task","description":"Adversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code","author":"frack113","status":"test","level":"medium","date":"2021-12-28","modified":"2025-10-07","tags":["attack.privilege-escalation","attack.execution","attack.persistence","attack.t1053.005"],"technique_ids":["T1053.005"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Unknown"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.005/T1053.005.md#atomic-test-4---powershell-cmdlet-scheduled-task","https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.005/T1053.005.md#atomic-test-6---wmi-invoke-cimmethod-scheduled-task"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_cmdlet_scheduled_task.yml","source_sha256":"ecb1db69d33998d871dbb872130389b727de939ddb2cd5b9d81449bf5bde49d2","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_cmdlet_scheduled_task.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Powershell Create Scheduled Task\nid: 363eccc0-279a-4ccf-a3ab-24c2e63b11fb\nstatus: test\ndescription: Adversaries may abuse the Windows Task Scheduler to perform task scheduling for initial or recurring execution of malicious code\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.005/T1053.005.md#atomic-test-4---powershell-cmdlet-scheduled-task\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1053.005/T1053.005.md#atomic-test-6---wmi-invoke-cimmethod-scheduled-task\nauthor: frack113\ndate: 2021-12-28\nmodified: 2025-10-07\ntags:\n    - attack.privilege-escalation\n    - attack.execution\n    - attack.persistence\n    - attack.t1053.005\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection_cmdlet:\n        ScriptBlockText|contains:\n            - 'New-ScheduledTaskAction'\n            - 'New-ScheduledTaskTrigger'\n            - 'New-ScheduledTaskPrincipal'\n            - 'New-ScheduledTaskSettingsSet'\n            - 'New-ScheduledTask'\n            - 'Register-ScheduledTask'\n    selection_cimmethod:\n        ScriptBlockText|contains|all:\n            - 'Invoke-CimMethod'\n            - '-ClassName'\n            - 'PS_ScheduledTask'\n            - '-NameSpace'\n            - 'Root\\Microsoft\\Windows\\TaskScheduler'\n    filter_main_legitimate_scripts:\n        ScriptBlockText|contains|all:\n            - 'Microsoft.PowerShell.Core\\Export-ModuleMember'\n            - 'Microsoft.Management.Infrastructure.CimInstance'\n            - '__cmdletization_methodParameter'\n    condition: 1 of selection_* and not 1 of filter_main_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1053.005","id":"T1053.005","name":"Scheduled Task","page":"techniques/enterprise/T1053.005/"}],"data_path":"data/detection-rules/363eccc0-279a-4ccf-a3ab-24c2e63b11fb.json","kind":"sigma"}
