Detectionmediumexperimental

Registry Modification Attempt Via VBScript - PowerShell

Detects attempts to modify the registry using VBScript's CreateObject("Wscript.shell") and RegWrite methods embedded within PowerShell scripts or commands. Threat actors commonly embed VBScript code within PowerShell to perform registry modifications, attempting to evade detection that monitors for direct registry access through traditional tools. This technique can be used for persistence, defense evasion, and privilege escalation by modifying registry keys without using regedit.exe, reg.exe, or PowerShell's native registry cmdlets.

Convert In Phoenix Studio

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

Launch
Swachchhanda Shrawan Poudel (Nextron Systems)Created Wed Aug 132a0a169d-cc66-43ce-9ae2-6e678e54e46awindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script
Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'CreateObject'
            - 'Wscript.shell'
            - '.RegWrite'
    condition: selection
False Positives

Some legitimate admin or install scripts may use these processes for registry modifications.

Rule Metadata
Rule ID
2a0a169d-cc66-43ce-9ae2-6e678e54e46a
Status
experimental
Level
medium
Type
Detection
Created
Wed Aug 13
Path
rules/windows/powershell/powershell_script/posh_ps_vbscript_registry_modification.yml
Raw Tags
attack.defense-evasionattack.persistenceattack.executionattack.t1112attack.t1059.005
View on GitHub