Detectionmediumtest

Service Registry Permissions Weakness Check

Adversaries may execute their own malicious payloads by hijacking the Registry entries used by services. Adversaries may use flaws in the permissions for registry to redirect from the originally specified executable to one that they control, in order to launch their own code at Service start. Windows stores local service configuration information in the Registry under HKLM\SYSTEM\CurrentControlSet\Services

Open in Detection LabConvert ruleBuild Package
François HubautCreated 2021-12-3095afc12e-3cbb-40c3-9340-84a032e596a3windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'get-acl'
            - 'REGISTRY::HKLM\SYSTEM\CurrentControlSet\Services\'
    condition: selection
False Positives

Legitimate administrative script

Testing & Validation

Regression Tests

by frack113
Positive Detection Test1 matchevtx

Microsoft-Windows-PowerShell

Rule Metadata
Rule ID
95afc12e-3cbb-40c3-9340-84a032e596a3
Status
test
Level
medium
Type
Detection
Created
2021-12-30
Path
rules/windows/powershell/powershell_script/posh_ps_get_acl_service.yml
Raw Tags
attack.privilege-escalationattack.persistenceattack.executionattack.stealthattack.t1574.011stp.2a
View on GitHub