Detectionmediumtest

Gpscript Execution

Detects the execution of the LOLBIN gpscript, which executes logon or startup scripts configured in Group Policy

Convert In Phoenix Studio

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

Launch
François HubautCreated Mon May 16Updated Wed Jun 141e59c230-6670-45bf-83b0-98903780607ewindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic3 selectors
detection:
    selection_img:
        - Image|endswith: '\gpscript.exe'
        - OriginalFileName: 'GPSCRIPT.EXE'
    selection_cli:
        CommandLine|contains:
            - ' /logon'
            - ' /startup'
    filter_main_svchost:
        ParentCommandLine: 'C:\windows\system32\svchost.exe -k netsvcs -p -s gpsvc'
    condition: all of selection_* and not 1 of filter_main_*
False Positives

Legitimate uses of logon scripts distributed via group policy

Rule Metadata
Rule ID
1e59c230-6670-45bf-83b0-98903780607e
Status
test
Level
medium
Type
Detection
Created
Mon May 16
Modified
Wed Jun 14
Path
rules/windows/process_creation/proc_creation_win_lolbin_gpscript.yml
Raw Tags
attack.defense-evasionattack.t1218
View on GitHub