Suspicious Execution of Gpscript (via process_creation)

This rule detects the execution of the LOLBIN gpscript, which runs logon or startup scripts configured in Group Policy

SigmamediumWindowsv1
sigma
title: Suspicious Execution of Gpscript (via process_creation)
id: a868b6fb-30cc-5bc8-ad9e-2472eeebeacd
status: stable
description: This rule detects the execution of the LOLBIN gpscript, which runs logon or startup scripts configured in Group Policy
references:
    - https://attack.mitre.org/techniques/T1218/
    - https://oddvar.moe/2018/04/27/gpscript-exe-another-lolbin-to-the-list/
    - https://lolbas-project.github.io/lolbas/Binaries/Gpscript/
author: Huntrule Team
date: 2026-07-28
tags:
    - attack.stealth
    - attack.t1218
logsource:
    product: windows
    category: process_creation
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_*
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.