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.stealth
12 - attack.defense-impairment
13 - attack.t1564.001
14 - attack.t1112
15 - attack.persistence
16logsource:
17 category: registry_set
18 product: windows
19detection:
20 selection:
21 TargetObject|contains:
22 - '\Microsoft\Windows\PowerShell\' # PowerShell 5
23 - '\Microsoft\PowerShellCore\' # PowerShell 7
24 TargetObject|endswith:
25 - '\ModuleLogging\EnableModuleLogging'
26 - '\ScriptBlockLogging\EnableScriptBlockLogging'
27 - '\ScriptBlockLogging\EnableScriptBlockInvocationLogging'
28 - '\Transcription\EnableTranscripting'
29 - '\Transcription\EnableInvocationHeader'
30 - '\EnableScripts'
31 Details: 'DWORD (0x00000000)'
32 condition: selection
33falsepositives:
34 - Unknown
35level: high
36regression_tests_path: regression_data/rules/windows/registry/registry_set/registry_set_powershell_logging_disabled/info.yml
37simulation:
38 - type: atomic-red-team
39 name: Disable PowerShell Logging via Registry
40 technique: T1112
41 atomic_guid: 95b25212-91a7-42ff-9613-124aca6845a8
References
Related rules
- CrashControl CrashDump Disabled
- DHCP Callout DLL Installation
- DNS-over-HTTPS Enabled by Registry
- New DNS ServerLevelPluginDll Installed
- New DNS ServerLevelPluginDll Installed Via Dnscmd.EXE