Detectionhightest

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

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
François HubautCreated Sat Apr 02Updated Thu Aug 17fecfd1a1-cc78-4313-a1ea-2ee2e8ec27a7windows
Log Source
WindowsRegistry Set
ProductWindows← raw: windows
CategoryRegistry Set← raw: registry_set
Detection Logic
Detection Logic1 selector
detection:
    selection:
        TargetObject|contains:
            - '\Microsoft\Windows\PowerShell\' # PowerShell 5
            - '\Microsoft\PowerShellCore\' # PowerShell 7
        TargetObject|endswith:
            - '\ModuleLogging\EnableModuleLogging'
            - '\ScriptBlockLogging\EnableScriptBlockLogging'
            - '\ScriptBlockLogging\EnableScriptBlockInvocationLogging'
            - '\Transcription\EnableTranscripting'
            - '\Transcription\EnableInvocationHeader'
            - '\EnableScripts'
        Details: 'DWORD (0x00000000)'
    condition: selection
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Testing & Validation

Simulations

atomic-red-teamT1112
View on ART

Disable PowerShell Logging via Registry

GUID: 95b25212-91a7-42ff-9613-124aca6845a8

Regression Tests

by SigmaHQ Team
Positive Detection Test1 matchevtx

Microsoft-Windows-Sysmon

Rule Metadata
Rule ID
fecfd1a1-cc78-4313-a1ea-2ee2e8ec27a7
Status
test
Level
high
Type
Detection
Created
Sat Apr 02
Modified
Thu Aug 17
Path
rules/windows/registry/registry_set/registry_set_powershell_logging_disabled.yml
Raw Tags
attack.defense-evasionattack.t1564.001attack.t1112attack.persistence
View on GitHub