T1547 Splunk · SPL

Detect Boot or Logon Autostart Execution in Splunk

Adversaries may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. Operating systems may have mechanisms for automatically running a program on system boot or account logon, including automatically executing programs that are placed in specially designated directories or are referenced by repositories that store configuration information, such as the Windows Registry. An adversary may achieve the same goal by modifying or extending features of the kernel. Since some boot or logon autostart programs run with higher privileges, an adversary may leverage these to elevate privileges.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1547 Boot or Logon Autostart Execution
Canonical reference
https://attack.mitre.org/techniques/T1547/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" (EventCode=12 OR EventCode=13 OR EventCode=14)
  (TargetObject="*\\CurrentVersion\\Run*"
   OR TargetObject="*\\CurrentVersion\\Policies\\Explorer\\Run*"
   OR TargetObject="*\\CurrentVersion\\Winlogon*"
   OR TargetObject="*\\Active Setup\\Installed Components*"
   OR TargetObject="*\\Control\\Lsa\\*"
   OR TargetObject="*\\Control\\Print\\Monitors*"
   OR TargetObject="*\\Control\\Print\\Environments*"
   OR TargetObject="*\\Services\\W32Time\\TimeProviders*"
   OR TargetObject="*\\Explorer\\Shell Folders*"
   OR TargetObject="*\\Explorer\\User Shell Folders*")
| eval action=case(EventCode=12, "KeyCreated", EventCode=13, "ValueSet", EventCode=14, "KeyRenamed")
| table _time, host, action, TargetObject, Details, Image, User
| sort - _time
high severity medium confidence

Broad detection for modifications to Windows autostart registry locations using Sysmon registry events (Event IDs 12, 13, 14). Covers Run/RunOnce keys, Winlogon, Active Setup, LSA authentication and security packages, print monitors/processors, time providers, and shell folder redirections.

Data Sources

Windows Registry: Windows Registry Key ModificationWindows Registry: Windows Registry Key CreationSysmon Event ID 12/13/14

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Software installations that register legitimate autostart entries in Run keys
  • Windows Updates or Group Policy changes modifying Winlogon or Shell Folders registry keys
  • Print driver installations that add legitimate port monitors or print processors
  • Enterprise IT tools (SCCM, Intune, GPO) deploying startup configurations
Download portable Sigma rule (.yml)

Other platforms for T1547


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Add Registry Run Key for Persistence

    Expected signal: Sysmon Event ID 13: Registry value set on HKCU\Software\Microsoft\Windows\CurrentVersion\Run with value name 'df00tech-test'. DeviceRegistryEvents with ActionType 'RegistryValueSet'.

  2. Test 2Drop File in Startup Folder

    Expected signal: Sysmon Event ID 11: FileCreate in the Startup directory. DeviceFileEvents with ActionType 'FileCreated' in the Startup folder path.

  3. Test 3Modify Winlogon Shell Value

    Expected signal: Sysmon Event ID 13: Registry value set on Winlogon\Shell. DeviceRegistryEvents with RegistryKey containing 'Winlogon' and RegistryValueName 'Shell'.

Unlock Pro Content

Get the full detection package for T1547 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections