T1547.014 Elastic Security · Elastic

Detect Active Setup in Elastic Security

Adversaries may achieve persistence by adding a Registry key to the Active Setup of the local machine. Active Setup is a Windows mechanism that is used to execute programs when a user logs in. The value stored in the Registry key will be executed after a user logs into the computer. These programs will be executed under the context of the user and will have the account's associated permissions level. Adversaries may abuse Active Setup by creating a key under HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\ and setting a malicious value for StubPath. This value will serve as the program that will be executed when a user logs into the computer. Adversaries can abuse these components to execute malware, such as remote access tools, to maintain persistence through system reboots.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1547 Boot or Logon Autostart Execution
Sub-technique
T1547.014 Active Setup
Canonical reference
https://attack.mitre.org/techniques/T1547/014/

Elastic Detection Query

Elastic Security (Elastic)
eql
registry where event.type in ("creation", "change") and
  registry.path like~ "*\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\*" and
  (
    registry.value.name == "StubPath" or
    registry.path like~ "*\\StubPath"
  ) and
  (
    registry.data.strings like~ ("*cmd.exe*", "*powershell*", "*mshta.exe*", "*rundll32*", "*regsvr32*", "*wscript*", "*cscript*", "*certutil*", "*.bat*", "*.vbs*", "*.js*", "*.hta*", "*http://*", "*https://*")
    or not (
      registry.path like~ "*{89820200-ECBD-11cf-8B85-00AA005B4383}*" or
      registry.path like~ "*{22d6f312-b0f6-11d0-94ab-0080c74c7e95}*" or
      registry.path like~ "*{2C7339CF-2B09-4501-B3F3-F3508C9228ED}*" or
      registry.path like~ "*{44BBA840-CC51-11CF-AAFA-00AA00B6015C}*" or
      registry.path like~ "*{6BF52A52-394A-11d3-B153-00C04F79FAA6}*" or
      registry.path like~ "*{89B4C1CD-B018-4511-B0A1-5476DBF70820}*"
    )
  )
high severity high confidence

Detects adversary persistence via Active Setup by monitoring registry modifications to HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components. Alerts fire when a StubPath value is written containing suspicious executables or interpreters, or when a new unknown GUID is created under the Installed Components key. Active Setup executes StubPath programs under the user context on each login, making it an effective persistence mechanism.

Data Sources

Windows Registry EventsEndpoint Detection and Response (EDR)Elastic Endpoint Security

Required Tables

registry

False Positives & Tuning

  • Legitimate software installers (e.g., Microsoft Office, .NET Framework, Windows Media Player) creating or updating Active Setup keys during installation or patching cycles
  • Enterprise software deployment tools such as SCCM, Intune, or Ansible that configure Active Setup keys as part of application provisioning
  • System administrators manually configuring Active Setup entries for authorized corporate software using scripts containing cmd.exe or PowerShell
Download portable Sigma rule (.yml)

Other platforms for T1547.014


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 1Active Setup StubPath Persistence with Custom GUID

    Expected signal: Sysmon Event ID 12: Registry Key Created for the GUID subkey. Sysmon Event ID 13: Registry Value Set for StubPath, ComponentID, and Version values. Security Event ID 4688: Process creation for reg.exe with the full command line.

  2. Test 2Active Setup with Suspicious LOLBin StubPath

    Expected signal: Sysmon Event ID 13: Registry Value Set with Details containing 'cmd.exe /c'. On next user logon: Sysmon Event ID 1 for cmd.exe spawned by userinit.exe/explorer.exe. Sysmon Event ID 11 for file creation in %TEMP%.

  3. Test 3Active Setup via PowerShell Registry Manipulation

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with the registry manipulation command. Sysmon Event ID 12: Registry Key Created. Sysmon Event ID 13: Registry Value Set for StubPath and Version. PowerShell ScriptBlock Log Event ID 4104 with the full script.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections