Detection rules › Sigma

Startup/Logon Script Added to Group Policy Object

Severity
medium
Author
Elastic, Josh Nickels, Marius Rothenbücher
Source
upstream

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

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1547 Boot or Logon Autostart Execution
Privilege EscalationT1484.001 Domain or Tenant Policy Modification: Group Policy Modification, T1547 Boot or Logon Autostart Execution
Defense EvasionT1484.001 Domain or Tenant Policy Modification: Group Policy Modification

Event coverage

ProviderEvent IDTitle
Security-Auditing5136A directory service object was modified.
Security-Auditing5145A network share object was checked to see whether client can be granted desired access.

Stages and Predicates

Stage 1: selection_eventid

Stage 2: all of selection_attributes_main

AttributeLDAPDisplayName: [gPCMachineExtensionNames, gPCUserExtensionNames]
AttributeValue|contains: '42B5FAAE-6536-11D2-AE5A-0000F87571E3'

Stage 3: all of selection_attributes_optional

or:
AttributeValue|contains: '40B6664F-4972-11D1-A7CA-0000F87571E3'
AttributeValue|contains: '40B66650-4972-11D1-A7CA-0000F87571E3'

Stage 4: selection_share

or:
RelativeTargetName|endswith: '\psscripts.ini'
RelativeTargetName|endswith: '\scripts.ini'
AccessList|contains: '%%4417'
ShareName|endswith: '\SYSVOL'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
AccessListmatch
  • %%4417 corpus 3 (sigma 3)
AttributeLDAPDisplayNameeq
  • gPCMachineExtensionNames corpus 4 (sigma 3, splunk 1)
  • gPCUserExtensionNames corpus 2 (sigma 2)
AttributeValuematch
  • 40B6664F-4972-11D1-A7CA-0000F87571E3
  • 40B66650-4972-11D1-A7CA-0000F87571E3
  • 42B5FAAE-6536-11D2-AE5A-0000F87571E3
RelativeTargetNameends_with
  • \psscripts.ini
  • \scripts.ini
ShareNameends_with
  • \SYSVOL corpus 2 (sigma 2)

Neighbors

Stricter alternatives (narrower than this rule)

The rules below may be useful if you find the current rule is too noisy / lacks specificity.

Often fire together

Rules that target events appearing in the same incident timelines. They pattern-match on adjacent steps of the same TTP, so an alert from one is often paired with alerts from these. Useful for triage context and for assembling chained-detection rules.

Share event IDs (chain-detection candidates)

Rules that observe the same Windows event-ID pairs as this one. If you're authoring a multi-stage / sequence rule that spans these events, these are the existing detections that already cover one or both endpoints.