{"id":"c4eeeeae-89f4-43a7-8b48-8d1bdfa66c78","title":"Scheduled Task Executing Encoded Payload from Registry","description":"Detects the creation of a schtask that potentially executes a base64 encoded payload stored in the Windows Registry using PowerShell.","author":"pH-T (Nextron Systems), @Kostastsale, TheDFIRReport, X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"high","date":"2022-02-12","modified":"2023-02-04","tags":["attack.privilege-escalation","attack.execution","attack.persistence","attack.t1053.005","attack.t1059.001"],"technique_ids":["T1053.005","T1059.001"],"logsource":{"product":"windows","category":"process_creation"},"falsepositives":["Unlikely"],"references":["https://thedfirreport.com/2022/02/21/qbot-and-zerologon-lead-to-full-domain-compromise/"],"source_path":"rules/windows/process_creation/proc_creation_win_schtasks_reg_loader_encoded.yml","source_sha256":"5ca6c1b9d45aa4075a15f5236649107256a9098ce0a154539bbb036e62fab770","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_schtasks_reg_loader_encoded.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Scheduled Task Executing Encoded Payload from Registry\nid: c4eeeeae-89f4-43a7-8b48-8d1bdfa66c78\nstatus: test\ndescription: Detects the creation of a schtask that potentially executes a base64 encoded payload stored in the Windows Registry using PowerShell.\nreferences:\n    - https://thedfirreport.com/2022/02/21/qbot-and-zerologon-lead-to-full-domain-compromise/\nauthor: pH-T (Nextron Systems), @Kostastsale, TheDFIRReport, X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)\ndate: 2022-02-12\nmodified: 2023-02-04\ntags:\n    - attack.privilege-escalation\n    - attack.execution\n    - attack.persistence\n    - attack.t1053.005\n    - attack.t1059.001\nlogsource:\n    product: windows\n    category: process_creation\ndetection:\n    selection_img:\n        # schtasks.exe /Create /F /TN \"{97F2F70B-10D1-4447-A2F3-9B070C86E261}\" /TR \"cmd /c start /min \\\"\\\" powershell.exe -Command IEX([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String((Get-ItemProperty -Path HKCU:\\SOFTWARE\\Pvoeooxf).yzbbvhhdypa))) \" /SC MINUTE /MO 30\n        - Image|endswith: '\\schtasks.exe'\n        - OriginalFileName: 'schtasks.exe'\n    selection_cli_create:\n        CommandLine|contains: '/Create'\n    selection_cli_encoding:\n        CommandLine|contains:\n            - 'FromBase64String'\n            - 'encodedcommand'\n    selection_cli_get:\n        CommandLine|contains:\n            - 'Get-ItemProperty'\n            - ' gp ' # Alias\n    selection_cli_hive:\n        CommandLine|contains:\n            - 'HKCU:'\n            - 'HKLM:'\n            - 'registry::'\n            - 'HKEY_'\n    condition: all of selection_*\nfalsepositives:\n    - Unlikely\nlevel: high\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/"},{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"}],"data_path":"data/detection-rules/c4eeeeae-89f4-43a7-8b48-8d1bdfa66c78.json","kind":"sigma"}
