PowerShell Logging Disabled Via Registry Key Tampering

Detects changes to the registry for the currently logged-in user. In order to disable PowerShell module logging, script block logging or transcription and script execution logging

Sigma rule (View on GitHub)

 1title: PowerShell Logging Disabled Via Registry Key Tampering
 2id: fecfd1a1-cc78-4313-a1ea-2ee2e8ec27a7
 3status: test
 4description: Detects changes to the registry for the currently logged-in user. In order to disable PowerShell module logging, script block logging or transcription and script execution logging
 5references:
 6    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1112/T1112.md#atomic-test-32---windows-powershell-logging-disabled
 7author: frack113
 8date: 2022-04-02
 9modified: 2023-08-17
10tags:
11    - attack.defense-evasion
12    - attack.t1564.001
13    - attack.t1112
14    - attack.persistence
15logsource:
16    category: registry_set
17    product: windows
18detection:
19    selection:
20        TargetObject|contains:
21            - '\Microsoft\Windows\PowerShell\' # PowerShell 5
22            - '\Microsoft\PowerShellCore\' # PowerShell 7
23        TargetObject|endswith:
24            - '\ModuleLogging\EnableModuleLogging'
25            - '\ScriptBlockLogging\EnableScriptBlockLogging'
26            - '\ScriptBlockLogging\EnableScriptBlockInvocationLogging'
27            - '\Transcription\EnableTranscripting'
28            - '\Transcription\EnableInvocationHeader'
29            - '\EnableScripts'
30        Details: 'DWORD (0x00000000)'
31    condition: selection
32falsepositives:
33    - Unknown
34level: high
35regression_tests_path: regression_data/rules/windows/registry/registry_set/registry_set_powershell_logging_disabled/info.yml
36simulation:
37    - type: atomic-red-team
38      name: Disable PowerShell Logging via Registry
39      technique: T1112
40      atomic_guid: 95b25212-91a7-42ff-9613-124aca6845a8

References

Related rules

to-top