Suspicious Startup/Logon Script Added to Group Policy Object (via security)

This rule detects the modification of Group Policy Objects (GPO) to add a startup/logon script to users or computer objects.

SigmamediumWindowsv1
sigma
title: Suspicious Startup/Logon Script Added to Group Policy Object (via security)
id: 53be4892-4db0-5a19-9be6-355614b6ada5
status: stable
description: This rule detects the modification of Group Policy Objects (GPO) to add a startup/logon script to users or computer objects.
references:
    - https://attack.mitre.org/techniques/T1547/
    - https://attack.mitre.org/techniques/T1484/001/
    - https://www.elastic.co/guide/en/security/current/startup-logon-script-added-to-group-policy-object.html
author: Huntrule Team
date: 2026-06-30
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.defense-impairment
    - attack.t1484.001
    - attack.t1547
logsource:
    product: windows
    service: security
    definition: 'The advanced audit policy setting "Object Access > Audit Detailed File Share" must be configured for Success/Failure'
detection:
    selection_eventid:
        EventID:
            - 5136
            - 5145
    selection_attributes_main:
        AttributeLDAPDisplayName:
            - 'gPCMachineExtensionNames'
            - 'gPCUserExtensionNames'
        AttributeValue|contains: '42B5FAAE-6536-11D2-AE5A-0000F87571E3'
    selection_attributes_optional:
        AttributeValue|contains:
            - '40B6664F-4972-11D1-A7CA-0000F87571E3'
            - '40B66650-4972-11D1-A7CA-0000F87571E3'
    selection_share:
        ShareName|endswith: '\SYSVOL'
        RelativeTargetName|endswith:
            - '\scripts.ini'
            - '\psscripts.ini'
        AccessList|contains: '%%4417'
    condition: selection_eventid and (all of selection_attributes_* or selection_share)
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.