Scheduled task executing powershell encoded payload from registry

Detects the creation of a schtask that executes a base64 encoded payload stored in the Windows Registry using PowerShell.

Sigma rule (View on GitHub)

 1title: Scheduled task executing powershell encoded payload from registry
 2status: Experimental
 3description: Detects the creation of a schtask that executes a base64 encoded payload stored in the Windows Registry using PowerShell.
 4author: '@Kostastsale, @TheDFIRReport'
 5references: 
 6  - https://thedfirreport.com/2022/02/21/qbot-and-zerologon-lead-to-full-domain-compromise/
 7date: 2022/02/12
 8logsource:
 9  product: windows
10  category: process_creation
11detection:
12  selection1:
13    Image|endswith: '\schtasks.exe'
14    CommandLine|contains|all:
15      - '/Create'
16      - '/SC'
17  selection2:
18    CommandLine|contains|all:
19      - 'FromBase64String'
20      - 'powershell'
21      - 'Get-ItemProperty'
22      - 'HKCU:'
23  condition: selection1 and selection2
24falsepositives:
25  - Uknown
26level: high
27tags:
28  - attack.execution
29  - attack.persistence
30  - attack.t1053.005
31  - attack.t1059.001

References

Related rules

to-top